Skip to content

πŸš€ Go-based Tile Server β€” Generate Mapbox Vector Tiles (MVT) on the fly πŸ—ΊοΈ ⚑ Supports dynamic SQL, high-performance rendering, and scalable tile generation β€” all powered by Go 🐹

Notifications You must be signed in to change notification settings

rabbit-backend/gotiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

31 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Sample Config

{
  "sources": [
    {
      "name": "db_a",
      "connection": {
        "type": "env",
        "value": "POSTGRES_URL"
      }
    },
    {
      "name": "db_b",
      "connection": {
        "type": "env",
        "value": "POSTGRES_URL"
      }
    }
  ]
}

Sample Folder Structure

tiles/
β”œβ”€ db/
β”‚  β”œβ”€ db_a/
β”‚  β”‚  β”œβ”€ buildings.sql
β”‚  β”œβ”€ db_b/
β”‚  β”‚  β”œβ”€ airports.sql
β”œβ”€ static/
β”‚  β”œβ”€ roads.pmtiles

Sample SQL query

SELECT ST_AsMVT(tile, 'buildings', 4096, 'geom') FROM (
    SELECT
        ST_AsMVTGeom(
            ST_Transform(ST_CurveToLine(geom), 3857),
            ST_TileEnvelope($3, $1, $2),
            4096, 64, true
        ) as geom
    FROM "public"."buildings"
    WHERE geom && ST_Transform(ST_TileEnvelope($3, $1, $2), 4326)
) as tile WHERE geom IS NOT NULL;

About

πŸš€ Go-based Tile Server β€” Generate Mapbox Vector Tiles (MVT) on the fly πŸ—ΊοΈ ⚑ Supports dynamic SQL, high-performance rendering, and scalable tile generation β€” all powered by Go 🐹

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published