[gdal-dev] OGRSpatialReference::IsSame returning TRUE unexpectedly
Even Rouault
even.rouault at spatialys.com
Tue Sep 5 23:29:57 PDT 2017
On mardi 5 septembre 2017 20:21:17 CEST Matthew Amato wrote:
> Thanks for the detailed write up and quick fix!
>
> Just to clarify your last sentence, are you saying there are still
> potential cases where IsSame returns TRUE when it shouldn't?
Hopefully not.
> I'm just wondering if I should ditch my optimization of checking
> the spatial reference and always do a reproject (via VRT) even if it
> results in a no-op in some cases. I assume the overhead of a no-op VRT is
> fairly small and I'm concerned with correctness more than anything else.
If "same for reprojection" is what matters for you, a safe way of checking is calling
exportToProj4() on both SRS and checking for equality on the returned strings.
--
Spatialys - Geospatial professional services
http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170906/7404b90f/attachment.html>
More information about the gdal-dev
mailing list