[gdal-dev] Add Mercator_variant_A method?

Andre Vautour andre.vautour at caris.com
Mon Apr 13 06:00:22 PDT 2015


On 2015-04-12 19:51, Even Rouault wrote:
> 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)

I am not sure I follow what this has to do with the projection name in 
WKT. The newer WKT specification (ISO 19162) relies solely on the 
identifier to determine which operation method to use to project 
coordinates, but the older WKT tends to follow OGC 01-009 which lists 
explicit names to use for the projections. So regardless of what the 
EPSG registry uses for a name, this is the name that is supposed to be 
used for the OGC WKT as far as I am concerned:
OGC 01-009 (http://www.opengeospatial.org/standards/ct): "Mercator_1SP"

Does someone know of another WKT spec that uses that "Mercator variant 
A" name, or I am missing something?
>> OK, where do I fix geopackage behaviour - in OGR general, or in geopackage
>> format handler?
I would ask if this is not a bug in the geopackage itself or whatever 
created that WKT string. After all, it looks like the name used does not 
follow the WKT standard.
> 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'm not opposed to mapping that "Mercator variant A" name to 
SRS_PT_MERCATOR_1SP on WKT import, but I think there's a limit to how 
far one should go to support non-standard WKT. I am not sure what modern 
EPSG names have to do with the explicitly named WKT projection strings 
that are defined in the actual specification, even spatialreference.org 
is still using "Mercator_1SP" for the OGC WKT.
>
> 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
Was that for interacting with WKT explicitly, or just for naming the 
projection in general?

http://epsg-registry.org/export.htm?wkt=urn:ogc:def:crs:EPSG::3395 can 
use a better name, as the WKT is based on ISO 19162 which uses the 
identifier for the operation method. In other words, the name no longer 
is used to determine the method, but 
http://spatialreference.org/ref/epsg/3395/prettywkt/ still uses 
"Mercator_1SP" as, in the OGC standard I listed above, that is what the 
name has to be.

>
> Even

André
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150413/33536aed/attachment-0001.html>


More information about the gdal-dev mailing list