[gdal-dev] Improved support of OziExplorer datums
Jean-Claude REPETTO
jrepetto at free.fr
Fri Jan 7 16:35:50 EST 2011
Hello,
Now that GDAL supports the OZF2 and OZFx3 formats, I think it is time to
improve the processing of the .map files.
The current implementation supports only 3 datums, while OziExplorer
supports 123 datums.
I have added the support for all OziExplorer datums, but before sending
the patch, Even Rouault suggested me to post this message, so that
anybody can send comments.
I have created two files in the GDAL data directory :
- gdal_ellips.csv contains the ellipsoid definitions
- gdal_datum.csv contains the datum definitions
The structure of gdal_ellips.csv is straightforward :
ELLIPSOID_CODE,NAME,A,INVF
0,Airy 1830,6377563.396,299.3249646
1,Modified Airy,6377340.189,299.3249646
...
The structure of gdal_datum.csv deserves some explanations :
NAME,EPSG_DATUM_CODE,ELLIPSOID_CODE,DELTAX,DELTAY,DELTAZ
Adindan,4201,5,-162,-12,206 # Africa - Eritrea, Ethiopia and Sudan
...
DOS 1968,,14,230,-199,-752 # Gizo Island
Easter Island 1967,4719,14,211,147,111
Egypt,,14,-130,-117,-151 # EPSG 4199
...
Hermannskogel,3906,3,653,-212,449 # GDAL uses 682,-203,480
...
NAD27 Alaska,,4,-5,135,172 # EPSG:1176 Coordinate Transformation
NAD27 Bahamas,,4,-4,154,178 # EPSG:1177 Coordinate Transformation
...
South Asia,,8,7,-10,-26 # Singapore (unknown EPSG code)
The second column contains the EPSG code, but the following columns also
contain the ellipsoid code and the 3-parameters transformation values.
This is necessary, because for some datums used in OziExplorer :
- either there is no equivalent EPSG code : South Asia (Singapore)
- either GDAL doesn't know the 3 parameters : Egypt (EPSG:4199)
- either there are several transformation parameters, and GDAL and
OziExplorer are not using the same ones : DOS 1968 (Solomon Islands),
where OziExplorer uses the transformation for the Gizo island
(EPSG:15805), while GDAL uses the transformation for the Guadalcanal
island (EPSG:15807)
- or there are several transformations for the same datum, and it is not
possible for GDAL to know from the EPSG code which transformation must
be used : NAD27, Narwhan, ED50, etc...
Storing the datums in data files instead of source code has two advantages :
- users can add custom datums and ellipsoids (they can do it in OziExplorer)
- users can get exactly the same results with GDAL than with
OziExplorer, if they wish. For example, for the Hermannskogel datum, the
transformation parameters differ. If a user wants GDAL to use the
OziExplorer parameters, all he has to do is to remove the EPSG code from
the ozi_datum.csv file :
Hermannskogel,,3,653,-212,449
and GDAL will use 653,-212,449 instead of 682,-203,480 .
Best regards,
Jean-Claude
More information about the gdal-dev
mailing list