bbox-services / bbox

BBOX services
https://www.bbox.earth/
Apache License 2.0
55 stars 9 forks source link

Support multiple grids per tileset #67

Closed pka closed 1 month ago

pka commented 1 month ago

Example with projection from WGS84:

[[grid]]
json = "EqualEarthGreenwichWGS84Quad.json"

[[tileset]]
name = "tracking"

[[tileset.tms]]
id = "EqualEarthGreenwichWGS84Quad"
maxzoom = 2

[[tileset.tms]]
id = "WebMercatorQuad"
minzoom = 3

[tileset.postgis]
datasource = "tracking"

[[tileset.postgis.layer]]
name = "waypoints"
geometry_field = "geom"
geometry_type = "POINT"
srid = 4326

[[tileset.postgis.layer.query]]
sql = """SELECT id, ts::TEXT, ST_Point(lon, lat, 4326) AS geom FROM gps.gpslog"""

Example with prepared tables:

[[grid]]
json = "EqualEarthGreenwichWGS84Quad.json"

[[tileset]]
name = "ocean"

[[tileset.tms]]
id = "EqualEarthGreenwichWGS84Quad"
maxzoom = 2

[[tileset.tms]]
id = "WebMercatorQuad"
minzoom = 3

[tileset.postgis]
datasource = "osmdb"

[[tileset.postgis.layer]]
geometry_field = "geom"
geometry_type = "POLYGON"
name = "ocean"
#srid = 8857 / 3857

[[tileset.postgis.layer.query]]
minzoom = 0
maxzoom = 2
sql = """SELECT "geom" FROM "eq"."ocean_low""""

[[tileset.postgis.layer.query]]
minzoom = 3
maxzoom = 9
sql = """SELECT "id","geom" FROM "merc"."ocean_low""""