[gdal-dev] Problem with old projection string

Derrick Hoffman derrick.hoffman at ultra-prologic.com
Mon May 4 11:44:18 EDT 2009


Hello:

 

A project I am working on has recently updgraded to GDAL 1.6 from an
older version (I'm not sure, but I think 1.3)

 

I have a raster with an older projection string that is stored in a .prj
file and looks like this:

 

PROJCS["UTM Zone 17, Northern
Hemisphere",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["G
RS
1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,
0,0],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","89
01"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AXIS["L
at",NORTH],AXIS["Long",EAST],AUTHORITY["EPSG","4269"]],PROJECTION["Trans
verse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_me
ridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",
500000],PARAMETER["false_northing",0],UNIT["Meter",1]]

 

I am trying to get the coordinates in lat/lon using some code that looks
like this:

 

//Get GDAL reprojection transform

void * pTransformArg = GDALCreateReprojectionTransformer(sourceArray,
destArray);

 

//Transform

int success;

double inX = x;

double inY = y;

double inZ = z;

 

GDALReprojectionTransform(pTransformArg, FALSE, 1, &inX, &inY, &inZ,
&success);

 

Where destArray is -> "GEOGCS[\"WGS
84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS
84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPS
G\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT
[\"degree\",0.01745329251994328,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[
\"EPSG\",\"4326\"]]";

 

My problem is that when the dataset is opened, the projection string it
reports is just "Local_CS[""]"

 

Any ideas on how I can get the projection for the file in a manner that
my GDAL conversion will work, or an alternative method for converting?

 

Thanks

Derrick Hoffman

Software Engineer

Pro Logic Inc.

304 333-2680 x 322

derrick.hoffman at ultra-prologic.com

 


This e-mail from Ultra Electronics, ProLogic and any attachments to it are confidential to the intended recipient and may also be privileged or controlled by U.S. export control laws and regulations. No technical data, information or other items provided by Ultra Electronics, ProLogic in connection with this email shall be shared or provided to any foreign persons, entities, or subsidiaries without the expressed written authorization of Ultra Electronic, ProLogic.  If you have received it in error please notify the sender and delete it from your system. If you are not the intended recipient you must not copy it or use it for any purpose nor disclose or distribute its contents to any other person.  

All communications may be subject to interception or monitoring for operational and/or security purposes. Please rely on your own virus checking as the sender cannot accept any liability for any damage arising from any bug or virus infection.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20090504/dd038200/attachment-0001.html


More information about the gdal-dev mailing list