microsoft / planetary-computer-apis

Planetary Computer APIs
MIT License
105 stars 28 forks source link

Add support and tests for legacy mosaic tile routes #234

Closed mmcfarland closed 4 months ago

mmcfarland commented 4 months ago

The tile route prefixes were reordered in recent versions of titiler.pgstac. Both versions of the routes are supported in PC and tests have been added to confirm.

Additionally, we are stripping the new {tileMatrixSetId} template path from the mosaic/register tilejson URLs that are returned, as this is new behavior intended to align with new OGC Feature specs. This keeps the result as a valid URL that can be used without modification by clients.

Here are the two main formats, both link to the same tile and both should succeed:

legacy

https://planetarycomputer-staging.microsoft.com/api/data/v1/mosaic/7cb4f0c421e47f279c4b2bab066f5f42/tiles/WebMercatorQuad/14/4422/6652@1x?collection=naip&assets=image&asset_bidx=image|1,2,3

current

https://planetarycomputer-staging.microsoft.com/api/data/v1/mosaic/tiles/7cb4f0c421e47f279c4b2bab066f5f42/WebMercatorQuad/14/4422/6652@1x?collection=naip&assets=image&asset_bidx=image|1,2,3