Martin supports several data integration patterns depending on your source type:
PostgreSQL Integration
Martin connects via a connection string and uses a deadpool-postgres connection pool. It automatically discovers tables with geometry columns and functions that return MVT data by querying geometry_columns and pg_proc.
File Source Integration
Martin can serve tiles from local or remote files:
- MBTiles: SQLite-based format.
- PMTiles: Binary format (uses HTTP range requests for remote files).
- COG (Cloud Optimized GeoTIFF): Uses a TIFF parser and HTTP range requests for remote access.
- Cloud Storage: Supports S3, Azure, and GCP via the
object_store crate.
GeoJSON Integration
GeoJSON files are loaded into memory, reprojected to Web Mercator, and indexed using a packed Hilbert R-tree for real-time MVT encoding on demand.