[gdal-dev] Add Mercator_variant_A method?

Even Rouault even.rouault at spatialys.com
Sun Apr 12 15:51:02 PDT 2015


Le samedi 11 avril 2015 15:19:48, Brad Hards a écrit :
> On Tue, 7 Apr 2015 07:12:20 AM Jukka Rahkonen wrote:
> > I felt that document somehow heavy to read but it appears in many places
> > that "Mercator variant A" is the primary name since October 2010. This
> > section is from page 34 (of 143)
> 
> OK, where do I fix geopackage behaviour - in OGR general, or in geopackage
> format handler?

It depends on how you want to fix that.

If your intent if to have Mercator_variant_A preserved in the WKT after 
importing it from GPKG, you will likely to have to edit several places in the 
code base to avoid direct string comparisons with SRS_PT_MERCATOR_1SP as done 
currently, but rather use a new 
OGRSpatialReference::IsProjectionMethodAliasOf() or something like that.

Otherwise you can add a normalizing method in OGRSpatialReference 
("morphFromModernEPSG" ??) and call it from the GPKG driver. In my opinion, 
that would be the easiest and less risky way of fixing the issue.

I see exposing (exporting) Mercator_variant_A instead of Mercator_1SP as a 
potential source of incompatibilities with other software, so if we were going 
onto that road, especially using it as the new default name, we should try to 
have a clear view of what is going to break outside of the GDAL world. 
Although I see GeoTools added a few years ago "Mercator (variant A)" as an 
alias : 
https://github.com/geotools/geotools/commit/7fb010411eaf4210fb061f1f7dab6672d364830a
Not sure if that's enough to make them recognize "Mercator_variant_A" also. 
Perhaps Robert as an idea about that since he was the author of that change ? 
And I guess they still use Mercator_1SP as the main name when they export WKT 
?
Apparently GvSIG also added "Mercator_(variant_A)" as an alias: 
https://redmine.gvsig.net/redmine/issues/2624

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list