[Gdal-dev] Does GDAL handle rotated spheres?
Kolberg Sjur A
Sjur.A.Kolberg at sintef.no
Thu Jun 7 09:19:33 EDT 2007
Hello list,
Does GDAL handle rotated spheres?
According to this mail from 2005, GDAL re-implements a subset of Proj4's keycodes, unfortuately excluding ob_tran.
http://lists.maptools.org/pipermail/gdal-dev/2005-June/005839.html <http://lists.maptools.org/pipermail/gdal-dev/2005-June/005839.html>
Is this correctly described and still valid?
Is there any known workaround or plans for extension?
This proj string seems to work in the proj shell command:
C:\Program Files\FWTools1.2.2>proj +proj=ob_tran +o_proj=eqc +lon_0=-40 +o_lat_p
=22 +x_0=639367 +y_0=1473324 +a=6371000 +b=6371000
-20 70
1387440.15 1817677.94
45 65
3557085.41 3450332.43
Whereas the same string results in error code 5 when using
OGRSpatialReference::ImportFromProj4()
C++ code:
// Source projection system in proj4 text format
msg = "+proj=ob_tran +o_proj=eqc +lon_0=-40 +o_lat_p=22 +x_0=-639367+y_0=1473324 +a=6371000.0 +b=6371000.0";
OGRErr errcode = ogrspatref.importFromProj4((LPCTSTR) msg);
if ( errcode != OGRERR_NONE)
{
ASSERT(false);
return "ERROR! Could not import coordinate system from proj4 format";
}
(gives errcode==5; // #define OGRERR_CORRUPT_DATA 5)
fwtools 1.2.2 on Windows, Microsoft VS 2005.
Best regards,
Sjur Kolberg
SINTEF Energiforskning A/S
Sem Sælands vei 11
7465 Trondheim
tlf. 73 59 72 78
fax 73 59 72 50
More information about the Gdal-dev
mailing list