Skip to content

warning by CRS() #102

Open
Open

Description

@edzer

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?

Activity

  1. edzer commented on Mar 18, 2021

    @edzer
    OwnerAuthor

    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
  2. mercelsantos commented on Apr 15, 2021

    @mercelsantos

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions