geojsonio vulnerable to forthcoming changes in sp and rgdal
rsbivand opened this issue · 5 comments
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:
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
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?
Ah I see, I needed dev sp on github, now I can see the error
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
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.
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.