<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">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" class="gmail_signature" data-smartmail="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></div></div>