Skip to content

Commit

Permalink
Add natural earth - water lakes for tiler
Browse files Browse the repository at this point in the history
  • Loading branch information
Rub21 committed Apr 30, 2024
1 parent 2fe67a0 commit efd9625
Show file tree
Hide file tree
Showing 2 changed files with 88 additions and 4 deletions.
58 changes: 54 additions & 4 deletions images/tiler-server/config/config.template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ max_connections = 50
[['providers/water_areas.toml']]
[['providers/water_lines.toml']]

###### Water areas NE
[['providers/water_areas_ne.toml']]

###### Admin boundaries providers
[['providers/admin_boundaries.toml']]

Expand Down Expand Up @@ -70,12 +73,25 @@ max_connections = 50

###### transport_associated_streets
[['providers/transport_associated_streets.toml']]


# OpenStreetMap (OSM)
[[providers]]
name = "ne"
type = "mvt_postgis"
host = "${POSTGRES_HOST}"
port = "${POSTGRES_PORT}"
database = "${POSTGRES_DB}"
user = "${POSTGRES_USER}"
password = "${POSTGRES_PASSWORD}"
# srid = 3857
max_connections = 50
###### Water lands ne
[['providers/water_areas_ne.toml']]

[[maps]]
name = "osm"
attribution = "OpenHistoricalMap"
center = [-74.275329586789, -12.153492567373, 8.0]

# Land
[[maps.layers]]
name = "land"
Expand Down Expand Up @@ -261,7 +277,6 @@ center = [-74.275329586789, -12.153492567373, 8.0]
max_zoom = 20

# Water Lines

[[maps.layers]]
name = "water_lines"
provider_layer = "osm.water_lines_gen0_6-6"
Expand Down Expand Up @@ -410,4 +425,39 @@ center = [-74.275329586789, -12.153492567373, 8.0]
provider_layer = "osm.transport_associated_streets"
min_zoom = 7
max_zoom = 20



[[maps]]
name = "ne"
attribution = "Natural Earth"
center = [-74.275329586789, -12.153492567373, 8.0]
# Water lakes Natural Earth
[[maps.layers]]
name = "water_areas"
provider_layer = "osm.ne_water_lakes_0-2"
min_zoom = 0
max_zoom = 2

[[maps.layers]]
name = "water_areas"
provider_layer = "osm.ne_water_lakes_3-5"
min_zoom = 3
max_zoom = 5

[[maps.layers]]
name = "water_areas"
provider_layer = "osm.ne_water_lakes_6-10"
min_zoom = 6
max_zoom = 10

[[maps.layers]]
name = "water_areas"
provider_layer = "osm.ne_water_lakes_11-13"
min_zoom = 11
max_zoom = 13

[[maps.layers]]
name = "water_areas"
provider_layer = "osm.ne_water_lakes_14-20"
min_zoom = 14
max_zoom = 20
34 changes: 34 additions & 0 deletions images/tiler-server/config/providers/water_areas_ne.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[[providers.layers]]
name = "ne_water_lakes_0-2"
geometry_fieldname = "geometry"
geometry_type = "multipolygon"
id_fieldname = "ogc_fid"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 1000),!BBOX!) AS geometry, name, ogc_fid FROM ne_50m_lakes WHERE wkb_geometry && !BBOX!"

[[providers.layers]]
name = "ne_water_lakes_3-5"
geometry_fieldname = "geometry"
geometry_type = "multipolygon"
id_fieldname = "ogc_fid"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 500),!BBOX!) AS geometry, name, ogc_fid FROM ne_50m_lakes WHERE wkb_geometry && !BBOX!"

[[providers.layers]]
name = "ne_water_lakes_6-10"
geometry_fieldname = "geometry"
geometry_type = "multipolygon"
id_fieldname = "ogc_fid"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 100),!BBOX!) AS geometry, name, ogc_fid FROM ne_10m_lakes WHERE wkb_geometry && !BBOX!"

[[providers.layers]]
name = "ne_water_lakes_11-13"
geometry_fieldname = "geometry"
geometry_type = "multipolygon"
id_fieldname = "ogc_fid"
sql = "SELECT ST_AsMVTGeom(ST_Simplify(wkb_geometry, 5),!BBOX!) AS geometry, name, ogc_fid FROM ne_10m_lakes WHERE wkb_geometry && !BBOX!"

[[providers.layers]]
name = "ne_water_lakes_14-20"
geometry_fieldname = "geometry"
geometry_type = "multipolygon"
id_fieldname = "ogc_fid"
sql = "SELECT ST_AsMVTGeom(wkb_geometry,!BBOX!) AS geometry, name, ogc_fid FROM ne_10m_lakes WHERE wkb_geometry && !BBOX!"

0 comments on commit efd9625

Please sign in to comment.