English | Español
Pipeline for generating and serving vector tiles (MBTiles) of Bogotá's Urban Tree Census (SIGAU) and Localities datasets.
👉 Live demo: https://tileserver.juanliz.com
| Dataset | Description | Zoom range |
|---|---|---|
sigau.mbtiles |
Individual tree points | 12–18 |
sigau-clustered.mbtiles |
Pre-clustered tree data | 8–15 |
localities.mbtiles |
Bogotá locality polygons | 0–18 |
Important
The tileserver exposes properties and attributes exactly as provided by the original sources. No additional modifications are made to the data's attributes; for full details on attributes, schemas, and licenses, consult the data sources listed in the Data Sources section.
Choose the option that best fits your needs:
| Option | Use case | Requirements |
|---|---|---|
| A. Pull image | Fastest way to run | Docker |
| B. Build Docker locally | For custom builds or development | Docker |
| C. Pre-built tiles | Serve the included MBTiles directly | Node.js or Tileserver-GL |
| D. Manual generation | Customize parameters or use fresh data | GDAL, Tippecanoe, Tileserver-GL |
The fastest way to get started. Pull the pre-built image from GitHub Container Registry:
docker pull ghcr.io/juanliz/sigau-tileserver:latest
docker run -p 8080:8080 ghcr.io/juanliz/sigau-tileserver:latestThen open http://localhost:8080.
The Dockerfile will:
- Downloads the datasets
- Converts them to EPSG:4326
- Generates MBTiles via Tippecanoe
- Serves them with Tileserver-GL
Build the image yourself locally.
docker build -t sigau-tileserver .
docker run -p 8080:8080 sigau-tileserverThen open http://localhost:8080.
If you don't need to regenerate the tiles, you can serve the included MBTiles directly.
With npx (no installation required):
npx tileserver-gl data/With a global installation:
tileserver-gl data/This is a lightweight option if you already have the MBTiles files.
For full control over the pipeline, follow these steps:
-
Urban Tree Census (SIGAU):
https://datosabiertos.bogota.gov.co/dataset/censo-arbolado-urbano -
Bogotá Localities (IDECA):
https://www.ideca.gov.co/recursos/mapas/localidad-bogota-dc
ogr2ogr -f GeoJSON -t_srs EPSG:4326 \
arboladourbano_wgs84.geojson arboladourbano.geojson
ogr2ogr -f GeoJSON -t_srs EPSG:4326 \
localities_wgs84.geojson localities_raw.geojsonHere are the commands to create each MBTiles file. You can adjust parameters as needed.
Individual tree points (sigau.mbtiles):
tippecanoe \
-o sigau.mbtiles \
-l arboladourbano \
--drop-densest-as-needed \
--extend-zooms-if-still-dropping \
--no-feature-limit \
--no-tile-size-limit \
--minimum-zoom=12 \
--maximum-zoom=18 \
--force \
arboladourbano_wgs84.geojsonClustered tree points (sigau-clustered.mbtiles):
tippecanoe \
-o sigau-clustered.mbtiles \
--layer=clusters \
--no-feature-limit \
--no-tile-size-limit \
--minimum-zoom=8 \
--maximum-zoom=15 \
--cluster-distance=40 \
--cluster-maxzoom=15 \
--cluster-densest-as-needed \
arboladourbano_wgs84.geojsonLocalities polygons (localities.mbtiles):
tippecanoe \
-o localities.mbtiles \
--layer=localities \
--no-feature-limit \
--no-tile-size-limit \
--minimum-zoom=0 \
--maximum-zoom=18 \
--coalesce-densest-as-needed \
--extend-zooms-if-still-dropping \
--force \
localities_wgs84.geojsonCopy the generated .mbtiles files to your data/ directory and run:
npx tileserver-gl data/| Dataset | Source | License |
|---|---|---|
| Bogotá Localities | IDECA | CC BY 4.0 |
| Urban Tree Census | Datos Abiertos Bogotá | CC BY 4.0 |
The REST service is provided by SIGAU at the following endpoint: https://sigau.jbb.gov.co/arcgis/rest/services/IDECA/CensoArbol/MapServer/0. It operates as an ArcGIS Feature Layer (version 10.81) rather than a tileserver. This setup means that data must be retrieved through direct queries to the endpoint, which poses performance constraints given the large number of tree-point geometries for Bogotá. The service enforces a maximum record limit (2000 features per request), requiring either multiple paginated requests or spatial subdivisions to retrieve the full dataset. It returns point geometries (WKID 4686) with a broad attribute set, but lacks mechanisms for efficient spatial tiling or caching of vector tiles. As a result, any application relying on this service must implement complex strategies for spatial partitioning, local caching, and optimized querying to avoid excessive load times and numerous requests, since the service is not designed to support high-density real-time data delivery directly.
-
Datasets: Licensed by IDECA and Datos Abiertos Bogotá under CC BY 4.0.
Attribution is required when using or redistributing the data. -
Code: This repository's scripts and configuration are licensed under the MIT License.