[gdal-dev] Question about GDAL API: way to find out if CS is SPCS

Sergey Suloev sergey.suloev at gmail.com
Fri Feb 7 08:10:56 PST 2020


hi, Alan,

On 2/7/20 5:36 PM, Alan Snow wrote:
> If you use python, the pyproj CRS class can help.
>  >>> from pyproj import CRS
>  >>> crs = CRS("EPSG:26945")
>  >>> crs
> <Projected CRS: EPSG:26945>
> Name: NAD83 / California zone 5
> Axis Info [cartesian]:
> - X[east]: Easting (metre)
> - Y[north]: Northing (metre)
> Area of Use:
> - name: USA - California - SPCS83 - 5
> - bounds: (-121.42, 32.76, -114.12, 35.81)
> Coordinate Operation:
> - name: SPCS83 California zone 5 (meters)
> - method: Lambert Conic Conformal (2SP)
> Datum: North American Datum 1983
> - Ellipsoid: GRS 1980
> - Prime Meridian: Greenwich
> 
>  >>> crs.name <http://crs.name>
> 'NAD83 / California zone 5'
>  >>> crs.coordinate_operation.name <http://crs.coordinate_operation.name>
> 'SPCS83 California zone 5 (meters)'
> 
> On Fri, Feb 7, 2020 at 8:08 AM Sergey Suloev <sergey.suloev at gmail.com 
> <mailto:sergey.suloev at gmail.com>> wrote:
> 
>     Hello,
> 
>     in my project I am using GDAL to manage coordinate systems.
>     I am looking for a function/class that can tell me if a specific
>     coordinate system is a State Plane Coordinate System and give a zone
>     number.
> 
>     Thank you very much
>     _______________________________________________
>     gdal-dev mailing list
>     gdal-dev at lists.osgeo.org <mailto:gdal-dev at lists.osgeo.org>
>     https://lists.osgeo.org/mailman/listinfo/gdal-dev
> 
> 
> 
> -- 
> Alan Snow

thanks for the answer. I am using C/C++ and I was expecting to find a 
function/method like "GetSPCSZone", "IzSPCS" or similar.

Do you mean that I have to parse a coordinate system name in order to 
find required information ?

Sergey


More information about the gdal-dev mailing list