GDAL and PROJ.4
Ben Discoe
ben at v...
Mon Jul 16 05:12:24 EDT 2001
Now that i have the latest GDAL (with the all the excellent recent fixes!) i
tried calling OGRCreateCoordinateTransformation to convert between a plain
Geographic projection and UTM.
OGRCreateCoordinateTransformation returns NULL, so i used
CPLPushErrorHandler to find out what is failing. The message is "Unable to
load PROJ.4 library (proj.dll), creation of OGRCoordinateTransformation
failed."
So, i looked around for "proj.dll" and found that it isn't built by GDAL
straight from CVS - it appears to be an entirely separate library, yet a
"proj.dll" was included somehow with the last Win32 binary GDAL 114-2
release. I tried coping that "proj.dll" to my current path, and got a
message:
Attempt to load proj.dll, but couldn't find pj_transform.
Please upgrade to PROJ 4.1.2 or later.
It appears the "current" 114-2 GDAL release has a very old version of
proj.dll?
So, i went and looked at the PROJ.4 page, http://www.remotesensing.org/proj/
and found a binary for Linux, but not Win32. Downloaded the latest source
and built it, copied "proj.dll" to the GDAL bin directory, and finally it
works. (Could we add a binary release for Win32 to the PROJ.4 site, like
there is for Linux?)
However, the results i'm getting from
OGRCreateCoordinateTransformation::Transform are definitely wrong. Perhaps
there is some trickiness.
From: "+proj=longlat +ellps=WGS84 +datum=WGS84 "
To: "+proj=utm +zone=10 +ellps=clrk66 +datum=NAD27 +units=m "
Any reason why this transformation wouldn't be supported?
-Ben
More information about the Gdal-dev
mailing list