// the find
DHI/terracotta
A light-weight, versatile XYZ tile server, built with Flask and Rasterio :earth_africa:
Terracotta is a Python tile server for serving Cloud-Optimized GeoTIFFs as XYZ map tiles, deployable either as a standard WSGI app or on AWS Lambda via Zappa. It handles the full pipeline from raster optimization to metadata ingestion to tile serving, with SQLite, PostgreSQL, or MySQL as the metadata store. The target user is a geospatial developer who has COGs on disk or S3 and wants a tile endpoint without standing up a full GeoServer or titiler stack.
The three-command workflow (optimize → ingest → serve) actually works and gets you to a running tile server in under 10 minutes. Supporting SQLite as a metadata store is a good call — it means you can deploy the whole thing to Lambda with zero external dependencies by putting the .sqlite file on S3 (the sqlite_remote driver handles this). The driver abstraction is clean: PostgreSQL, MySQL, and SQLite all implement the same interface, so switching backends is a config change. Colormaps are pre-baked as numpy arrays rather than computed per-tile, which is the right call for throughput.
The client app is shipped as pre-built static JS with a committed yarn.lock referencing React scripts circa 2020 — the frontend is effectively frozen and any customization means rebuilding from a webpack config that predates Create React App's own deprecation. Zappa, listed as a core dependency for serverless deployment, is largely unmaintained and has had persistent Python 3.11+ compatibility issues; anyone going the Lambda route is walking into dependency hell. No tile caching layer is built in — every tile request hits Rasterio and the metadata store, so you'll need to front it with CloudFront or a CDN yourself if you expect real traffic. The migration system handles only four version bumps and is clearly not keeping pace with schema changes, which means upgrading across versions has historically required manual intervention.