# CrunchyData/pg_tileserv

A very thin PostGIS-only tile server in Go. Takes in HTTP tile requests, executes SQL, returns MVT tiles.

Repository: https://github.com/CrunchyData/pg_tileserv
Canonical: https://ross.abutalabs.com/products/pg_tileserv
Language: Go
License: Apache-2.0
License Family: permissive
Last push: 2025-12-11T17:47:55+00:00

## Health v2 (maintenance only)
Score: 48/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 56, release rhythm 8, longevity 100
- inputs: {"age_days": 2464, "days_push": 265, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1057, forks 172 (observed 2026-08-28T04:03:24.734587+00:00)

## What it is
pg_tileserv is a lightweight PostGIS-only tile server written in Go that serves Mapbox Vector Tiles (MVT) directly from PostgreSQL/PostGIS. It accepts HTTP tile requests, converts them into SQL queries against spatial tables and functions, and returns the resulting vector tiles.

## Use cases
- serve vector tiles from a PostGIS database over HTTP
- publish PostGIS tables as Mapbox Vector Tile layers
- build a lightweight map tile backend without a heavy GIS stack
- expose custom SQL spatial functions as tile layers
- feed web maps (Leaflet, MapLibre, Mapbox GL) with data from PostgreSQL
- cache tiles behind a proxy like Varnish for production map serving

## When to choose
- your spatial data already lives in PostgreSQL/PostGIS and you want to serve it as MVT with minimal setup
- you want a small, single-binary tile server with a simple configuration
- you need dynamic tiles generated from SQL queries or custom PostGIS functions
- you prefer a Martin-like API for tile serving

## When to avoid
- you need to serve raster tiles or pre-rendered tile caches
- your data is not in PostgreSQL/PostGIS
- you need a full-featured GIS server with WMS/WFS support
- you want heavy server-side styling or rendering logic

## Facets
- artifact type: service
- maturity: active
- function: http-server, web-framework, database, geospatial
- domain: web-development, databases, backend
- platform: windows, go, self-hosted
- tags: postgis, mvt, vector-tiles, tile-server, mapbox-vector-tiles, sql, maps, linux, macos, docker

## Member repositories
- CrunchyData/pg_tileserv (main) score 48

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:24.734587+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:57:54.278171+00:00, confidence not recorded.
  - readme: https://github.com/CrunchyData/pg_tileserv (fetched 2026-08-28T04:03:24.734587+00:00, sha 6d44afafbca8)
- Data as of 2026-08-30T08:39:29.467469+00:00.
