feat: add /concept_metadata and /compatibility endpoints#80
Merged
Conversation
|
📚 Documentation preview will be available at: https://developmentseed.github.io/titiler-cmr/pr-previews/pr-80/ Status: ✅ Preview is ready! |
6 tasks
This was referenced Oct 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These new endpoints combine some collection-level metadata and a guess-and-check test on the first granule that comes back in a basic search to determine which backend (rasterio or xarray) is appropriate for the concept id, as well as other helpful information for setting the query parameters (e.g.
sel).Here is the example output for a netcdf dataset:
{ "concept_id": "C2837626477-GES_DISC", "backend": "xarray", "datetime": [ { "RangeDateTimes": [ { "BeginningDateTime": "2005-01-01T00:00:00.000Z", "EndingDateTime": "2021-12-31T23:59:59.999Z" } ], "EndsAtPresentFlag": true } ], "variables": { "o3": { "shape": [ 12, 27, 160, 320 ], "dtype": "float32" } }, "dimensions": { "time": 12, "nv": 2, "lon": 320, "lat": 160, "lev": 27 }, "coordinates": { "time": { "size": 12, "dtype": "datetime64[ns]" }, "time_bnds": { "size": 24, "dtype": "datetime64[ns]" }, "lon": { "size": 320, "dtype": "float32", "min": 0.0, "max": 358.875 }, "lon_bnds": { "size": 640, "dtype": "float32", "min": 0.5625, "max": 359.4375 }, "lat": { "size": 160, "dtype": "float32", "min": -89.14199829101562, "max": 89.14199829101562 }, "lat_bnds": { "size": 320, "dtype": "float32", "min": -89.69850158691406, "max": 89.69850158691406 }, "lev": { "size": 27, "dtype": "float32", "min": 60.0, "max": 1000.0 } }, "example_assets": "https://data.gesdisc.earthdata.nasa.gov/data/TCR2_MON_VERTCONCS/TRPSCRO3M3D.1/TROPESS_reanalysis_mon_o3_2005.nc" }If the dataset is raster-type (e.g. HLS) the information is not quite as rich, but should help users get un-stuck by showing the asset names which can help determine
band_regex.{ "concept_id": "C2021957657-LPCLOUD", "backend": "rasterio", "datetime": [ { "RangeDateTimes": [ { "BeginningDateTime": "2013-04-11T00:00:00.000Z" } ], "EndsAtPresentFlag": true, "PrecisionOfSeconds": 0, "TemporalResolution": { "Value": 1, "Unit": "Day" } } ], "example_assets": { "HLS.L30.T59WPT.2013101T001445.v2.0.B09.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.B09.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.Fmask.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.Fmask.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.B06.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.B06.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.B01.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.B01.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.B07.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.B07.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.VZA.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.VZA.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.B10.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.B10.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.B04.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.B04.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.SAA.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.SAA.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.VAA.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.VAA.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.B05.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.B05.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.SZA.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.SZA.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.B02.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.B02.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.B03.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.B03.tif", "HLS.L30.T59WPT.2013101T001445.v2.0.B11.tif": "https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/HLSL30.020/HLS.L30.T59WPT.2013101T001445.v2.0/HLS.L30.T59WPT.2013101T001445.v2.0.B11.tif" }, "sample_asset_raster_info": { "bounds": [ 600000.0, 7690200.0, 709800.0, 7800000.0 ], "crs": "PROJCS[\"UTM Zone 59, Northern Hemisphere\",GEOGCS[\"Unknown datum based upon the WGS 84 ellipsoid\",DATUM[\"Not specified (based on WGS 84 spheroid)\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]]],PRIMEM[\"Greenwich\",0],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",171],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH]]", "band_metadata": [ [ "b1", {} ] ], "band_descriptions": [ [ "b1", "Cirrus" ] ], "dtype": "int16", "nodata_type": "Nodata", "colorinterp": [ "gray" ], "scales": [ 0.0001 ], "offsets": [ 0.0 ], "driver": "GTiff", "count": 1, "width": 3660, "height": 3660, "overviews": [ 2, 4, 8, 16 ], "nodata_value": -9999.0 } }I also added the
/concept_metadatawhich just returns the collection/concept metadata direct from CMR.