<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">Le 21/03/2024 à 21:45, Conrad Bielski
via gdal-dev a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:1045195440.383478.1711053927068@mail.yahoo.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div class="yahoo-style-wrap"
style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
<div dir="ltr" data-setdir="false">
<div>Hello GDALers,<br>
<br>
I have a question about reading USGS 3DEP (3D Elevation
Program) data. Inside of this data, a GEOTIFF tag 42114 is
provided which is causing problems with datum shifts.<br>
</div>
</div>
</div>
</blockquote>
<p>There's no such thing as a GEOTIFF tag 42114.</p>
<p>The closest tags are:<br>
</p>
<p>#define TIFFTAG_GDAL_METADATA 42112<br>
#define TIFFTAG_GDAL_NODATA 42113<br>
</p>
<p>It would be helpuful if you could provide the file, or the result
of a "tiffdump -m 1000 the.tif" and "listgeo the.tif" on it.</p>
<p>And was the .tif.aux.xml provided with the TIFF, or computed by
GDAL. Because the information might come from it too.<br>
</p>
<blockquote type="cite"
cite="mid:1045195440.383478.1711053927068@mail.yahoo.com">
<div class="yahoo-style-wrap"
style="font-family:Helvetica Neue, Helvetica, Arial, sans-serif;font-size:16px;">
<div dir="ltr" data-setdir="false">
<div><br>
So when I use GDAL to compute the datum shifts, the tag is
read and interprets that the DEM is showing elevation in
'feet' while the DEM is actually in metres. The DEMs are in
fact in meter elevations and meter UTM horizontal
coordinates. This is obviously erroneously integrated into
the tag.<br>
<br>
So my question is whether anyone has come across this issue
and found a solution? Is there a way to edit the offending
tag so that it is correctly interpreted as metres instead of
feet? Other potential solutions so that GDAL interprets the
elevation correctly?<br>
<br>
Thanks in advance for your help. I provide below the output
of gdalinfo which I hope could help with the offending info
in bold.<br>
<br>
Have a great day,<br>
Conrad<br>
<br>
</div>
<br>
</div>
<div><br>
</div>
<div><br>
</div>
<div dir="ltr" data-setdir="false">
<div>Driver: GTiff/GeoTIFF<br>
Files:
I:\v3_us_3dep\asheville\ashevilleUSGS_1M_17_x34y392_NC_Phase5_2018_A18.tif<br>
I:\v3_us_3dep\asheville\ashevilleUSGS_1M_17_x34y392_NC_Phase5_2018_A18.tif.aux.xml<br>
Size is 10012, 10012<br>
Coordinate System is:<br>
PROJCRS["NAD83 / UTM zone 17N",<br>
BASEGEOGCRS["NAD83",<br>
DATUM["North American Datum 1983",<br>
ELLIPSOID["GRS 1980",6378137,298.257222101,<br>
LENGTHUNIT["metre",1]]],<br>
PRIMEM["Greenwich",0,<br>
ANGLEUNIT["degree",0.0174532925199433]],<br>
ID["EPSG",4269]],<br>
CONVERSION["UTM zone 17N",<br>
METHOD["Transverse Mercator",<br>
ID["EPSG",9807]],<br>
PARAMETER["Latitude of natural origin",0,<br>
ANGLEUNIT["degree",0.0174532925199433],<br>
ID["EPSG",8801]],<br>
PARAMETER["Longitude of natural origin",-81,<br>
ANGLEUNIT["degree",0.0174532925199433],<br>
ID["EPSG",8802]],<br>
PARAMETER["Scale factor at natural origin",0.9996,<br>
SCALEUNIT["unity",1],<br>
ID["EPSG",8805]],<br>
PARAMETER["False easting",500000,<br>
LENGTHUNIT["metre",1],<br>
ID["EPSG",8806]],<br>
PARAMETER["False northing",0,<br>
LENGTHUNIT["metre",1],<br>
ID["EPSG",8807]]],<br>
CS[Cartesian,2],<br>
AXIS["(E)",east,<br>
ORDER[1],<br>
LENGTHUNIT["metre",1]],<br>
AXIS["(N)",north,<br>
ORDER[2],<br>
LENGTHUNIT["metre",1]],<br>
USAGE[<br>
SCOPE["Engineering survey, topographic mapping."],<br>
AREA["North America - between 84°W and 78°W -
onshore and offshore. Canada - Nunavut; Ontario; Quebec.
United States (USA) - Florida; Georgia; Kentucky; Maryland;
Michigan; New York; North Carolina; Ohio; Pennsylvania;
South Carolina; Tennessee; Virginia; West Virginia."],<br>
BBOX[23.81,-84,84,-78]],<br>
ID["EPSG",26917]]<br>
Data axis to CRS axis mapping: 1,2<br>
Origin = (339993.999958705157042,3920005.999981591943651)<br>
Pixel Size = (1.000000000000000,-1.000000000000000)<br>
Metadata:<br>
AREA_OR_POINT=Area<br>
Image Structure Metadata:<br>
COMPRESSION=LZW<br>
INTERLEAVE=BAND<br>
LAYOUT=COG<br>
PREDICTOR=3<br>
Corner Coordinates:<br>
Upper Left ( 339994.000, 3920006.000) ( 82d45'43.98"W,
35d24'38.21"N)<br>
Lower Left ( 339994.000, 3909994.000) ( 82d45'36.92"W,
35d19'13.36"N)<br>
Upper Right ( 350006.000, 3920006.000) ( 82d39' 7.17"W,
35d24'43.82"N)<br>
Lower Right ( 350006.000, 3909994.000) ( 82d39' 0.55"W,
35d19'18.95"N)<br>
Center ( 345000.000, 3915000.000) ( 82d42'22.15"W,
35d21'58.63"N)<br>
Band 1 Block=512x512 Type=Float32, ColorInterp=Gray<br>
Min=669.509 Max=1604.949 <br>
Minimum=669.509, Maximum=1604.949, Mean=988.295,
StdDev=159.804<br>
NoData Value=-999999<br>
Overviews: 5006x5006, 2503x2503, 1251x1251, 625x625,
312x312<br>
<b>Unit Type: US survey foot</b><br>
Metadata:<br>
STATISTICS_APPROXIMATE=YES<br>
STATISTICS_MAXIMUM=1604.9490966797<br>
STATISTICS_MEAN=988.29463693706<br>
STATISTICS_MINIMUM=669.50915527344<br>
STATISTICS_STDDEV=159.80361228109<br>
STATISTICS_VALID_PERCENT=100</div>
</div>
<div dir="ltr" data-setdir="false"><br>
</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</body>
</html>