Add mosaic tile support for collections #813
Merged
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.
Overview
This PR adds mosaic tile support to Franklin in a format inspired by but not compliant with the
mosaicjson
spec. The reason for non-compliance (right now) is thetiles
property, which requires linking asset locations to tile quadkeys at the lowest supported zoom. We have a database with geometries that we can use to do this filtering very quickly and can easily cache things, so this requires a lot of JSON and still requires filtering after the fact for higher zoom levels, so I left it off. Maybe that's a discussion for another place.Checklist
Notes
Testing Instructions
application/run migrate --db-host=localhost
application/run serve --db-host=localhost --with-transactions --with-tiles
stac-client
demo (I'll show you if you don't have access) to create a collection and two items within it:#!/bin/bash python create_collection.py demo-collection --bbox 0,0,1,1 --start-date 2021-01-01 --end-date 2021-08-01 AWS_PROFILE=raster-foundry python create_item.py demo-item-1 2021-07-18 s3://rasterfoundry-production-data-us-east-1/demo-cogs/s2-canary-islands-rgb-cog.tif demo-collection AWS_PROFILE=raster-foundry python create_item.py demo-item-2 2021-07-18 s3://rasterfoundry-production-data-us-east-1/demo-cogs/s2-canary-islands-rgb-cog-2.tif demo-collection
mosaic-definition.json
:cat mosaic-definition.json | http :9090/collections/demo-collection/mosaic
http://localhost:9090/tiles/collections/demo-collection/mosaic/1bfd50c4-7417-4fdb-a7d1-6b5faca99edf/WebMercatorQuad/{z}/{x}/{y}?lowerQuantile=4&upperQuantile=95
Closes azavea/raster-foundry-platform#1272