Problem with Vertical CS and OGR
|Reported by:||murphke1||Owned by:||Even Rouault|
So I'm getting garbage WKT whenever I have source data with a Vertical CS tag for which the value is also a meaningful Projective CS tag. Example is 5171 - EGM 96. This is also Projective CS "Tokyo 1892 / Korea East Belt". So when "gt_wkt_srs.cpp" calls this: "if( oVertSRS.importFromEPSG( verticalCSType ) == OGRERR_NONE )"
ogr_fromespg.cpp gets a hit with this:
"SetEPSGProjCS( this, nCode );"
without ever trying this:
"SetEPSGVertCS( this, nCode )"
The end result is that the returned Vertical Datum info is dreck. Based upon the setup of the "importFromEPSG" function this will happen any time the Vertical CS tag value is also a valid ProjCS tag value.
I don't see an easy workaround here short of eliminating the conflicting lines in pcs.csv - since EGM96 support is more important to me than Tokyo 1892. But it seems to me that importFromEPSG code ought to be able to accept "hints" so that gt_wkt_srs could explicitly tell it to look for matches in Vertical CS first.