[PROJ] WKT1 Vertical Perspective CRS regression

Jonathan Gale jgale at mathworks.com
Mon Dec 28 09:11:13 PST 2020


Hi Even,

Sorry about my lack of clarity. GetEPSGGeogCS didn't error for me either, but it returned -1 instead of a valid EPSG code (4326) as it used to.  I have generally used WKT2 when possible, but this GDAL feature seems to internally use WKT1_GDAL which led me to ask.  Does this mean that GetEPSGGeogCS will no longer return the expected result due to this side effect?  I was under the impression that I could represent this CRS previously even if I could not use it for transformations, but it sounds like that isn't correct.

Jonathan


From: Even Rouault <even.rouault at spatialys.com>
Sent: Monday, December 28, 2020 11:48 AM
To: proj at lists.osgeo.org
Cc: Jonathan Gale <jgale at mathworks.com>
Subject: Re: [PROJ] WKT1 Vertical Perspective CRS regression

Jonathan

This is a side effect of https://github.com/OSGeo/PROJ/pull/1971<https://github.com/OSGeo/PROJ/pull/1971>

The past mapping of ESRI:54049 to the below WKT was incorrect. GDAL 2.4 (which
is what WKT1_GDAL means) has never recognized the nsper projection. If you
tried the below WKT with it, it would fail.

You have to use WKT2 with that projection.

I tried quickly with GDAL (master and 3.2 branch) to reproduce the issue by
doing in Python

from osgeo import osr
sr = osr.SpatialReference()
sr.SetFromUserInput('ESRI:54049')
sr.AutoIdentifyEPSG() (which calls GetEPSGGeogCS())

but I couldn't reproduce any error when doing so.

Even

> Hi PROJ list,
>
> I'm not sure which list to report this since my initial issue was expressed
> through GDAL, but since the issue is reproducible in PROJ alone, I'll start
> here. I've encountered a regression upgrading from PROJ 6.2.1 to 7.2.0
> when using GDAL's GetEPSGGeogCS with the Vertical Perspective CRS expressed
> by ESRI: 54089. Based on an initial investigation, I think the issue is in
> WKT1:GDAL generation.
>
> Using PROJ 6.2.1, I can do the following:
>
> projinfo ESRI:54049 -o WKT1:GDAL
> WKT1_GDAL:
> PROJCS["World_Vertical_Perspective",
> GEOGCS["WGS 84",
> DATUM["WGS_1984",
> SPHEROID["WGS 84",6378137,298.257223563,
> AUTHORITY["EPSG","7030"]],
> AUTHORITY["EPSG","6326"]],
> PRIMEM["Greenwich",0],
> UNIT["Degree",0.0174532925199433]],
> PROJECTION["Vertical_Near_Side_Perspective"],
> PARAMETER["False_Easting",0],
> PARAMETER["False_Northing",0],
> PARAMETER["Longitude_Of_Center",0],
> PARAMETER["Latitude_Of_Center",0],
> PARAMETER["Height",35800000],
> UNIT["metre",1,
> AUTHORITY["EPSG","9001"]],
> AXIS["Easting",EAST],
> AXIS["Northing",NORTH],
> AUTHORITY["ESRI","54049"]]
>
> But in PROJ 7.2.0, I get the following:
>
> projinfo ESRI:54049 -o WKT1:GDAL
> WKT1:GDAL string:
> Error when exporting to WKT1:GDAL: Unsupported conversion method: Vertical
> Perspective
>
>
> I'm aware of release notes for GDAL that impacted Vertical Perspective (and
> I haven't found any corresponding in PROJ), but I suspect the GDAL issue is
> rooted in PROJ too.
>
>
> Thanks,
> Jonathan


--
Spatialys - Geospatial professional services
http://www.spatialys.com<http://www.spatialys.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20201228/fd8e7533/attachment.html>


More information about the PROJ mailing list