Skip to content

mojodna/marblecutter-tilezen

Repository files navigation

marblecutter-tilezen

This is a standalone (Python / Flask / WSGI) and Lambda-based dynamic tiler for S3-hosted GeoTIFFs (digital elevation models and aerial imagery).

Development

A docker-compose.yml has been provided to facilitate development. To start the web server, run:

docker-compose up

To start it in standalone mode, run:

docker-compose run --entrypoint bash marblecutter

Deployment

When not using Lambda, marblecutter-tilezen is best managed using Docker. To build an image, run:

make server

To start it, run:

docker run --env-file .env -p 8000:8000 quay.io/mojodna/marblecutter-tilezen

Lambda Deployment

Docker is required to create deps/deps.tgz, which contains binary dependencies and Python packages built for the Lambda runtime.

Up

Up uses CloudFormation to deploy and manage Lambda functions and API Gateway endpoints. It bundles a reverse proxy so that standard web services can be deployed.

make deploy-up

Apex

Apex manages Lambda functions using the AWS API. For some purposes it may be preferable over using Up, such as when Lambda implementation details (e.g. function timeouts) should not be glossed over.

make deploy-apex

Gotchas

The IAM role assumed by Lambda (created by Up or Apex) must have the AmazonS3ReadOnlyAccess policy attached to it and access from Mapzen's DEM source bucket granted to the account being used in order for data to be read.