[gdal-dev] Setting up a StatePlane Coordinate system

Christiaan Janssen cjanssen at iavo-rs.com
Mon Dec 31 11:38:52 EST 2007


Turns out it wasn't able to find the necessary .csv files, thanks for all the help.

Christiaan 

-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com] 
Sent: Monday, December 31, 2007 9:47 AM
To: Christiaan Janssen
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] Setting up a StatePlane Coordinate system

Christiaan Janssen wrote:
> So the coordinate system def you provided works, which is great, but I 
> was wondering if you could show me how to programmaticaly generate a 
> state plane based coordinate system object in code. I've been using 
> the following (which I know isn't working for me)
>  
> int StatePlaneZone = 101;    //Alabama East
> int isNad83 = 1;                    //True
> OGRSpatialReference* ogrsr = new OGRSpatialReference();
> ogrsr->SetProjCS(zoneTitle);
> ogrsr->SetStatePlane(statePlaneZone, isNAD83, NULL, NULL);
>  
> This is obviously not working based on what the well known text string 
> generated from this object is. Could you help clarify what I'm doing 
> wrong, thanks.

Christiaan,

I haven't followed this thread closely, but the above steps (simulated through the python bindings) did produce this for me:

PROJCS["NAD83 / Alabama East",
     GEOGCS["NAD83",
         DATUM["North_American_Datum_1983",
             SPHEROID["GRS 1980",6378137,298.257222101,
                 AUTHORITY["EPSG","7019"]],
             AUTHORITY["EPSG","6269"]],
         PRIMEM["Greenwich",0,
             AUTHORITY["EPSG","8901"]],
         UNIT["degree",0.01745329251994328,
             AUTHORITY["EPSG","9122"]],
         AUTHORITY["EPSG","4269"]],
     UNIT["metre",1,
         AUTHORITY["EPSG","9001"]],
     PROJECTION["Transverse_Mercator"],
     PARAMETER["latitude_of_origin",30.5],
     PARAMETER["central_meridian",-85.83333333333333],
     PARAMETER["scale_factor",0.99996],
     PARAMETER["false_easting",200000],
     PARAMETER["false_northing",0],
     AUTHORITY["EPSG","26929"]]

The original zone title is discarded when things are reset by SetStatePlane().
The title can be reset after SetStatePlane() using the SetProjCS() method.

Note that SetStatePlane() depends on the OGRSpatialReference class being able to find and load various GDAL support files, like stateplane.csv and pcs.csv.

I appologise if I missed the point of this thread.

Best regards,
-- 
---------------------------------------+--------------------------------
---------------------------------------+------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org





More information about the gdal-dev mailing list