[gdal-dev] Failure to convert to Airy

Even Rouault even.rouault at spatialys.com
Mon Jun 17 12:54:53 PDT 2019

> but raise the error when I change the order of the source and target (i.e.
> create the inverse mapping)

Sure, as that would trigger the non existing reverse operation.

> pSrcSRS = "+proj=airy +ellps=WGS84 +units=m"
> pDstSRS = "+proj=latlong +datum=WGS84"
> In this case, it even raises an exception in VS debugger at line #63
> 		CPLFree(pSrcSRS);		CPLFree(pDstSRS);

Those CPLFree() are super suspicious and should likely be removed. They are 
not present in other code paths. I suspect the correct signature for the 
function should be

OGRCoordinateTransformationH gmt_OGRCoordinateTransformation(
   struct GMT_CTRL *GMT, const char *pSrcSRS, const char *pDstSRS);

to avoid such issue.

Spatialys - Geospatial professional services

More information about the gdal-dev mailing list