titiler-mosaicjson
is a fork of the popular TiTiler dynamic tiling server, derived
from the NASA IMPACT TiTiler fork. This project combines the
the ability to create a virtual mosaic, stored in DynamoDB, from a STAC API search from the NASA IMPACT fork with the latest
TiTiler code.
The upstream TiTiler documentation can be found here.
To install from sources:
git clone https://github.com/element84/titiler-mosaicjson.git
cd titiler
python -m pip install -U pip
python -m pip install -e src/titiler/core -e src/titiler/extensions -e src/titiler/mosaic -e src/titiler/application
python -m pip install uvicorn
Configure AWS credentials for the account that will be used for DynamoDB backend storage. Depending on the permissions for those credentials, it may be necessary to explicitly grant permission to access the data in any requestor pays buckets, e.g.:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:*",
"Resource": "arn:aws:s3:::naip-analytic/*"
}
]
}
Create a DynamoDB table to use for mosaicjson storage, e.g., my-username-mosaicjson
.
Set the following env vars. The MOSAIC_HOST will be the region and the name of this table.
export AWS_REQUEST_PAYER=requester
export MOSAIC_BACKEND=dynamodb://
export MOSAIC_HOST=us-west-2/my-username-mosaicjson
Then run the server:
uvicorn titiler.application.main:app --reload
This should start a server running at http://127.0.0.1:8000
To create a mosaic, run:
curl -X "POST" "http://127.0.0.1:8000/mosaicjson/mosaics" \
-H 'Content-Type: application/vnd.titiler.stac-api-query+json' \
-d $'{
"stac_api_root": "https://earth-search.aws.element84.com/v1",
"max_items": 100,
"bbox": [
-113.56481552124025,
35.13093004178304,
-113.43503952026369,
35.15802107388074
],
"datetime": "2020-12-31T00:00:00Z/2022-12-31T23:59:59.999Z",
"collections": [
"naip"
],
"asset_name": "image"
}'
Alternatively, configure the FilmDrop UI SCENE_TILER_URL
and MOSAIC_TILER_URL
variables
to be http://127.0.0.1:8000
See CONTRIBUTING.md
To update from upstream:
- Merge from upstream
- Preserve README.md, CHANGES.md, and LICENSE
- Update upstream README.md into README_upstream.md, CHANGES.md into CHANGES_upstream.md, and LICENSE into UPSTREAM_LICENSE
See LICENSE and UPSTREAM_LICENSE.
In release v0.12.0-1.0.1, this code was relicensed from MIT to Apache 2.
Maintained by Element 84
Originially created by Development Seed
See contributors for a listing of individual contributors.
See CHANGES.md.
For upstream changes, see CHANGES_upstream.md.