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

Alan Snow alansnow21 at gmail.com
Fri Feb 7 06:36:22 PST 2020


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
'NAD83 / California zone 5'
>>> 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>
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
> https://lists.osgeo.org/mailman/listinfo/gdal-dev



-- 
Alan Snow
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200207/6c0e055c/attachment.html>


More information about the gdal-dev mailing list