<div dir="ltr">Thanks Even!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Mar 19, 2021 at 1:22 PM Even Rouault <<a href="mailto:even.rouault@spatialys.com">even.rouault@spatialys.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Eric,</p>
<p>I believe you're right. I've just fixed the issue by changing the
template resource XML file used by the GDAL driver in</p>
<p><a href="https://github.com/OSGeo/gdal/commit/1d2e7bc8fcde059de853335fee390479d457be06" target="_blank">https://github.com/OSGeo/gdal/commit/1d2e7bc8fcde059de853335fee390479d457be06</a></p>
<p>So you can easily workaround the issue by updating this file in
your existing installation.</p>
<p>For a next time, better file an issue at
<a href="https://github.com/OSGeo/gdal/issues" target="_blank">https://github.com/OSGeo/gdal/issues</a> however. This will minimize
the risk that your report is lost because nobody was able to
address it at the very moment where they read it.</p>
<p>Even<br>
</p>
<div>Le 19/03/2021 à 17:51, Eric Younkin -
NOAA Federal via gdal-dev a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello,
<div><br>
</div>
<div>Using conda installed GDAL 3.2.1</div>
<div><br>
</div>
<div>I think I've stumbled on a bug with the BAG driver. It
seems as though when you use Create() to make a BAG, it writes
the dimensionSize xml attribute in the wrong order. It sets
the column dimension size to the row dimensionSize xml
attribute, and row to column. I found this on examining the
xml manually, see blob below.</div>
<div><br>
</div>
<div><gmd:axisDimensionProperties><br>
<gmd:MD_Dimension><br>
<gmd:dimensionName><br>
<gmd:MD_DimensionNameTypeCode codeList="<a href="http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_DimensionNameTypeCode" target="_blank">http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_DimensionNameTypeCode</a>"
codeListValue="row">row</gmd:MD_DimensionNameTypeCode><br>
</gmd:dimensionName><br>
<b> <gmd:dimensionSize><br>
<gco:Integer>546</gco:Integer><br>
</gmd:dimensionSize></b><br>
<gmd:resolution><br>
<gco:Measure uom="m">2.0</gco:Measure><br>
</gmd:resolution><br>
</gmd:MD_Dimension><br>
</gmd:axisDimensionProperties></div>
<div><br>
</div>
<div>This bug does not affect viewing the BAG in QGIS, as it
seems like QGIS just computes the size using the actual
array. I found that GDAL created BAGs would not load in
Caris, a software for viewing bathymetric data. I believe
that is because Caris is using the dimensionSize xml instead
of calculating size from the data. If I swap row/col
dimensionSize, the BAG then works in Caris.</div>
<div><br>
</div>
<div>Seems like a relatively simple fix (assuming I am right
about this), please let me know if I need to submit it
somewhere else.</div>
<div><br>
</div>
<div>Thanks,<br>
Eric<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr">
<div dir="ltr"><span><font color="#0000ff">Eric Younkin<br>
Physical Scientist<br>
</font></span></div>
<div dir="ltr"><span><font color="#0000ff">NOAA OCS, </font></span><span style="color:rgb(0,0,255);font-size:12.8px">Hydrographic Systems and
Technology Branch</span></div>
<div dir="ltr"><span><font color="#0000ff">1315 East-West
Highway</font></span></div>
<div dir="ltr"><span><font color="#0000ff">N/CS11, Room 6604<br>
Silver Spring, MD 20910</font></span></div>
<div><span><font color="#0000ff">Office: </font></span><span style="font-family:arial,sans,sans-serif;font-size:13px;white-space:pre-wrap"><font color="#0000ff">240-847-8208</font></span></div>
<div dir="ltr"><span><font color="#0000ff">
Cell: 828-331-8197</font><br>
</span></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span><font color="#0000ff">Eric Younkin<br>Physical Scientist<br></font></span></div><div dir="ltr"><span><font color="#0000ff">NOAA OCS, </font></span><span style="color:rgb(0,0,255);font-size:12.8px">Hydrographic Systems and Technology Branch</span></div><div dir="ltr"><span><font color="#0000ff">1315 East-West Highway</font></span></div><div dir="ltr"><span><font color="#0000ff">N/CS11, Room 6604<br>Silver Spring, MD 20910</font></span></div><div><span><font color="#0000ff">Office: </font></span><span style="font-family:arial,sans,sans-serif;font-size:13px;white-space:pre-wrap"><font color="#0000ff">240-847-8208</font></span></div><div dir="ltr"><span><font color="#0000ff">
Cell: 828-331-8197</font><br>
</span></div></div></div></div></div></div></div></div></div></div></div></div>