[gdal-dev] Problem with old projection string

Frank Warmerdam warmerdam at pobox.com
Mon May 4 12:18:34 EDT 2009


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["GRS 
1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AXIS["Lat",NORTH],AXIS["Long",EAST],AUTHORITY["EPSG","4269"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-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[\"EPSG\",\"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



More information about the gdal-dev mailing list