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

Chris Smemoe csmemoe at aquaveo.com
Fri Feb 7 09:06:28 PST 2020


Sergey,

As far as I know, there are no functions like that in GDAL.  Perhaps those
functions could be added to the API.  I'd recommend posting the question to
gis.stackexchange.com and try to get an answer there.  I have some rather
complicated code I use to determine if I'm in state plane coordinates using
a combination of GDAL and the WKT parameters, but I wouldn't really post
that code to this mailing list.  There may be an easier way to determine if
you're in state plane coordinates.  Maybe post the link to your question on
gis.stackexchange and I can try to answer it.

Chris

-----Original Message-----
From: gdal-dev [mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of Sergey
Suloev
Sent: Friday, February 07, 2020 9:11 AM
To: Alan Snow
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] Question about GDAL API: way to find out if CS
isSPCS

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
_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev



More information about the gdal-dev mailing list