[gdal-dev] Problem with old projection string

Derrick Hoffman derrick.hoffman at ultra-prologic.com
Mon May 4 12:23:43 EDT 2009


Yes, you are correct on both.

That transform will work just fine.

The issue is the projection that comes out of the dataset.

The source wkt is retrieved from the raster using:

const char* projection = dataset->GetProjectionRef();

This itself returns "Local_CS[""]"

We have multiple files, a .bmp and two .tif files, which all use a .prj
and a world file to define the spatial reference.  All are in the same
area with similar .prj files, and all report "Local_CS[""]" as their
projection.

If you need more information please let me know.  I can also send you
the source files used if that will be of any help.

Derrick Hoffman

Software Engineer

Pro Logic Inc.

304 333-2680 x 322

derrick.hoffman at ultra-prologic.com


-----Original Message-----
From: Frank Warmerdam [mailto:warmerdam at pobox.com] 
Sent: Monday, May 04, 2009 12:19 PM
To: Derrick Hoffman
Cc: gdal-dev at lists.osgeo.org
Subject: Re: [gdal-dev] Problem with old projection string

Derrick Hoffman wrote:
> pTransformArg is null. 
> As a side note, even when opening the file in FWTools 2.3.0, the
> projection reported is just -> Local_CS[""]

Derrick,

I have tried the following command which essentially creates a
coordinate
transformer for the source and destination coordinate systems and then
transforms the point.  It seems to work ok:

warmerda at gdal64[22]% cat src.wkt
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]]
warmerda at gdal64[23]% cat dst.wkt
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\"]]

warmerda at gdal64[24]% testepsg -t src.wkt dst.wkt 100000 2000000
OGRCT: Source: +proj=utm +zone=17 +ellps=GRS80 +datum=NAD83 +units=m
+no_defs
OGRCT: Target: +proj=longlat +ellps=WGS84 +no_defs
(100000.000000,2000000.000000,0.000000) ->
(-84.777358,18.051740,0.000000)

So, I conclude that the problem is likely to be something specific about
your configuration.  One possibility is that there is no PROJ library in
your path and this is causing creation of the reprojector to fail.

Hmm, in your original message you wrote:

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

Is it possible you were referring to the source dataset, and that
the "sourceArray" passed to GDALCreateReprojectionTransformer() is this
LOCAL_CS value?

If that is the case we need to focus on the input file, and why the
source
driver would not be getting the coordinate system properly.  If that is
the
case, please indicate the details of the input file (for instance the
format).

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    | Geospatial Programmer for Rent



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.



More information about the gdal-dev mailing list