Skip to content

Commit f2cecd7

Browse files
Merge pull request #102 from pedro-andrade-inpe/master
More updates related to CRAN submission
2 parents 0c3be33 + 02454da commit f2cecd7

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

DESCRIPTION

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
Type: Package
22
Package: gtfs2gps
33
Title: Converting Transport Data from GTFS Format to GPS-Like Records
4-
Version: 1.0-4
4+
Version: 1.0-5
55
Authors@R: c(person(given="Rafael H. M.", family="Pereira", email="[email protected]", role="aut", comment = c(ORCID = "0000-0003-2125-7465")),
66
person(given="Pedro R.", family="Andrade", email="[email protected]", role=c("aut", "cre"), comment = c(ORCID = "0000-0001-8675-4046")),
77
person(given="Joao", family="Bazzo", role="aut", comment = c(ORCID = "0000-0003-4536-5006")),
88
person("Ipea - Institue for Applied Economic Research", role = c("cph", "fnd")))
9-
Date: 2020-02-27
9+
Date: 2020-03-06
1010
URL: https://github.com/ipeaGIT/gtfs2gps
1111
BugReports: https://github.com/ipeaGIT/gtfs2gps/issues
12-
Description: Convert General Transit Feed Specification (GTFS) data to Global Positioning System (GPS) records in 'data.table' format. It also has some functions to subset GTFS data in time and space and to convert both representations to simple feature format.
12+
Description: Convert general transit feed specification (GTFS) data to global positioning system (GPS) records in 'data.table' format. It also has some functions to subset GTFS data in time and space and to convert both representations to simple feature format.
1313
License: MIT + file LICENSE
1414
Encoding: UTF-8
1515
LazyData: TRUE

R/gtfs_as_sf.R

+1-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
#' @param gtfs A GTFS data.
66
#' @param crs The coordinate reference system represented as an EPSG code.
77
#' The default value is 4326 (latlong WGS84)
8+
#' @return A simple feature (sf) object.
89
#' @export
910
#' @examples
1011
#' poa <- read_gtfs(system.file("extdata/saopaulo.zip", package = "gtfs2gps"))
1112
#' poa_sf <- gtfs_shapes_as_sf(poa)
12-
#' # plot(sf::st_geometry(poa_sf), lwd = 2)
1313
gtfs_shapes_as_sf <- function(gtfs, crs = 4326){
1414
# sort data
1515
temp_shapes <- data.table::setDT(gtfs$shapes)[order(shape_id, shape_pt_sequence)]
@@ -40,8 +40,6 @@ gtfs_shapes_as_sf <- function(gtfs, crs = 4326){
4040
#' poa <- read_gtfs(system.file("extdata/poa.zip", package = "gtfs2gps"))
4141
#' poa_shapes <- gtfs_shapes_as_sf(poa)
4242
#' poa_stops <- gtfs_stops_as_sf(poa)
43-
#' # plot(sf::st_geometry(poa_shapes), lwd = 2)
44-
#' # plot(sf::st_geometry(poa_stops), pch = 20, col = "blue", add = TRUE)
4543
gtfs_stops_as_sf <- function(gtfs, crs = 4326){
4644
temp_stops_sf <- sfheaders::sf_point(gtfs$stops, x = "stop_lon", y = "stop_lat", keep = TRUE)
4745
sf::st_crs(temp_stops_sf) <- crs

man/gtfs_shapes_as_sf.Rd

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/gtfs_stops_as_sf.Rd

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)