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

geojsonio vulnerable to forthcoming changes in sp and rgdal #157

Closed
rsbivand opened this issue Nov 16, 2019 · 5 comments
Closed

geojsonio vulnerable to forthcoming changes in sp and rgdal #157

rsbivand opened this issue Nov 16, 2019 · 5 comments
Milestone

Comments

@rsbivand
Copy link

Related to #150 and #148:

Running revdep checks for current rgdal on R-Forge - see:

https://stat.ethz.ch/pipermail/r-sig-geo/2019-November/027801.html

shows the errors in the attached check log, related to use of PROJ&/GDAL3
and required changes to sp and rgdal. If useful find a regerence to a docker
image in this thread:

r-spatial/discuss#28

Changes will occur quite fast, and packages need to be prepared.

The problems seem to come from not preparing the sp::CRS objects in a way that lets us modify them outside S4 to use WKT in comments. I tried to trace the crs object through your nested function calls, but lost trace.

* checking examples ... ERROR
Running examples in ‘geojsonio-Ex.R’ failed
The error most likely occurred in:

> ### Name: topojson_write
> ### Title: Write TopoJSON from various inputs
> ### Aliases: topojson_write
> 
> ### ** Examples
> 
> # From a data.frame
> ## to points
> topojson_write(us_cities[1:2,], lat='lat', lon='long')
Error in (function (obj, dsn, layer, driver, dataset_options = NULL, layer_options = NULL,  : 
  Can't parse WKT2-style parameter string
Calls: topojson_write ... write_geojson -> write_ogr -> do.call -> <Anonymous>
Execution halted
@sckott
Copy link
Collaborator

sckott commented Nov 18, 2019

thanks @rsbivand - I can't replicate the error. I used the jakubnowosad/geocompr_proj6 docker image, installed latest rgdal from rforge and have

sf::sf_extSoftVersion()
#>          GEOS           GDAL         proj.4 GDAL_with_GEOS     USE_PROJ_H 
#>       "3.8.0"        "3.0.2"        "6.2.1"        "false"         "true"

packageVersion("rgdal")
#> [1] ‘1.5.2’

do i have the wrong versions of anything?

@sckott
Copy link
Collaborator

sckott commented Nov 18, 2019

Ah I see, I needed dev sp on github, now I can see the error

@sckott
Copy link
Collaborator

sckott commented Nov 19, 2019

not preparing the sp::CRS objects in a way that lets us modify them outside S4 to use WKT in comments

@rsbivand What is the proper way? I couldn't figure it out from the links

@rsbivand
Copy link
Author

First, PROJ 6 (I use 6.2.1), then GDAL 3 built on PROJ 6 (I use 3.0.2). Next, current rgdal on R-Forge https://r-forge.r-project.org/R/?group_id=884, for example source install of install.packages("rgdal", repos="http://R-Forge.R-project.org"). Finally, my fork of sp on github, https://github.com/rsbivand/sp, which requires rgdal >= 1.5.1. See the comments by @mdsumner and @Robinlovelace wrt. @Nowosad 's docker image r-spatial/discuss#28 (comment).

A range of somewhat splattered sanguineous details in r-spatial/discuss#28 - I/we don't really see the full contours of the unavoidable/desirable GDAL3/PROJ6 regression, involving silent accuracy degradation if we carry on using PROJ strings with +datum= tags other than WGS84, NAD83 and NAD27. See also: r-spatial/sf#1187.

@sckott sckott added this to the v0.9 milestone Nov 27, 2019
@sckott sckott closed this as completed in 1ea0bd3 Nov 28, 2019
@github-actions
Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with a reprex: https://reprex.tidyverse.org) and link to this issue.

@github-actions github-actions bot locked and limited conversation to collaborators Sep 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants