<div dir="ltr"><div>Evan,</div>I went back and checked.  The .aux.xml sidecar files  with the img files do not appear to have projection information.<div><br></div><div>Doug</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jun 9, 2015 at 9:32 AM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Selon "Newcomb, Doug" <<a href="mailto:doug_newcomb@fws.gov">doug_newcomb@fws.gov</a>>:<br>
<span class=""><br>
> Thanks!<br>
><br>
> That should work in this case to build the virtual raster.  I'm still<br>
> curious about assigning the vertical datum to the rasters.<br>
<br>
</span>Doug,<br>
<br>
I'm a bit surprised that the HFA driver reports a SRS with a VERTCS node as a<br>
child of the PROJCS node. I believe this is an incorrect WKT definition. There<br>
should rather be a COMPD_CS root note with 2 children: a PROJCS node for the<br>
horizontal CRS and a VERTCS node for the vertical CRS. Perhaps this SRS string<br>
is defined in the .aux.xml sidecar files that are apparently present ?<br>
<br>
Regarding your question, there are a few EPSG codes that correspond to<br>
aCOMPD_CS, for example 6349. Otherwise, GDAL allows to build a custom COMPD_CS<br>
with the syntax EPSG:XXXX+YYYY where XXXX is the EPSG code of the horizontal SRS<br>
and YYYY the EPSG code of the vertical SRS. In your case that should be<br>
EPSG:6543+5703 I think<br>
<br>
So you can do things like "gdal_translate in.tif out.tif -a_srs EPSG:6543+5703"<br>
<br>
If you read back out.tif, you will only get the horizontal SRS by default. This<br>
was for backward compatibility reason I think. But if you specify "--config<br>
GTIFF_REPORT_COMPD_CS YES" you will get the COMPD_CS.<br>
<br>
Even<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> Doug<br>
><br>
> On Tue, Jun 9, 2015 at 1:48 AM, Hermann Peifer <<a href="mailto:peifer@gmx.eu">peifer@gmx.eu</a>> wrote:<br>
><br>
> ><br>
> > About your initial problem:<br>
> > > but gdalbuildvrt complained, informing me that<br>
> > > they were not in the same projection.<br>
> ><br>
> > 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<br>
> > accept to make a VRT even if the input datasets have not the same<br>
> > projection. Note: this does not mean that they will be reprojected. Their<br>
> > 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><br>
> ><br>
> ><br>
> ><br>
> > On 2015-06-08 21:01, Newcomb, Doug wrote:<br>
> ><br>
> >> 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>
> >> 919-856-4520 ext. 14 <a href="mailto:doug_newcomb@fws.gov">doug_newcomb@fws.gov</a> <mailto:<a href="mailto:doug_newcomb@fws.gov">doug_newcomb@fws.gov</a>><br>
> >><br>
> >><br>
><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>
> >> _______________________________________________<br>
> >> gdal-dev mailing list<br>
> >> <a href="mailto:gdal-dev@lists.osgeo.org">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>
> >><br>
> ><br>
><br>
><br>
> --<br>
> Doug Newcomb<br>
> USFWS<br>
> Raleigh, NC<br>
> 919-856-4520 ext. 14 <a href="mailto:doug_newcomb@fws.gov">doug_newcomb@fws.gov</a><br>
><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>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a><br>
</font></span></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>