Comments (2)
I propose adding a response header like X-ASSETS that returns a comma-separated or JSON-encoded list of asset ids that were used to create the response tile. For many sources, the asset id includes enough information to extract a date range and other helpful metadata.
with the new cogeo-mosaic BaseBackend
method this might be a bit tricky. Especially if we want list of asset ids that were used to create the response tile
. An easy solution would be for tile
to return the whole list of assets passed to the tiler
but this won't mean that they were used.
def tile(
self, x: int, y: int, z: int, **kwargs: Any,
) -> Tuple[numpy.ndarray, numpy.ndarray]:
"""Get Tile from multiple observation."""
assets = self.assets_for_tile(x, y, z)
if not assets:
raise NoAssetFoundError(f"No assets found for tile {z}-{x}-{y}")
def _reader(asset: str, x: int, y: int, z: int, **kwargs: Any):
with self.reader(asset) as src_dst:
return src_dst.tile(x, y, z, **kwargs)
return mosaic_reader(assets, _reader, x, y, z, **kwargs)
so in ☝️ do return mosaic_reader(assets, _reader, x, y, z, **kwargs), assets
we could also try to change mosaic_reader
and https://github.com/cogeotiff/rio-tiler/blob/master/rio_tiler/mosaic/reader.py#L19-L52 but not sure it will work.
from titiler.
An easy solution would be for
tile
to return the whole list of assets passed to thetiler
but this won't mean that they were used
That's actually what I expected, but maybe it's worth considering trying to return only what was used
from titiler.
Related Issues (20)
- rename `/crop` -> `/bbox` and `/feature` ? HOT 1
- Error at startup when using pydantic 2.4.0 HOT 2
- Support virtual assets HOT 3
- OpenAPI do not render Dependencies HOT 3
- Wrong protocol for factory generated URLs HOT 1
- Issues with colormaps HOT 4
- Jinja2Templates assertion error in starlette version >= 0.28 HOT 3
- Not work this lib HOT 1
- Wheels not available for recent releases HOT 4
- OGC API - Coverage
- OGC API - Maps HOT 1
- Can not get wms layers from GetCapabilities HOT 1
- Update Github Actions due to EOL Node HOT 1
- Outdated documentation on Azure deployment HOT 3
- Incorrect documentation example for custom colormaps HOT 1
- Can't load newly uploaded data from S3 if it previously failed
- boto3 slows down Titiler's GET /cog/tiles?
- 0.17.1 is not released to pypi HOT 2
- Issue with pydantic-settings, Extra inputs are not permitted HOT 7
- Remove default TileMatrixSetId in `0.19`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from titiler.