Matthew, > Good morning, > I've got some raster images for Hawaii, and I've found that running any > command (gdalinfo, translate, warp) will return the following error in my > Ubuntu environment: > > Warning 1: Unhandled (yet) value for Datum : OHA-M. Defaulting to WGS84...
I guess this comes from a geospatial PDF ? You're lucky I remember having put that warning message when writing the driver... So please always specify which format/driver you're talking about. > > I have seen that the files located in /usr/share/gdal/1.10 do seem to > mention the Hawaiian datums, but I'm not sure how to enable support of > those when I run my regular commands. I'm running a script in Python, so > I'm wondering if it may be possible to work around this, or if this is > just a future development that hasn't happened yet. The driver only handles a dozain of common datum codes from the list of hundreds of datums given at annex A (Predefined Datums) of http://portal.opengeospatial.org/files/?artifact_id=40537 . The issue is that the matching between those GEOTRANS bases datum codes and their EPSG equivalents must be manually done... So they tend to be added on a case by case basis. In that instance OHA-M stands for 'OLD HAWAIIAN (CC), Mean' according to the annex. In gdal/gt_datum.csv (derived from GeoTrans): OGRFeature(gt_datum):153 CODE (String) = OHA-M NAME (String) = OLD HAWAIIAN (CC), Mean ELLIPSOID (String) = CC DELTAX (String) = 61 SIGMAX (String) = 25 DELTAY (String) = -285 SIGMAY (String) = 20 DELTAZ (String) = -181 SIGMAZ (String) = 20 NORTH (String) = 17 SOUTH (String) = 24 WEST (String) = -164 EAST (String) = -153 ROTX (String) = (null) ROTY (String) = (null) ROTZ (String) = (null) SCALE (String) = (null) But there are other variations of OHA- (A, B, C and D) In the EPSG world, there's just one as far as I can see. And by comparing the DELTAX, DELTAY and DELTAZ parameters of the above definition with the TOWGS84 of the below definition, OHA-M seems to match the 'Old_Hawaiian' datum from EPSG:6135 $ gdalsrsinfo EPSG:4135 PROJ.4 : '+proj=longlat +ellps=clrk66 +towgs84=61,-285,-181,0,0,0,0 +no_defs ' OGC WKT : GEOGCS["Old Hawaiian", DATUM["Old_Hawaiian", SPHEROID["Clarke 1866",6378206.4,294.9786982138982, AUTHORITY["EPSG","7008"]], TOWGS84[61,-285,-181,0,0,0,0], AUTHORITY["EPSG","6135"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4135"]] So you could likely replace the DATUM section of the WKT definition returned by the PDF driver with the DATUM section of the above and put that in a foo.wkt file, and then use -a_srs foo.wkt / -t_srs foo.wkt depending on the utility. I've just implemented in trunk the interpretation of OHA-M based on above assumptions. Even -- Spatialys - Geospatial professional services http://www.spatialys.com _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
