You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GDALRasterSource, using these bindings, throws an error when attempting to read metadata for files that use the PAM xml metadata specification.
Open a GeoTrellis 3.5.1+ SBT console:
cd path/to/geotrellis
./sbt "project gdal"> console
Then try to read metadata of a tiff with external PAM metadata using GDALRasterSource
scala>importgeotrellis.raster.gdal.GDALRasterSource
scala>valrs=GDALRasterSource("s3://aviris-data/test/f130329t01p00r06_corr_v1.tiff")
scala> rs.metadata
geotrellis.raster.gdal.MalformedProjectionException:Unable to get the metadata. GDALErrorCode:1
at geotrellis.raster.gdal.GDALDataset$.getMetadata$extension3(GDALDataset.scala:73)
at geotrellis.raster.gdal.GDALDataset$.$anonfun$getMetadata$1(GDALDataset.scala:61)
at scala.collection.immutable.List.map(List.scala:293)
at geotrellis.raster.gdal.GDALDataset$.getMetadata$extension1(GDALDataset.scala:61)
at geotrellis.raster.gdal.GDALMetadata$.apply(GDALMetadata.scala:49)
at geotrellis.raster.gdal.GDALRasterSource.metadata$lzycompute(GDALRasterSource.scala:59)
at geotrellis.raster.gdal.GDALRasterSource.metadata(GDALRasterSource.scala:59)
... 36 elided
I'm able to read all metadata for this COG with gdalinfo, the Python GDAL bindings, and Rasterio. For example, gdalinfo /vsis3/aviris-data/test/f130329t01p00r06_corr_v1.tiff prints all metadata contained in associated xml file.
The text was updated successfully, but these errors were encountered:
It looks like the issue happens on this line when we try to access band 0 metadata:
importgeotrellis.raster.gdal._valds=GDALDataset("/vsis3/aviris-data/test/f130329t01p00r06_corr_v1.tiff")
ds.getAllMetadata(GDALDataset.SOURCE, 0)
//> geotrellis.raster.gdal.MalformedProjectionException: Unable to get the metadata. GDAL Error Code: 1// at geotrellis.raster.gdal.GDALDataset$.getMetadata$extension3(GDALDataset.scala:73)// at geotrellis.raster.gdal.GDALDataset$.getMetadata$extension2(GDALDataset.scala:63)// at geotrellis.raster.gdal.GDALDataset$.$anonfun$getAllMetadata$1(GDALDataset.scala:37)// at scala.collection.immutable.List.map(List.scala:293)// at geotrellis.raster.gdal.GDALDataset$.getAllMetadata$extension1(GDALDataset.scala:37)// ... 36 elided
GDALRasterSource, using these bindings, throws an error when attempting to read metadata for files that use the PAM xml metadata specification.
Open a GeoTrellis 3.5.1+ SBT console:
Then try to read metadata of a tiff with external PAM metadata using GDALRasterSource
See:
I'm able to read all metadata for this COG with gdalinfo, the Python GDAL bindings, and Rasterio. For example,
gdalinfo /vsis3/aviris-data/test/f130329t01p00r06_corr_v1.tiff
prints all metadata contained in associated xml file.The text was updated successfully, but these errors were encountered: