tests/testthat/test-spatial.R

context('Converting GTFS routes and shapes into simple feature (sf) dataframes')
library(sf)

# convert_gtfs_routes_to_sf()
test_that('Can convert a gtfsr routes dataframe to a simple features dataframe', {
	expect_is(routes_df_as_sf(gtfs_obj), 'sf')
})

test_that('Can convert a gtfsr stops dataframe to a simple features dataframe', {
  expect_is(stops_df_as_sf(gtfs_obj$stops_df), 'sf')
})

Try the gtsf package in your browser

Any scripts or data that you put into this service are public.

gtsf documentation built on July 6, 2018, 1:03 a.m.