Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GTI: make the driver work with STAC GeoParquet files that don't have a assets.image.href field #11319

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

rouault
Copy link
Member

@rouault rouault commented Nov 20, 2024

Fixes #11317

Note that this fixes the GTI issue only. But https://planetarycomputer.microsoft.com/api/stac/v1/collections/io-lulc-annual-v02/items/60L-2017 references files such as https://ai4edataeuwest.blob.core.windows.net/io-lulc/io-annual-lulc-v02/60L_20170101-20180101.tif that require authentication, and the driver has no clue how to do that

@rouault rouault added backport release/3.10 Backport to release/3.10 branch funded through GSP Work funded through the GDAL Sponsorship Program labels Nov 20, 2024
@scottyhq
Copy link
Contributor

references files such as https://ai4edataeuwest.blob.core.windows.net/io-lulc/io-annual-lulc-v02/60L_20170101-20180101.tif that require authentication, and the driver has no clue how to do that

At least for planetary computer data there is already an environment variable for url signing... but not sure at first glance of an existing way to either modify asset hrefs on the fly or apply environment variable settings to the items within a catalog rather than the catalog itself?

GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR \
VSICURL_PC_URL_SIGNING=YES \
gdalinfo /vsicurl/https://ai4edataeuwest.blob.core.windows.net/io-lulc/io-annual-lulc-v02/60L_20170101-20180101.tif

@rouault
Copy link
Member Author

rouault commented Nov 21, 2024

At least for planetary computer data there is already an environment variable for url signing

Doh, I almost forgot I code that thing...
ok, so putting all pieces together:

$ GDAL_DISABLE_READDIR_ON_OPEN=EMPTY_DIR VSICURL_PC_URL_SIGNING=YES AZURE_STORAGE_ACCOUNT=pcstacitems AZURE_STORAGE_SAS_TOKEN=`curl -s https://planetarycomputer.microsoft.com/api/sas/v1/token/pcstacitems/items | jq -r '.token'` gdalinfo GTI:/vsiaz/items/io-lulc-annual-v02.parquet  -oo SRS=EPSG:4326
Driver: GTI/GDAL Raster Tile Index
Files: none associated
Size is 112521, 51274
Coordinate System is:
GEOGCRS["WGS 84",
    ENSEMBLE["World Geodetic System 1984 ensemble",
        MEMBER["World Geodetic System 1984 (Transit)"],
        MEMBER["World Geodetic System 1984 (G730)"],
        MEMBER["World Geodetic System 1984 (G873)"],
        MEMBER["World Geodetic System 1984 (G1150)"],
        MEMBER["World Geodetic System 1984 (G1674)"],
        MEMBER["World Geodetic System 1984 (G1762)"],
        MEMBER["World Geodetic System 1984 (G2139)"],
        MEMBER["World Geodetic System 1984 (G2296)"],
        ELLIPSOID["WGS 84",6378137,298.257223563,
            LENGTHUNIT["metre",1]],
        ENSEMBLEACCURACY[2.0]],
    PRIMEM["Greenwich",0,
        ANGLEUNIT["degree",0.0174532925199433]],
    CS[ellipsoidal,2],
        AXIS["geodetic latitude (Lat)",north,
            ORDER[1],
            ANGLEUNIT["degree",0.0174532925199433]],
        AXIS["geodetic longitude (Lon)",east,
            ORDER[2],
            ANGLEUNIT["degree",0.0174532925199433]],
    USAGE[
        SCOPE["Horizontal component of 3D system."],
        AREA["World."],
        BBOX[-90,-180,90,180]],
    ID["EPSG",4326]]
Data axis to CRS axis mapping: 2,1
Origin = (-180.000000000000000,84.032571314409978)
Pixel Size = (0.003199422625477,-0.003199422625477)
Corner Coordinates:
Upper Left  (-180.0000000,  84.0325713) (180d 0' 0.00"W, 84d 1'57.26"N)
Lower Left  (-180.0000000, -80.0146244) (180d 0' 0.00"W, 80d 0'52.65"S)
Upper Right ( 180.0022332,  84.0325713) (180d 0' 8.04"E, 84d 1'57.26"N)
Lower Right ( 180.0022332, -80.0146244) (180d 0' 8.04"E, 80d 0'52.65"S)
Center      (   0.0011166,   2.0089735) (  0d 0' 4.02"E,  2d 0'32.30"N)
Band 1 Block=256x256 Type=Byte, ColorInterp=Palette
  NoData Value=0

@coveralls
Copy link
Collaborator

coveralls commented Nov 21, 2024

Coverage Status

coverage: 73.708% (+0.007%) from 73.701%
when pulling 316c8a4 on rouault:fix_11317
into 5a7aac3 on OSGeo:master.

…ts.XXX.proj:transform

fields in addition to top level proj:epsg and proj:transform.
Also handle geotransform being a IntegerList or Integer64List.

Refs OSGeo#11321 (but does no fix it)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport release/3.10 Backport to release/3.10 branch funded through GSP Work funded through the GDAL Sponsorship Program
Projects
None yet
Development

Successfully merging this pull request may close these issues.

GTI stac-geoparquet driver assumes 'image' asset name
3 participants