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

CoordinateCleaner vulnerable to forthcoming changes in sp and rgdal #34

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

Comments

@rsbivand
Copy link

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 check log extract below, 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.

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

> ### Name: cc_sea
> ### Title: Identify Non-terrestrial Coordinates
> ### Aliases: cc_sea
> ### Keywords: Coordinate cleaning
> 
> ### ** Examples
> 
> 
> x <- data.frame(species = letters[1:10], 
+                 decimallongitude = runif(10, -30, 30), 
+                 decimallatitude = runif(10, -30, 30))
>                 
> cc_sea(x, value = "flagged")
Testing sea coordinates
Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum WGS_1984 in CRS definition,
 but +towgs84= values preserved
trying URL 'http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_land.zip'
Content type 'application/zip' length 69700 bytes (68 KB)
==================================================
downloaded 68 KB

OGR data source with driver: ESRI Shapefile 
Source: "/tmp/RtmpjUIIfj", layer: "ne_110m_land"
with 127 features
It has 3 fields
Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum Unknown_based_on_WGS84_ellipsoid in CRS definition,
 but +towgs84= values preserved
Error in .local(x, y, returnList, fn, ...) : 
  identicalCRS(x, y) is not TRUE
Calls: cc_sea -> <Anonymous> -> <Anonymous> -> .local -> stopifnot
Execution halted
@rsbivand
Copy link
Author

Please respond ASAP. Still:

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

> ### Name: cc_sea
> ### Title: Identify Non-terrestrial Coordinates
> ### Aliases: cc_sea
> ### Keywords: Coordinate cleaning
> 
> ### ** Examples
> 
> 
> x <- data.frame(species = letters[1:10], 
+                 decimallongitude = runif(10, -30, 30), 
+                 decimallatitude = runif(10, -30, 30))
>                 
> cc_sea(x, value = "flagged")
Testing sea coordinates
Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum WGS_1984 in CRS definition,
 but +towgs84= values preserved
trying URL 'http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/110m/physical/ne_110m_land.zip'
Content type 'application/zip' length 69700 bytes (68 KB)
==================================================
downloaded 68 KB

OGR data source with driver: ESRI Shapefile 
Source: "/tmp/RtmplVtT4h", layer: "ne_110m_land"
with 127 features
It has 3 fields
Warning in showSRID(uprojargs, format = "PROJ", multiline = "NO") :
  Discarded datum Unknown based on WGS84 ellipsoid in CRS definition,
 but +towgs84= values preserved
Error in .local(x, y, returnList, fn, ...) : 
  identicalCRS(x, y) is not TRUE
Calls: cc_sea -> <Anonymous> -> <Anonymous> -> .local -> stopifnot
Execution halted

rgdal release impending, PROJ > 5 and GDAL > 2 on some CRAN test machines. When rgdal is released, your package will fail with the example above.

@azizka
Copy link
Collaborator

azizka commented May 4, 2020

Thanks for the heads up and all the resources on the topic. No idea how to find the time to address this.

@rsbivand
Copy link
Author

rsbivand commented May 5, 2020

Typically either stop checking for identities, or update workflows to use the modern representations. Identity should not be expected without careful consideration of the input representations being compared. 1984 was a long time ago.

@azizka
Copy link
Collaborator

azizka commented May 11, 2020

Addressed this with the help of @mdsumner for version 2.0-15 now and submitted to CRAN. Hope it will work now.

@azizka
Copy link
Collaborator

azizka commented Aug 14, 2020

Seems to work, I will close this issue for now

@azizka azizka closed this as completed Aug 14, 2020
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

No branches or pull requests

2 participants