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

warning by CRS() #102

Open
edzer opened this issue Mar 18, 2021 · 2 comments
Open

warning by CRS() #102

edzer opened this issue Mar 18, 2021 · 2 comments

Comments

@edzer
Copy link
Owner

edzer commented Mar 18, 2021

I am trying to understand why

> crs = CRS(SRS_string = 'EPSG:28992')
Warning message:
In showSRID(SRS_string, format = "PROJ", multiline = "NO", prefer_proj = prefer_proj) :
  Discarded datum Amersfoort in Proj4 definition

still emits a warning. What should we do to get rid of this warning? I'm not trying to show the SRID by way of a PROJ4 string, right?

@edzer
Copy link
Owner Author

edzer commented Mar 18, 2021

While at it, I'm also still struggling to understand this difference:

> pt = SpatialPoints(matrix(c(200000,500000),1), proj4string = CRS(SRS_string="EPSG:28992"))
Warning message:
In showSRID(SRS_string, format = "PROJ", multiline = "NO", prefer_proj = prefer_proj) :
  Discarded datum Amersfoort in Proj4 definition
> spTransform(pt, CRS("+proj=longlat"))
SpatialPoints:
     coords.x1 coords.x2
[1,]  6.049692  52.48586
Coordinate Reference System (CRS) arguments: +proj=longlat +datum=WGS84
+no_defs 
> spTransform(pt, CRS("+proj=longlat +ellps=WGS84"))
SpatialPoints:
     coords.x1 coords.x2
[1,]  6.050224  52.48689
Coordinate Reference System (CRS) arguments: +proj=longlat +ellps=WGS84
+no_defs 
Warning message:
In showSRID(uprojargs, format = "PROJ", multiline = "NO", prefer_proj = prefer_proj) :
  Discarded datum Unknown based on WGS84 ellipsoid in Proj4 definition

@mercelsantos
Copy link

Hey Edzer,

Have you ever find an explanation for that warning? I've got the same warning using CRS() function.

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