All Projects โ†’ DHI-GRAS โ†’ Terracotta

DHI-GRAS / Terracotta

Licence: mit
A light-weight, versatile XYZ tile server, built with Flask and Rasterio ๐ŸŒ

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Terracotta

Mongoke
Instant Graphql for MongoDb (active branch is golang, rewrite in process)
Stars: โœญ 203 (-7.73%)
Mutual labels:  serverless
Hydro Serving
MLOps Platform
Stars: โœญ 213 (-3.18%)
Mutual labels:  serverless
Serverless Slack App
A Serverless.js Slack App Boilerplate with OAuth and Bot actions
Stars: โœญ 217 (-1.36%)
Mutual labels:  serverless
Quirrel
The Task Queueing Solution for Serverless.
Stars: โœญ 203 (-7.73%)
Mutual labels:  serverless
Yoyo
A dead simple comment engine built on top of AWS lambda and React, alternative comment service to Disqus.
Stars: โœญ 210 (-4.55%)
Mutual labels:  serverless
Openapi Backend
Build, Validate, Route, Authenticate and Mock using OpenAPI
Stars: โœญ 216 (-1.82%)
Mutual labels:  serverless
Netlify Functions Workshop
Netlify Serverless Functions Workshop
Stars: โœญ 203 (-7.73%)
Mutual labels:  serverless
Serverless Analytics
Track website visitors with Serverless Analytics using Kinesis, Lambda, and TypeScript.
Stars: โœญ 219 (-0.45%)
Mutual labels:  serverless
Hydrogen Demo
ๅพฎไฟกๅฐ็จ‹ๅบ demo for ็Ÿฅๆ™“ไบ‘ Serverless SDK
Stars: โœญ 211 (-4.09%)
Mutual labels:  serverless
Eventsource
Serverless Go event sourcing library built on top of dynamodb
Stars: โœญ 217 (-1.36%)
Mutual labels:  serverless
Source Code Reading Notes
ๆบ็ ้˜…่ฏป็ฌ”่ฎฐ
Stars: โœญ 207 (-5.91%)
Mutual labels:  serverless
Stacks Blockchain
The Stacks 2.0 blockchain implementation
Stars: โœญ 2,549 (+1058.64%)
Mutual labels:  serverless
Bitwarden Serverless
Implementation of the Bitwarden API using an AWS serverless stack
Stars: โœญ 217 (-1.36%)
Mutual labels:  serverless
Chromeless
๐Ÿ–ฅ Chrome automation made simple. Runs locally or headless on AWS Lambda.
Stars: โœญ 13,254 (+5924.55%)
Mutual labels:  serverless
Spec
CloudEvents Specification
Stars: โœญ 3,025 (+1275%)
Mutual labels:  serverless
Serverless Haskell
Deploying Haskell applications to AWS Lambda with Serverless
Stars: โœญ 204 (-7.27%)
Mutual labels:  serverless
Serverless Azure Functions
Serverless Azure Functions Plugin โ€“ย Add Azure Functions support to the Serverless Framework
Stars: โœญ 213 (-3.18%)
Mutual labels:  serverless
Ffmpeg Aws Lambda Layer
FFmpeg/FFprobe AWS Lambda layer
Stars: โœญ 222 (+0.91%)
Mutual labels:  serverless
Nstack
Type-safe, composable microservices for data analytics
Stars: โœญ 219 (-0.45%)
Mutual labels:  serverless
Commerceql
UNMAINTAINED
Stars: โœญ 217 (-1.36%)
Mutual labels:  serverless

Build Status Documentation Status codecov GitHub release PyPI release License Python versions

Logo

Terracotta is a pure Python tile server that runs as a WSGI app on a dedicated webserver or as a serverless app on AWS Lambda. It is built on a modern Python 3.6 stack, powered by awesome open-source software such as Flask, Zappa, and Rasterio.

Read the docs | Explore the API | Satlas, powered by Terracotta

Why Terracotta?

  • It is trivial to get going. Got a folder full of cloud-optimized GeoTiffs in different projections you want to have a look at in your browser? terracotta serve -r {name}.tif and terracotta connect localhost:5000 get you there.
  • We make minimal assumptions about your data, so you stay in charge. Keep using the tools you know and love to create and organize your data, Terracotta serves it exactly as it is.
  • Serverless deployment is a first-priority use case, so you donโ€™t have to worry about maintaining or scaling your architecture.
  • Terracotta instances are self-documenting. Everything the frontend needs to know about your data is accessible from only a handful of API endpoints.

The Terracotta workflow

1. Optimize raster files

$ ls -lh
total 1.4G
-rw-r--r-- 1 dimh 1049089 231M Aug 29 16:45 S2A_20160724_135032_27XVB_B02.tif
-rw-r--r-- 1 dimh 1049089 231M Aug 29 16:45 S2A_20160724_135032_27XVB_B03.tif
-rw-r--r-- 1 dimh 1049089 231M Aug 29 16:46 S2A_20160724_135032_27XVB_B04.tif
-rw-r--r-- 1 dimh 1049089 231M Aug 29 16:56 S2A_20170831_171901_25XEL_B02.tif
-rw-r--r-- 1 dimh 1049089 231M Aug 29 16:57 S2A_20170831_171901_25XEL_B03.tif
-rw-r--r-- 1 dimh 1049089 231M Aug 29 16:57 S2A_20170831_171901_25XEL_B04.tif

$ terracotta optimize-rasters *.tif -o optimized/

Optimizing rasters: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| [05:16<00:00, file=S2A_20170831_...25XEL_B04.tif]

2. Create a database from file name pattern

$ terracotta ingest optimized/S2A_{date}_{}_{tile}_{band}.tif -o greenland.sqlite
Ingesting raster files: 100%|โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ| 6/6 [00:49<00:00,  8.54s/it]

3. Serve it up

$ terracotta serve -d greenland.sqlite
 * Serving Flask app "terracotta.server" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://localhost:5000/ (Press CTRL+C to quit)

4. Explore the running server

Manually

You can use any HTTP-capable client, such as curl.

$ curl localhost:5000/datasets?tile=25XEL
{"page":0,"limit":100,"datasets":[{"date":"20170831","tile":"25XEL","band":"B02"},{"date":"20170831","tile":"25XEL","band":"B03"},{"date":"20170831","tile":"25XEL","band":"B04"}]}

Modern browsers (e.g. Chrome or Firefox) will render the JSON as a tree.

Interactively

Terracotta also includes a web client. You can start the client (assuming the server is running at http://localhost:5000) using

$ terracotta connect localhost:5000
 * Serving Flask app "terracotta.client" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: off
 * Running on http://127.0.0.1:5100/ (Press CTRL+C to quit)

Then open the client page (http://127.0.0.1:5100/ in this case) in your browser.

preview

Development

We gladly accept bug reports and pull requests via GitHub. For your code to be useful, make sure that it is covered by tests and that it satisfies our linting practices (via mypy and flake8).

To run the tests, just install the necessary dependencies via

$ pip install -e .[test]

Then, you can run

$ pytest

from the root of the repository.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].