[gdal-dev] BAG Driver - dimension size being written in the wrong order
Eric Younkin - NOAA Federal
eric.g.younkin at noaa.gov
Fri Mar 19 10:25:08 PDT 2021
Thanks Even!
On Fri, Mar 19, 2021 at 1:22 PM Even Rouault <even.rouault at spatialys.com>
wrote:
> Eric,
>
> I believe you're right. I've just fixed the issue by changing the template
> resource XML file used by the GDAL driver in
>
>
> https://github.com/OSGeo/gdal/commit/1d2e7bc8fcde059de853335fee390479d457be06
>
> So you can easily workaround the issue by updating this file in your
> existing installation.
>
> For a next time, better file an issue at
> https://github.com/OSGeo/gdal/issues 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.
>
> Even
> Le 19/03/2021 à 17:51, Eric Younkin - NOAA Federal via gdal-dev a écrit :
>
> Hello,
>
> Using conda installed GDAL 3.2.1
>
> 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.
>
> <gmd:axisDimensionProperties>
> <gmd:MD_Dimension>
> <gmd:dimensionName>
> <gmd:MD_DimensionNameTypeCode codeList="
> http://www.isotc211.org/2005/resources/Codelist/gmxCodelists.xml#MD_DimensionNameTypeCode"
> codeListValue="row">row</gmd:MD_DimensionNameTypeCode>
> </gmd:dimensionName>
>
>
> * <gmd:dimensionSize> <gco:Integer>546</gco:Integer>
> </gmd:dimensionSize>*
> <gmd:resolution>
> <gco:Measure uom="m">2.0</gco:Measure>
> </gmd:resolution>
> </gmd:MD_Dimension>
> </gmd:axisDimensionProperties>
>
> 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.
>
> Seems like a relatively simple fix (assuming I am right about this),
> please let me know if I need to submit it somewhere else.
>
> Thanks,
> Eric
>
> --
> Eric Younkin
> Physical Scientist
> NOAA OCS, Hydrographic Systems and Technology Branch
> 1315 East-West Highway
> N/CS11, Room 6604
> Silver Spring, MD 20910
> Office: 240-847-8208
> Cell: 828-331-8197
>
> _______________________________________________
> gdal-dev mailing listgdal-dev at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>
--
Eric Younkin
Physical Scientist
NOAA OCS, Hydrographic Systems and Technology Branch
1315 East-West Highway
N/CS11, Room 6604
Silver Spring, MD 20910
Office: 240-847-8208
Cell: 828-331-8197
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210319/324f37ea/attachment.html>
More information about the gdal-dev
mailing list