Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

geojsonsf #81

Closed
SymbolixAU opened this issue Oct 1, 2018 · 5 comments · Fixed by #118
Closed

geojsonsf #81

SymbolixAU opened this issue Oct 1, 2018 · 5 comments · Fixed by #118
Milestone

Comments

@SymbolixAU
Copy link

In the readme you identify the conversion to/from GeoJSON is slow

They are slower with the Spatial classes due to internal conversion to/from json

Other than the date fix (thanks again!), is there anything you would like added to geojsonsf so you can use it in rmapshaper to do the GeoJSON <--> sf conversion?

@ateucher ateucher added this to the 0.5 milestone Apr 15, 2020
@ateucher
Copy link
Owner

ateucher commented Apr 15, 2020

Working in geojsonsf branch.

To Do:

  • remove support for geojson lists
  • drop geojsonio (possibly to Suggests for now as it's useful in tests)
  • figure out what classes to support. geojsonio creates c("geojson", "geoj_json", "json") and geojsonsf creates c("geojson", "json")
  • Wait for geojson_sf with NA numeric values changes to character SymbolixAU/geojsonsf#79 to be fixed
  • drop geojsonlint (use jsonify::validate_json to validate character strings of geojson)
  • drop support for POSIXlt (or convert on the fly)

@dcooley
Copy link

dcooley commented Apr 16, 2020

Would you like me to add a json class` to geojsonsf ?

@ateucher
Copy link
Owner

Sorry @dcooley I was wrong - geojsonsf already adds json class:

library(sf)
#> Linking to GEOS 3.8.1, GDAL 2.4.4, PROJ 7.0.0
library(geojsonsf)

xs <- st_polygon(list(cbind(approx(c(0, 0, 1, 1, 0))$y,
                            approx(c(0, 1, 1, 0, 0))$y)))
xsf <- st_sf(geometry = st_sfc(xs, xs + 2, xs + 3), a = 1:3)

class(geojsonsf::sf_geojson(xsf))
#> [1] "geojson" "json"

Created on 2020-04-17 by the reprex package (v0.3.0)

@ateucher
Copy link
Owner

Checklist updated - rmapshaper can just have methods for geojson I think...

@ateucher
Copy link
Owner

ateucher commented Mar 2, 2022

This will be closed by #118

@ateucher ateucher linked a pull request Mar 2, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants