[Liblas-commits] hg: add backward compatability for original spec
vertical cs cod...
liblas-commits at liblas.org
liblas-commits at liblas.org
Fri Jan 15 23:57:12 EST 2010
changeset 4021e1c06b5f in /Volumes/Data/www/liblas.org/hg
details: http://hg.liblas.orghg?cmd=changeset;node=4021e1c06b5f
summary: add backward compatability for original spec vertical cs codes (libgeotiff #24)
diffstat:
src/gt_wkt_srs.cpp | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diffs (26 lines):
diff -r a87ed509c137 -r 4021e1c06b5f src/gt_wkt_srs.cpp
--- a/src/gt_wkt_srs.cpp Thu Jan 14 00:26:14 2010 +0000
+++ b/src/gt_wkt_srs.cpp Fri Jan 15 23:56:55 2010 -0500
@@ -665,6 +665,22 @@
strcpy( citation, "unknown" );
/* -------------------------------------------------------------------- */
+/* The original geotiff specification appears to have */
+/* misconstrued the EPSG codes 5101 to 5106 to be vertical */
+/* coordinate system codes, when in fact they are vertical */
+/* datum codes. So if these are found in the */
+/* VerticalCSTypeGeoKey move them to the VerticalDatumGeoKey */
+/* and insert the "normal" corresponding VerticalCSTypeGeoKey */
+/* value. */
+/* -------------------------------------------------------------------- */
+ if( (verticalCSType >= 5101 && verticalCSType <= 5112)
+ && verticalDatum == -1 )
+ {
+ verticalDatum = verticalCSType;
+ verticalCSType = verticalDatum + 600;
+ }
+
+/* -------------------------------------------------------------------- */
/* Promote to being a compound coordinate system. */
/* -------------------------------------------------------------------- */
OGR_SRSNode *poOldRoot = oSRS.GetRoot()->Clone();
More information about the Liblas-commits
mailing list