[gdal-dev] assigning vertical datum to image files
Newcomb, Doug
doug_newcomb at fws.gov
Mon Jun 8 12:01:49 PDT 2015
Hi Folks,
I have a directory of 783 .img format Lidar - based DEMs in the same
projection, North Carolina State Plane Feet (2011) , NAD 83 , NVD88. I
was going to use gdalbuildvrt to create a single virtual image for the
area, but gdalbuildvrt complained, informing me that they were not in the
same projection.
A couple of quick bash scripts/commands
for x in *.img; do gdalinfo $x >>img_info.txt;done
and
grep PROJCS img_info.txt|sort|uniq -c
gives me the following:
437 PROJCS["NAD_1983_2011_StatePlane_North_Carolina_FIPS_3200_Ft_US",
346 PROJCS["NAD_1983_StatePlane_North_Carolina_FIPS_3200_Feet_2011",
gdalinfo gives the following for each type of file ( origin section clipped
out) :
Driver: HFA/Erdas Imagine Images (.img)
Files: D05_37_20878102_20141231.img
D05_37_20878102_20141231.img.aux.xml
Size is 1000, 1000
Coordinate System is:
PROJCS["NAD_1983_2011_StatePlane_North_Carolina_FIPS_3200_Ft_US",
GEOGCS["GCS_NAD_1983_2011",
DATUM["NAD_1983_2011",
SPHEROID["GRS_1980",6378137.0,298.257222101]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.017453292519943295]],
PROJECTION["Lambert_Conformal_Conic_2SP"],
PARAMETER["False_Easting",2000000.0],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",-79.0],
PARAMETER["Standard_Parallel_1",34.3333333333333],
PARAMETER["Standard_Parallel_2",36.1666666666667],
PARAMETER["Latitude_Of_Origin",33.75],
UNIT["Foot_US",0.30480060960121924],
VERTCS["NAVD_1988_Foot_US",
VDATUM["North_American_Vertical_Datum_1988"],
PARAMETER["Vertical_Shift",0.0],
PARAMETER["Direction",1.0],
UNIT["Foot_US",0.3048006096012192]]]
Driver: HFA/Erdas Imagine Images (.img)
Files: D05_37_20957301_20141231.img
D05_37_20957301_20141231.img.aux.xml
Size is 1000, 1000
Coordinate System is:
PROJCS["NAD_1983_StatePlane_North_Carolina_FIPS_3200_Feet_2011",
GEOGCS["GCS_NAD_1983_2011",
DATUM["NAD_1983_2011",
SPHEROID["GRS_1980",6378137.0,298.257222101]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Lambert_Conformal_Conic_2SP"],
PARAMETER["False_Easting",2000000.002616666],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",-79.0],
PARAMETER["Standard_Parallel_1",34.33333333333334],
PARAMETER["Standard_Parallel_2",36.16666666666666],
PARAMETER["Latitude_Of_Origin",33.75],
UNIT["Foot_US",0.30480060960121924],
VERTCS["NAVD_1988_Foot_US",
VDATUM["North_American_Vertical_Datum_1988"],
PARAMETER["Vertical_Shift",0.0],
PARAMETER["Direction",1.0],
UNIT["Foot_US",0.3048006096012192]]]
In theory, these should all be EPSG:6543, so just assigning the correct
horizontal projection/datum with the epsg code should make things usable.
(i.e,
gdal_translate -a_"srs epsg:6543" --config GDAL_CACHEMAX 512 -of GTiff -co
COMPRESS=DEFLATE -co PREDICTOR=3 in.img out.tif ) ( Thank you for the
EPSG:6543 projection support in GDAL 2.0!)
However, this only assigns the horizontal infomation, how does one assign a
vertical datum with a horizontal EPSG code?
I see the NVD88 code in vertcs.csv , but how would I implement it in the
above command?
Using gdal 2.0 Beta2
Doug
--
Doug Newcomb
USFWS
Raleigh, NC
919-856-4520 ext. 14 doug_newcomb at fws.gov
---------------------------------------------------------------------------------------------------------
The opinions I express are my own and are not representative of the
official policy of the U.S.Fish and Wildlife Service or Dept. of the
Interior. Life is too short for undocumented, proprietary data formats.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20150608/106dc945/attachment.html>
More information about the gdal-dev
mailing list