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
. Looking at the file, we do indeed have 60900.000 for the left-most bound. Is this pretty clearly a case of the metadata file being wrong, which should be reported to USGS? Or might rasterio / GDAL be doing something wrong? Or might stactool's derivation of proj:bbox failing to take something into account? Any help would be appreciated.
The text was updated successfully, but these errors were encountered:
The USGS docs (pdf) specify that those corner coordinates are center of pixel:
But GDAL geotransforms are measured to the corner of the pixel. So stactools is wrong, it needs to subtract/add half a pixel to get the correct bounding box.
TomAugspurger
changed the title
Disagreement between stactools and rasterio for landsat8-c2-l2 item
landsat8-c2-l2 proj:bbox is off by a half-pixel
May 28, 2021
Hi all, looking for some debugging help here.
We have an item, https://planetarycomputer.microsoft.com/api/stac/v1/collections/landsat-8-c2-l2/items/LC08_L2SP_231060_20200112_20200823_02_T1, where the
proj:bbox
doesn't match what's given by rasterio:The bounds seem to be off by 15, half a pixel.
https://gist.github.com/TomAugspurger/cf5cdc4d6e94ec3757411dadae6e8558 has the XML MTL file for this item. IIUC, we get
proj:bbox
atstactools/stactools_landsat/stactools/landsat/mtl_metadata.py
Lines 96 to 120 in 0e7509b
60900.000
for the left-most bound. Is this pretty clearly a case of the metadata file being wrong, which should be reported to USGS? Or might rasterio / GDAL be doing something wrong? Or might stactool's derivation ofproj:bbox
failing to take something into account? Any help would be appreciated.The text was updated successfully, but these errors were encountered: