Skip to content

Commit

Permalink
add geojson_sf to pkg level man file
Browse files Browse the repository at this point in the history
add geojson_sf to readme, and update readme via rerunning it
  • Loading branch information
sckott committed Mar 26, 2018
1 parent c3620b5 commit 48c06ff
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions R/geojsonio-package.r
Expand Up @@ -17,6 +17,8 @@
#' to GeoJSON or TopoJSON as JSON
#' \item \code{\link{geojson_sp}} - convert to a spatial object from
#' \code{geojson_list} or \code{geojson_json}
#' \item \code{\link{geojson_sf}} - convert to an sf object from
#' \code{geojson_list} or \code{geojson_json}
#' \item \code{\link{geojson_read}} / \code{\link{topojson_read}} - read a
#' GeoJSON/TopoJSON file from file path or URL
#' \item \code{\link{geojson_write}} / \code{\link{topojson_write}} - write
Expand Down
3 changes: 2 additions & 1 deletion README.Rmd
Expand Up @@ -50,7 +50,8 @@ Functions in this package are organized first around what you're working with or

* `geojson_list()`/`topojson_list()` - convert to GeoJSON/TopoJSON as R list format
* `geojson_json()`/`topojson_json()` - convert to GeoJSON/TopoJSON as JSON
* `geojson_sp()` - convert output of `geojson_list()` or `geojson_json()` to spatial objects
* `geojson_sp()` - convert output of `geojson_list()` or `geojson_json()` to `sp` spatial objects
* `geojson_sf()` - convert output of `geojson_list()` or `geojson_json()` to `sf` objects
* `geojson_read()`/`topojson_read()` - read a GeoJSON/TopoJSON file from file path or URL
* `geojson_write()`/`topojson_write()` - write a GeoJSON/TopoJSON file locally

Expand Down
9 changes: 3 additions & 6 deletions README.md
Expand Up @@ -16,7 +16,8 @@ Functions in this package are organized first around what you're working with or

* `geojson_list()`/`topojson_list()` - convert to GeoJSON/TopoJSON as R list format
* `geojson_json()`/`topojson_json()` - convert to GeoJSON/TopoJSON as JSON
* `geojson_sp()` - convert output of `geojson_list()` or `geojson_json()` to spatial objects
* `geojson_sp()` - convert output of `geojson_list()` or `geojson_json()` to `sp` spatial objects
* `geojson_sf()` - convert output of `geojson_list()` or `geojson_json()` to `sf` objects
* `geojson_read()`/`topojson_read()` - read a GeoJSON/TopoJSON file from file path or URL
* `geojson_write()`/`topojson_write()` - write a GeoJSON/TopoJSON file locally

Expand Down Expand Up @@ -304,7 +305,7 @@ library('maps')
data(us.cities)
topojson_write(us.cities[1:2, ], lat = 'lat', lon = 'long')
#> <topojson-file>
#> Path: myfile.json
#> Path: myfile.topojson
#> From class: data.frame
```

Expand Down Expand Up @@ -363,10 +364,6 @@ x <- '{"type": "LineString", "coordinates": [ [100.0, 0.0], [101.0, 1.0] ]}'
(topo_json <- geo2topo(x))
#> {"type":"Topology","objects":{"foo":{"type":"LineString","arcs":[0]}},"arcs":[[[100,0],[101,1]]],"bbox":[100,0,101,1]}
topo2geo(topo_json)
#> OGR data source with driver: GeoJSON
#> Source: "{"type":"Topology","objects":{"foo":{"type":"LineString","arcs":[0]}},"arcs":[[[100,0],[101,1]]],"bbox":[100,0,101,1]}", layer: "TopoJSON"
#> with 1 features
#> It has 1 fields
#> <FeatureCollection>
#> type: FeatureCollection
#> no. features: 1
Expand Down
Binary file modified inst/img/unnamed-chunk-21-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified inst/img/unnamed-chunk-23-1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions man/geojsonio.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 48c06ff

Please sign in to comment.