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

Question: have key wildcard to serve multiple geotiffs as mosaic #287

Open
gillesserco opened this issue Jan 4, 2023 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@gillesserco
Copy link

Hello

I use a terracotta server to serve dated terrain change detection geotiffs over several zones. The tiffs are square tiles and they are uniquely spatially identified by their UTM projection position (like '29N_22E-184N') that is present in the file naming.

I use keys like "provider/type/date/projcell/band", projcell being the UTM info like 29N_22E-184N.

All is perfect and I can from my custom UI select the cell I want by navigating the keys down and I see the tile on a map component + on a dedicated panel.

I would be very interested in having the possibility to see 'mosaics' on the UI without generating the mosaics of my zones. 
I did a test adding a 'disposition' key to be able to select 'mosaic/tile', then did a call using the disposition key 'mosaic' and omitting the projcell key: the server replied: "must specify all key except last one".

Question: 
 - would it be possible to change the code to support wildcards for one or several keys? or to be able to omit a key? 
 - does someone have a way of doing this mosaic-like usage of terracotta?

Thanks & best regards

Gilles

@j08lue
Copy link
Collaborator

j08lue commented Jan 4, 2023

Terracotta currently does not support mosaics - reading from different rasters depending on position on the map. Every dataset (key combination) points to a single raster and only for RGB we allow the last key to be used to specify the RGB bands.

TiTiler has support for the MosaicJSON, where you basically pass a URL to a MosaicJSON (which contains links to your rasters) to the [/mosaic] (https://developmentseed.org/titiler/endpoints/mosaic/) endpoint, which then handles the lookup etc.

In contrast to Terracotta, you have to handle the lookup of your raster URLs outside of the service with TiTiler - mapping dates to URLs etc.

For Terracotta, your only options are to

  1. merge the tiles into one (big) raster
  2. add layers for all the GeoTIFFs to your client - only makes sense for a few files, though, and will multiply your Terracotta API calls.

@dionhaefner dionhaefner added the enhancement New feature or request label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants