id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc 3929,[PATCH] Support for all Ozi datums,jcrepetto,Even Rouault,"The current GDAL version supports only 3 datums in Oziexplorer .map files, while OziExplorer supports 123 datums. The attached patch adds support for all OziExplorer datums. It uses two new files in the GDAL data directory : [[BR]] - ozi_ellips.csv contains the ellipsoid definitions [[BR]] - ozi_datum.csv contains the datum definitions The structure of ozi_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 ozi_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.[[BR]] This is necessary, because for some datums used in OziExplorer :[[BR]] - either there is no equivalent EPSG code : South Asia (Singapore) [[BR]] - either GDAL doesn't know the 3 parameters : Egypt (EPSG:4199) [[BR]] - 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) [[BR]] - 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 : [[BR]] - users can add custom datums and ellipsoids (they can do it in OziExplorer) [[BR]] - 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 : [[BR]] {{{ Hermannskogel,,3,653,-212,449 }}} and GDAL will use 653,-212,449 instead of 682,-203,480 . '''Provenance of the data files''' I have created both files, they have not been taken from any other software. The ellipsoid parameters are standard, and the list of ellipsoids supported by OziExplorer is displayed in the help page of OziExplorer (in the section : ""Adding User Datums""). The datums names are exactly the sames as those displayed by OziExplorer (Menu : Display, Datum Parameters). This is necessary for the string comparisons to succeed when parsing .map files. The 3-parameters transformation value are those displayed by OziExplorer (Menu : Display, Datum Parameters). They have been copied manually to the ozi_datums.csv file. Most of these parameters (and the datum names) are the same as in the datum list from the NGA, this is probably where the OziExplorer author found them. I have put the area names in comments, they come from the EPSG database.",enhancement,closed,normal,1.10.0,OGR_SRS,1.8.0,normal,fixed,OZI,