APIs & tile services
Serving features, tiles and imagery over HTTP: filters, paging, caching and the load that follows.
Serving spatial data over HTTP is mostly about ceilings. An endpoint with no page limit will eventually be asked for everything, and the first curious client takes the service down — not maliciously, just by pasting the URL without parameters.
So the work is bounding: a default page size with a cursor, a maximum bounding box, a simplification tolerance tied to zoom, a cache header that means something, and a tile scheme for anything that is genuinely large. OGC API Features and the XYZ tile convention exist so that callers already know the shape of those limits, which is a good reason to follow them rather than invent your own.
Below: the concepts cover the standards and what each is for; the how-to guides build and deploy the services; and the fixes cover the load, the caching and the CORS problems that follow.
🧭 Start with the concepts
The ideas the how-to guides below assume you already have.
- Serving Spatial Data Explained: Files, Features and Tiles
- OGC API Features Explained: The Standard Behind Modern Spatial APIs
- GeoJSON, Vector Tiles or Parquet: Choosing an API Response Format
- Dynamic Tile Server or Static Tiles: What to Serve
- HTTP Caching for Spatial Data: ETags, Max-Age and Invalidation
- Authentication and Rate Limits for a Spatial API
⚙️ Then do the task
Step-by-step walkthroughs with code you can copy and adapt.
- How to Add Bounding Box and Attribute Filters to a Spatial API
- How to Paginate a Large Feature API in Python
- How to Implement OGC API Features in Python
- How to Serve Vector Tiles from PostGIS with ST_AsMVT
- How to Serve Raster Tiles from a COG with TiTiler
- How to Set Cache Headers on a Spatial API and Tile Service
Show every how-to guide in this topic
🔧 When it breaks
The errors this topic produces, with the cause explained rather than just the command.
Learning paths through this topic
A curated route rather than a list — the guides in the order that builds on itself.
Related topics
Subjects that keep coming up alongside this one, most overlap first.