<div dir="ltr">This is a followup comment for completeness in case someone else tries to go down the same path of ingesting the <span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">ImportFromESRIStatePlaneWKT file directly.</span><div><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline"><br></span></div><div><span style="font-size:12.8px;text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">I found that when I used the resulting wkt directly in an instance of osr.CoordinateTransformation I got the following error:</span></div><div>"""</div><div><div>ERROR 6: No translation for Lambert_Conformal_Conic to PROJ.4 format is known.</div><div>Wrong number or type of arguments for overloaded function 'CoordinateTransformation_TransformPoint'.</div><div> Possible C/C++ prototypes are:</div><div> OSRCoordinateTransformationShadow::TransformPoint(double [3])</div><div> OSRCoordinateTransformationShadow::TransformPoint(double [3],double,double,double)</div></div><div>"""</div><div><br></div><div>After some mucking around I found that updating the PROJECTION from "Lambert_Conformal_Conic" to "Lambert_Conformal_Conic_2SP" fixed the problem.</div><div><br></div><div>Kind regards,</div><div>Glen</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 9, 2018 at 9:40 AM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On jeudi 9 août 2018 09:27:43 CEST Glen Rice - NOAA Federal wrote:<br>
> Thanks Even,<br>
> <br>
> From the SetStatePlane docs<br>
</span>> <<a href="https://www.gdal.org/classOGRSpatialReference.html#a4e0f1e23207c157f7238871" rel="noreferrer" target="_blank">https://www.gdal.org/<wbr>classOGRSpatialReference.html#<wbr>a4e0f1e23207c157f7238871</a><br>
> 7c35be88c> it says<br>
<span class="">> """<br>
> nZone State plane zone number, in the USGS numbering scheme (as distinct<br>
> from the Arc/Info and Erdas numbering scheme."""<br>
> which would seem to indicate that using the FIPS code in place of the USGS<br>
> numbering scheme will lead to erroneous results. <br>
<br>
</span>The mapping from USGS (left column) to ESRI (right column) zone number is at:<br>
<a href="https://github.com/OSGeo/gdal/blob/master/gdal/ogr/ogr_srs_esri.cpp#L134" rel="noreferrer" target="_blank">https://github.com/OSGeo/gdal/<wbr>blob/master/gdal/ogr/ogr_srs_<wbr>esri.cpp#L134</a><br>
and ultimately this reads the data/stateplane.csv with the USGS zone number as <br>
a key.<br>
<span class=""><br>
<br>
> It appears that my best<br>
> path forward with FIPS within GDAL with python would be to read<br>
> the Lib/site-packages/osgeo/data/<wbr>gdal/esri_StatePlane_extra.wkt file<br>
> directly and build a small converter utility.<br>
<br>
</span>Sounds reasonable<br>
<div class="HOEnZb"><div class="h5"><br>
> <br>
> Glen<br>
> <br>
> On Thu, Aug 9, 2018 at 9:02 AM, Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>><br>
> <br>
> wrote:<br>
> > On jeudi 9 août 2018 08:42:57 CEST Glen Rice - NOAA Federal wrote:<br>
> > > Hello,<br>
> > > <br>
> > > I am looking for any hints for how to access ImportFromESRIStatePlaneWKT<br>
> > <br>
> > in<br>
> > <br>
> > > the OGRSpatialReference class through the python bindings. I am working<br>
> > > with xyz text files where the header contains a FIPS zone reference and<br>
> > > I<br>
> > > would like to convert it to another system.<br>
> > <br>
> > You can't from Python. This method is only available from C++.<br>
> > <br>
> > But perhaps the osr.SetStatePlane(int zone, int is_nad83 = 1, char const<br>
> > *unitsname = "", double units = 0.0) that corresponds to<br>
> > OGRSpatialReference::<wbr>SetStatePlane() will do the job ?<br>
> > <br>
> > Even<br>
> > <br>
> > --<br>
> > Spatialys - Geospatial professional services<br>
> > <a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
<br>
<br>
-- <br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" rel="noreferrer" target="_blank">http://www.spatialys.com</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><font color="#999999">Glen Rice</font></div><div dir="ltr"><font color="#999999"><span style="font-size:12.8000001907349px">Hydrographic Systems and Technology Branch</span><br></font></div><div dir="ltr"><font color="#999999">Office of Coast Survey / Coast Survey Development Laboratory</font><div><font color="#999999">603-862-1397</font></div></div></div></div></div></div></div></div>
</div>