<div dir="ltr"><div>Thanks!</div><div><br></div>That should work in this case to build the virtual raster.  I'm still curious about assigning the vertical datum to the rasters.<div><br></div><div>Doug</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 9, 2015 at 1:48 AM, Hermann Peifer <span dir="ltr"><<a href="mailto:peifer@gmx.eu" target="_blank">peifer@gmx.eu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
About your initial problem:<span class=""><br>
> but gdalbuildvrt complained, informing me that<br>
> they were not in the same projection.<br>
<br></span>
What about using the below gdalbuildvrt option?<br>
<br>
Hermann<br>
<br>
-allow_projection_difference:<br>
(starting with GDAL 1.7.0) When this option is specified, the utility will accept to make a VRT even if the input datasets have not the same projection. Note: this does not mean that they will be reprojected. Their projection will just be ignored.<br>
<br>
Source: <a href="http://www.gdal.org/gdalbuildvrt.html" target="_blank">http://www.gdal.org/gdalbuildvrt.html</a><div><div class="h5"><br>
<br>
<br>
On 2015-06-08 21:01, Newcomb, Doug wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Hi Folks,<br>
I have a directory of 783 .img format Lidar - based  DEMs in the same<br>
projection, North Carolina State Plane  Feet (2011) , NAD 83 , NVD88.  I<br>
was going to use gdalbuildvrt to create a single virtual image for the<br>
area, but gdalbuildvrt complained, informing me that they were not in<br>
the same projection.<br>
<br>
A couple of quick bash scripts/commands<br>
<br>
for x in *.img; do gdalinfo $x >>img_info.txt;done<br>
<br>
and<br>
grep PROJCS img_info.txt|sort|uniq -c<br>
<br>
gives me the following:<br>
<br>
     437 PROJCS["NAD_1983_2011_StatePlane_North_Carolina_FIPS_3200_Ft_US",<br>
     346 PROJCS["NAD_1983_StatePlane_North_Carolina_FIPS_3200_Feet_2011",<br>
<br>
gdalinfo gives the following for each type of file ( origin section<br>
clipped out) :<br>
<br>
Driver: HFA/Erdas Imagine Images (.img)<br>
Files: D05_37_20878102_20141231.img<br>
        D05_37_20878102_20141231.img.aux.xml<br>
Size is 1000, 1000<br>
Coordinate System is:<br>
PROJCS["NAD_1983_2011_StatePlane_North_Carolina_FIPS_3200_Ft_US",<br>
     GEOGCS["GCS_NAD_1983_2011",<br>
         DATUM["NAD_1983_2011",<br>
             SPHEROID["GRS_1980",6378137.0,298.257222101]],<br>
         PRIMEM["Greenwich",0.0],<br>
         UNIT["Degree",0.017453292519943295]],<br>
     PROJECTION["Lambert_Conformal_Conic_2SP"],<br>
     PARAMETER["False_Easting",2000000.0],<br>
     PARAMETER["False_Northing",0.0],<br>
     PARAMETER["Central_Meridian",-79.0],<br>
     PARAMETER["Standard_Parallel_1",34.3333333333333],<br>
     PARAMETER["Standard_Parallel_2",36.1666666666667],<br>
     PARAMETER["Latitude_Of_Origin",33.75],<br>
     UNIT["Foot_US",0.30480060960121924],<br>
     VERTCS["NAVD_1988_Foot_US",<br>
         VDATUM["North_American_Vertical_Datum_1988"],<br>
         PARAMETER["Vertical_Shift",0.0],<br>
         PARAMETER["Direction",1.0],<br>
         UNIT["Foot_US",0.3048006096012192]]]<br>
<br>
<br>
Driver: HFA/Erdas Imagine Images (.img)<br>
Files: D05_37_20957301_20141231.img<br>
        D05_37_20957301_20141231.img.aux.xml<br>
Size is 1000, 1000<br>
Coordinate System is:<br>
PROJCS["NAD_1983_StatePlane_North_Carolina_FIPS_3200_Feet_2011",<br>
     GEOGCS["GCS_NAD_1983_2011",<br>
         DATUM["NAD_1983_2011",<br>
             SPHEROID["GRS_1980",6378137.0,298.257222101]],<br>
         PRIMEM["Greenwich",0.0],<br>
         UNIT["Degree",0.0174532925199433]],<br>
     PROJECTION["Lambert_Conformal_Conic_2SP"],<br>
     PARAMETER["False_Easting",2000000.002616666],<br>
     PARAMETER["False_Northing",0.0],<br>
     PARAMETER["Central_Meridian",-79.0],<br>
     PARAMETER["Standard_Parallel_1",34.33333333333334],<br>
     PARAMETER["Standard_Parallel_2",36.16666666666666],<br>
     PARAMETER["Latitude_Of_Origin",33.75],<br>
     UNIT["Foot_US",0.30480060960121924],<br>
     VERTCS["NAVD_1988_Foot_US",<br>
         VDATUM["North_American_Vertical_Datum_1988"],<br>
         PARAMETER["Vertical_Shift",0.0],<br>
         PARAMETER["Direction",1.0],<br>
         UNIT["Foot_US",0.3048006096012192]]]<br>
<br>
<br>
<br>
In theory, these should all be EPSG:6543, so just assigning the correct<br>
  horizontal projection/datum with the epsg code should make things<br>
usable. (i.e,<br>
gdal_translate -a_"srs epsg:6543" --config GDAL_CACHEMAX 512 -of GTiff<br>
-co COMPRESS=DEFLATE -co PREDICTOR=3 in.img out.tif )  ( Thank you for<br>
the EPSG:6543 projection support in GDAL 2.0!)<br>
<br>
However, this only assigns the horizontal infomation, how does one<br>
assign a vertical datum with a horizontal EPSG code?<br>
<br>
I see the NVD88 code in vertcs.csv , but how would I implement it in the<br>
above command?<br>
<br>
Using gdal 2.0 Beta2<br>
<br>
<br>
Doug<br>
--<br>
Doug Newcomb<br>
USFWS<br>
Raleigh, NC<br></div></div>
919-856-4520 ext. 14 <a href="mailto:doug_newcomb@fws.gov" target="_blank">doug_newcomb@fws.gov</a> <mailto:<a href="mailto:doug_newcomb@fws.gov" target="_blank">doug_newcomb@fws.gov</a>><span class=""><br>
---------------------------------------------------------------------------------------------------------<br>
The opinions I express are my own and are not representative of the<br>
official policy of the U.S.Fish and Wildlife Service or Dept. of the<br>
Interior.   Life is too short for undocumented, proprietary data formats.<br>
<br>
<br></span>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
<br>
</blockquote>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div>Doug Newcomb</div><div>USFWS</div><div>Raleigh, NC</div><div>919-856-4520 ext. 14 <a href="mailto:doug_newcomb@fws.gov" target="_blank">doug_newcomb@fws.gov</a></div><div>---------------------------------------------------------------------------------------------------------</div><div>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.</div></div>
</div>