-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
There are a number of related issues about inconsistent metadata, e.g #277
Here is a different case where the metadata (geotransform) seems OK (nearly identical), but tiff values are quite different compared to the source data.
This pipeline https://github.com/stactools-packages/threedep just deals with creating metadata, is the pipeline for COG creation also public? It's not obvious to me why these values would differ by several meters... It would be good in the pipeline to verify the values are equivalent.
# Illustration of discrepance between USGS & PC 10m 3DEP products
import xarray as xr
import rasterio
uri = 'https://prd-tnm.s3.amazonaws.com/StagedProducts/Elevation/13/TIFF/current/n39w107/USGS_13_n39w107.tif'
with rasterio.Env(GDAL_DISABLE_READDIR_ON_OPEN='EMPTY_DIR',
AWS_NO_SIGN_REQUEST='YES'):
daUSGS = xr.open_dataarray(uri, engine='rasterio').squeeze().isel(x=slice(0, 256), y=slice(0, 256)).load()
uri = 'https://ai4edataeuwest.blob.core.windows.net/3dep/Elevation/13/TIFF/n39w107/USGS_13_n39w107.tif'
with rasterio.Env(GDAL_DISABLE_READDIR_ON_OPEN='EMPTY_DIR',
VSICURL_PC_URL_SIGNING='YES'):
daPC = xr.open_dataarray(uri, engine='rasterio').squeeze().isel(x=slice(0, 256), y=slice(0, 256)).load()
xr.testing.assert_allclose(daUSGS, daPC)AssertionError: Left and right DataArray objects are not close
Differing values:
L
array([[3099.971 , 3104.6487, 3108.4382, ..., 3607.6433, 3609.839 , 3612.1143],
R
array([[3105.152 , 3106.3528, 3108.317 , ..., 3617.3018, 3618.7676, 3619.058 ],
...Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels