[gdal-dev] ImportFromESRIStatePlaneWKT access from python
Even Rouault
even.rouault at spatialys.com
Fri Aug 17 14:41:21 PDT 2018
On vendredi 17 août 2018 16:54:42 CEST Glen Rice - NOAA Federal wrote:
> This is a followup comment for completeness in case someone else tries to
> go down the same path of ingesting the ImportFromESRIStatePlaneWKT file
> directly.
>
> I found that when I used the resulting wkt directly in an instance
> of osr.CoordinateTransformation I got the following error:
> """
> ERROR 6: No translation for Lambert_Conformal_Conic to PROJ.4 format is
> known.
> Wrong number or type of arguments for overloaded function
> 'CoordinateTransformation_TransformPoint'.
> Possible C/C++ prototypes are:
> OSRCoordinateTransformationShadow::TransformPoint(double [3])
> OSRCoordinateTransformationShadow::TransformPoint(double
> [3],double,double,double)
> """
>
> After some mucking around I found that updating the PROJECTION from
> "Lambert_Conformal_Conic" to "Lambert_Conformal_Conic_2SP" fixed the
> problem.
ImportFromESRIStatePlaneWKT() likely brings you a WKT in ESRI variant format,
which isn't understood by other parts of GDAL.
The 'clean' way is to massage it into the more standard OGC WKT v1 with
OGRSpatialReference::morphFromESRI(), which will among other things will
transform "Lambert_Conformal_Conic" to "Lambert_Conformal_Conic_2SP"
Even
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list