From 75423d90bfca555fc7d3beda0a4bc0311a07aa1f Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 2 Dec 2024 12:46:30 -0500 Subject: [PATCH 01/13] Update imposm3 continaer --- images/tiler-imposm/Dockerfile | 35 +++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/images/tiler-imposm/Dockerfile b/images/tiler-imposm/Dockerfile index 3a250d40..fe35bd92 100644 --- a/images/tiler-imposm/Dockerfile +++ b/images/tiler-imposm/Dockerfile @@ -1,7 +1,6 @@ FROM osgeo/gdal:ubuntu-small-3.2.3 -RUN apt-get -y update -RUN apt-get install -y \ +RUN apt-get -y update && apt-get install -y \ g++ \ libboost-dev \ libboost-system-dev \ @@ -22,46 +21,48 @@ RUN apt-get install -y \ software-properties-common && \ rm -rf /var/lib/apt/lists/* -# Install python RUN add-apt-repository ppa:deadsnakes/ppa && \ apt-get update && \ - apt-get install -y build-essential python3.6 python3.6-dev python3-pip && \ + apt-get install -y python3.9 python3.9-dev python3-pip && \ rm -rf /var/lib/apt/lists/* && \ python3 -m pip install pip --upgrade && \ python3 -m pip install wheel -# Install postgresql-client RUN apt-get update && apt-get install -y postgresql-client && \ rm -rf /var/lib/apt/lists/* -# Install Go RUN wget -c https://dl.google.com/go/go1.21.0.linux-amd64.tar.gz -O - | tar -xz -C /usr/local ENV PATH $PATH:/usr/local/go/bin WORKDIR /go ENV GOPATH /go - -# Clone the repository directly RUN git clone https://github.com/omniscale/imposm3.git $GOPATH/src/github.com/omniscale/imposm3 +# Switch to the stable version of Imposm3 WORKDIR $GOPATH/src/github.com/omniscale/imposm3 RUN git checkout v0.14.0 -# Fix cache package conflict +# Apply fixes or patches (if necessary) RUN sed -i '/setMaxFileSize/d' cache/ldb_pre_121.go +# Build Imposm3 RUN go install github.com/omniscale/imposm3/cmd/imposm ENV PATH $PATH:$GOPATH/bin -# Install awscli and gsutil to get the pbf file -RUN pip3 install -U setuptools -RUN pip3 install awscli +# Install AWS CLI for downloading files +RUN pip3 install -U setuptools awscli -ENV IMPOSMDATA /mnt/data -RUN mkdir -p $IMPOSMDATA && chmod 777 -R $IMPOSMDATA -WORKDIR $IMPOSMDATA -VOLUME $IMPOSMDATA +# Set up data volume +# ENV IMPOSMDATA /mnt/data +# RUN mkdir -p $IMPOSMDATA && chmod 777 -R $IMPOSMDATA +# VOLUME $IMPOSMDATA +# Set working directory WORKDIR /osm COPY . . -CMD ./start.sh + +# Ensure start.sh is executable +RUN chmod +x ./start.sh + +# Default command +CMD ["./start.sh"] \ No newline at end of file From 3c1d58630e2d74dc21576d33c6cad2ca418ba25e Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 2 Dec 2024 12:48:28 -0500 Subject: [PATCH 02/13] Update chartpress --- .github/workflows/chartpress.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/chartpress.yaml b/.github/workflows/chartpress.yaml index dfe07de0..81db24fd 100644 --- a/.github/workflows/chartpress.yaml +++ b/.github/workflows/chartpress.yaml @@ -5,7 +5,7 @@ on: - 'main' - 'staging' - 'development' - - 'imposm/tables' + - 'imposm3' jobs: build: runs-on: ubuntu-20.04 From 34bae9989bb5c3b1b964a23c5d687de0bc69969a Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 2 Dec 2024 15:30:22 -0500 Subject: [PATCH 03/13] Update imposm admin_areas import --- images/tiler-imposm/Dockerfile | 18 +-- .../config/layers/admin_areas.json | 101 +++++++++++- images/tiler-imposm/start.sh | 5 +- images/tiler-imposm/update_tables.py | 151 ++++++++++++++++++ previous-water-lines.json | 55 +++++++ 5 files changed, 312 insertions(+), 18 deletions(-) create mode 100644 images/tiler-imposm/update_tables.py create mode 100644 previous-water-lines.json diff --git a/images/tiler-imposm/Dockerfile b/images/tiler-imposm/Dockerfile index fe35bd92..6b3e1691 100644 --- a/images/tiler-imposm/Dockerfile +++ b/images/tiler-imposm/Dockerfile @@ -38,31 +38,17 @@ WORKDIR /go ENV GOPATH /go RUN git clone https://github.com/omniscale/imposm3.git $GOPATH/src/github.com/omniscale/imposm3 -# Switch to the stable version of Imposm3 WORKDIR $GOPATH/src/github.com/omniscale/imposm3 RUN git checkout v0.14.0 # Apply fixes or patches (if necessary) RUN sed -i '/setMaxFileSize/d' cache/ldb_pre_121.go - -# Build Imposm3 RUN go install github.com/omniscale/imposm3/cmd/imposm ENV PATH $PATH:$GOPATH/bin # Install AWS CLI for downloading files -RUN pip3 install -U setuptools awscli - -# Set up data volume -# ENV IMPOSMDATA /mnt/data -# RUN mkdir -p $IMPOSMDATA && chmod 777 -R $IMPOSMDATA -# VOLUME $IMPOSMDATA - -# Set working directory +RUN pip3 install -U setuptools awscli psycopg2 WORKDIR /osm COPY . . - -# Ensure start.sh is executable RUN chmod +x ./start.sh - -# Default command -CMD ["./start.sh"] \ No newline at end of file +CMD ["./start.sh"] diff --git a/images/tiler-imposm/config/layers/admin_areas.json b/images/tiler-imposm/config/layers/admin_areas.json index f66dc012..90b772ec 100644 --- a/images/tiler-imposm/config/layers/admin_areas.json +++ b/images/tiler-imposm/config/layers/admin_areas.json @@ -7,7 +7,106 @@ "source:datetime" ] }, - "generalized_tables": {}, + "generalized_tables": { + "admin_boundaries_z0_2": { + "source": "admin_areas", + "tolerance": 5000, + "geometry_transform": "ST_Boundary(geometry)", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2)" + }, + "admin_boundaries_centroid_z0_2": { + "source": "admin_areas", + "tolerance": 5000, + "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2) AND name IS NOT NULL AND name <> ''" + }, + "admin_boundaries_z3_5": { + "source": "admin_areas", + "tolerance": 1000, + "geometry_transform": "ST_Boundary(geometry)", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2,3,4)" + }, + "admin_boundaries_centroid_z3_5": { + "source": "admin_areas", + "tolerance": 1000, + "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2,3,4) AND name IS NOT NULL AND name <> ''" + }, + "admin_boundaries_z6_7": { + "source": "admin_areas", + "tolerance": 500, + "geometry_transform": "ST_Boundary(geometry)", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2,3,4,5,6)" + }, + "admin_boundaries_centroid_z6_7": { + "source": "admin_areas", + "tolerance": 500, + "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2,3,4,5,6) AND name IS NOT NULL AND name <> ''" + }, + "admin_boundaries_z8_9": { + "source": "admin_areas", + "tolerance": 200, + "geometry_transform": "ST_Boundary(geometry)", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9)" + }, + "admin_boundaries_centroid_z8_9": { + "source": "admin_areas", + "tolerance": 200, + "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9) AND name IS NOT NULL AND name <> ''" + }, + "admin_boundaries_z10_12": { + "source": "admin_areas", + "tolerance": 100, + "geometry_transform": "ST_Boundary(geometry)", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9,10)" + }, + "admin_boundaries_centroid_z10_12": { + "source": "admin_areas", + "tolerance": 100, + "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9,10) AND name IS NOT NULL AND name <> ''" + }, + "admin_boundaries_z13_15": { + "source": "admin_areas", + "tolerance": 50, + "geometry_transform": "ST_Boundary(geometry)", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9,10)" + }, + "admin_boundaries_centroid_z13_15": { + "source": "admin_areas", + "tolerance": 50, + "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9,10) AND name IS NOT NULL AND name <> ''" + }, + "admin_boundaries_z16_20": { + "source": "admin_areas", + "tolerance": 5, + "geometry_transform": "ST_Boundary(geometry)", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9,10)" + }, + "admin_boundaries_centroid_z16_20": { + "source": "admin_areas", + "tolerance": 5, + "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", + "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9,10) AND name IS NOT NULL AND name <> ''" + } + }, "tables": { "admin_areas": { "fields": [ diff --git a/images/tiler-imposm/start.sh b/images/tiler-imposm/start.sh index b5697f0d..cbafde24 100755 --- a/images/tiler-imposm/start.sh +++ b/images/tiler-imposm/start.sh @@ -175,7 +175,10 @@ function importData() { touch $INIT_FILE - # Update the DB + # Update tables + python update_tables.py + + # Updata data with minute replication updateData } diff --git a/images/tiler-imposm/update_tables.py b/images/tiler-imposm/update_tables.py new file mode 100644 index 00000000..9e3e9351 --- /dev/null +++ b/images/tiler-imposm/update_tables.py @@ -0,0 +1,151 @@ +import os +import json +import psycopg2 +from psycopg2 import sql +import logging + +logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s") +logger = logging.getLogger(__name__) + +DB_CONFIG = { + "dbname": os.getenv("POSTGRES_DB"), + "user": os.getenv("POSTGRES_USER"), + "password": os.getenv("POSTGRES_PASSWORD"), + "host": os.getenv("POSTGRES_HOST"), + "port": int(os.getenv("POSTGRES_PORT", 5432)) +} + +# Verify that all required environment variables are defined +REQUIRED_ENV_VARS = ["POSTGRES_DB", "POSTGRES_USER", "POSTGRES_PASSWORD", "POSTGRES_HOST"] +for var in REQUIRED_ENV_VARS: + if not os.getenv(var): + logger.error(f"Environment variable {var} is not defined. Exiting.") + raise EnvironmentError(f"Environment variable {var} is not defined.") + +def load_imposm_config(filepath): + """Load the imposm3.json configuration file""" + logger.info(f"Loading configuration from {filepath}") + try: + with open(filepath, "r") as f: + return json.load(f) + except FileNotFoundError: + logger.error(f"Configuration file {filepath} not found.") + raise + except json.JSONDecodeError: + logger.error(f"Error parsing JSON from {filepath}.") + raise + +def apply_geometry_transformations(conn, generalized_tables): + """Apply geometry transformations to the specified tables""" + logger.info("Starting geometry transformations...") + with conn.cursor() as cur: + for table_name, table_info in generalized_tables.items(): + fixed_table_name = f"osm_{table_name}" + geometry_transform = table_info.get("geometry_transform") + geometry_transform_types = table_info.get("geometry_transform_types") + + # Skip if transform or types are not defined + if not geometry_transform or not geometry_transform_types: + logger.warning( + f"Skipping transformations for {fixed_table_name}: " + "'geometry_transform' or 'geometry_transform_types' not defined." + ) + continue + + # Execute transformation query + sql_query = sql.SQL(""" + UPDATE {table} + SET geometry = {transform} + WHERE {types_condition}; + """).format( + table=sql.Identifier(fixed_table_name), + transform=sql.SQL(geometry_transform), + types_condition=sql.SQL(geometry_transform_types) + ) + try: + logger.info(f"Applying transformation '{geometry_transform}' to table {fixed_table_name}") + cur.execute(sql_query) + logger.info(f"Transformation completed successfully for {fixed_table_name}") + except Exception as e: + logger.error(f"Error applying transformation to {fixed_table_name}: {e}") + conn.commit() + +def create_triggers(conn, generalized_tables): + """Create triggers for future inserts/updates""" + logger.info("Creating triggers for future geometry transformations...") + with conn.cursor() as cur: + for table_name, table_info in generalized_tables.items(): + fixed_table_name = f"osm_{table_name}" + geometry_transform = table_info.get("geometry_transform") + geometry_transform_types = table_info.get("geometry_transform_types") + + # Skip if transform or types are not defined + if not geometry_transform or not geometry_transform_types: + logger.warning( + f"Skipping trigger creation for {fixed_table_name}: " + "'geometry_transform' or 'geometry_transform_types' not defined." + ) + continue + + # Create trigger function + trigger_function = f""" + CREATE OR REPLACE FUNCTION {fixed_table_name}_transform_trigger() + RETURNS TRIGGER AS $$ + BEGIN + IF {geometry_transform_types} THEN + NEW.geometry = {geometry_transform}; + END IF; + RETURN NEW; + END; + $$ LANGUAGE plpgsql; + """ + try: + logger.info(f"Creating trigger function for {fixed_table_name}") + cur.execute(trigger_function) + + # Create the trigger + trigger = f""" + CREATE TRIGGER {fixed_table_name}_before_insert_update + BEFORE INSERT OR UPDATE ON {fixed_table_name} + FOR EACH ROW + EXECUTE FUNCTION {fixed_table_name}_transform_trigger(); + """ + cur.execute(trigger) + logger.info(f"Trigger created successfully for {fixed_table_name}") + except Exception as e: + logger.error(f"Error creating trigger for {fixed_table_name}: {e}") + conn.commit() + +def main(imposm3_config_path): + logger.info("Connecting to the PostgreSQL database...") + try: + conn = psycopg2.connect(**DB_CONFIG) + logger.info("Connection established successfully.") + except Exception as e: + logger.error(f"Error connecting to the database: {e}") + raise + + try: + # Load the imposm3.json configuration + config = load_imposm_config(imposm3_config_path) + generalized_tables = config.get("generalized_tables", {}) + + # Apply initial geometry transformations + logger.info("Starting initial geometry transformations...") + apply_geometry_transformations(conn, generalized_tables) + + # Create triggers for future transformations + logger.info("Setting up triggers for future updates...") + create_triggers(conn, generalized_tables) + + logger.info("All transformations and triggers completed successfully.") + except Exception as e: + logger.error(f"An error occurred during execution: {e}") + raise + finally: + conn.close() + logger.info("Database connection closed.") + +if __name__ == "__main__": + imposm3_config_path = "config/imposm3.json" + main(imposm3_config_path) diff --git a/previous-water-lines.json b/previous-water-lines.json new file mode 100644 index 00000000..cd14730f --- /dev/null +++ b/previous-water-lines.json @@ -0,0 +1,55 @@ +{ + "tags": { + "load_all": true, + "exclude": ["created_by", "source", "source:datetime"] + }, + "generalized_tables": { + "water_lines_gen0": { + "source": "water_lines_gen1", + "sql_filter": null, + "tolerance": 200 + }, + "water_lines_gen1": { + "source": "water_lines", + "sql_filter": null, + "tolerance": 50.0 + } + }, + "tables": { + "water_lines": { + "fields": [ + { + "type": "id", + "name": "osm_id", + "key": null + }, + { + "type": "geometry", + "name": "geometry", + "key": null + }, + { + "type": "string", + "name": "name", + "key": "name" + }, + { + "type": "mapping_value", + "name": "type", + "key": null + }, + { + "type": "hstore_tags", + "name": "tags", + "key": null + } + ], + "type": "linestring", + "mapping": { + "waterway": ["__any__"], + "barrier": ["ditch"], + "natural": ["cliff"] + } + }, + } +} \ No newline at end of file From 713df565e04ef667890c67daf9342802d6a98f3f Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 2 Dec 2024 15:31:43 -0500 Subject: [PATCH 04/13] Remove config for previous-water-lines --- previous-water-lines.json | 55 --------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 previous-water-lines.json diff --git a/previous-water-lines.json b/previous-water-lines.json deleted file mode 100644 index cd14730f..00000000 --- a/previous-water-lines.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "tags": { - "load_all": true, - "exclude": ["created_by", "source", "source:datetime"] - }, - "generalized_tables": { - "water_lines_gen0": { - "source": "water_lines_gen1", - "sql_filter": null, - "tolerance": 200 - }, - "water_lines_gen1": { - "source": "water_lines", - "sql_filter": null, - "tolerance": 50.0 - } - }, - "tables": { - "water_lines": { - "fields": [ - { - "type": "id", - "name": "osm_id", - "key": null - }, - { - "type": "geometry", - "name": "geometry", - "key": null - }, - { - "type": "string", - "name": "name", - "key": "name" - }, - { - "type": "mapping_value", - "name": "type", - "key": null - }, - { - "type": "hstore_tags", - "name": "tags", - "key": null - } - ], - "type": "linestring", - "mapping": { - "waterway": ["__any__"], - "barrier": ["ditch"], - "natural": ["cliff"] - } - }, - } -} \ No newline at end of file From 0b2ae9bb82cc02609de23f63171839378c855aef Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 2 Dec 2024 16:00:10 -0500 Subject: [PATCH 05/13] Add columns for start_date and end_date for admin areas --- images/tiler-imposm/config/layers/admin_areas.json | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/images/tiler-imposm/config/layers/admin_areas.json b/images/tiler-imposm/config/layers/admin_areas.json index 90b772ec..7610e3a0 100644 --- a/images/tiler-imposm/config/layers/admin_areas.json +++ b/images/tiler-imposm/config/layers/admin_areas.json @@ -144,6 +144,16 @@ "type": "boolint", "name": "has_label", "key": false + }, + { + "type": "string", + "name": "start_date", + "key": "start_date" + }, + { + "type": "string", + "name": "end_date", + "key": "end_date" } ], "type": "polygon", From 6cf7480866cf7ebbbd042ae939dd9cda601aaeeb Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 2 Dec 2024 16:26:42 -0500 Subject: [PATCH 06/13] Rename tables names --- .../config/layers/admin_lines.json | 14 +++++------ .../config/layers/water_areas.json | 12 +++++----- .../config/layers/water_lines.json | 8 +++---- .../providers/admin_boundaries_maritime.toml | 20 ++++++++-------- .../admin_boundaries_maritime.zoom.toml | 10 ++++---- .../config/providers/water_areas.toml | 24 +++++++++---------- .../config/providers/water_areas.zoom.toml | 12 +++++----- .../config/providers/water_lines.toml | 16 ++++++------- .../config/providers/water_lines.zoom.toml | 8 +++---- 9 files changed, 62 insertions(+), 62 deletions(-) diff --git a/images/tiler-imposm/config/layers/admin_lines.json b/images/tiler-imposm/config/layers/admin_lines.json index 1446a2d8..294f3457 100644 --- a/images/tiler-imposm/config/layers/admin_lines.json +++ b/images/tiler-imposm/config/layers/admin_lines.json @@ -8,37 +8,37 @@ ] }, "generalized_tables": { - "admin_lines_zoom_0_2": { + "admin_lines_z0_2": { "source": "admin_lines", "sql_filter": "maritime='yes'", "tolerance": 5000 }, - "admin_lines_zoom_3_5": { + "admin_lines_z3_5": { "source": "admin_lines", "sql_filter": "maritime='yes'", "tolerance": 2000 }, - "admin_lines_zoom_6_7": { + "admin_lines_z6_7": { "source": "admin_lines", "sql_filter": "maritime='yes'", "tolerance": 1000 }, - "admin_lines_zoom_8_9": { + "admin_lines_z8_9": { "source": "admin_lines", "sql_filter": "maritime='yes'", "tolerance": 500 }, - "admin_lines_zoom_10_12": { + "admin_lines_z10_12": { "source": "admin_lines", "sql_filter": "maritime='yes'", "tolerance": 100 }, - "admin_lines_zoom_13_15": { + "admin_lines_z13_15": { "source": "admin_lines", "sql_filter": "maritime='yes'", "tolerance": 10 }, - "admin_lines_zoom_16_20": { + "admin_lines_z16_20": { "source": "admin_lines", "sql_filter": "maritime='yes'" } diff --git a/images/tiler-imposm/config/layers/water_areas.json b/images/tiler-imposm/config/layers/water_areas.json index cac87393..528717b0 100644 --- a/images/tiler-imposm/config/layers/water_areas.json +++ b/images/tiler-imposm/config/layers/water_areas.json @@ -8,32 +8,32 @@ ] }, "generalized_tables": { - "water_areas_zoom_0_2": { + "water_areas_z0_2": { "source": "water_areas", "sql_filter": "type IN ('water', 'riverbank') AND area > 100000000", "tolerance": 250000 }, - "water_areas_zoom_3_5": { + "water_areas_z3_5": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank') AND area > 50000000", "tolerance": 25000 }, - "water_areas_zoom_6_7": { + "water_areas_z6_7": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank') AND area > 1000000", "tolerance": 5000 }, - "water_areas_zoom_8_9": { + "water_areas_z8_9": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank') AND area > 10000", "tolerance": 1000 }, - "water_areas_zoom_10_12": { + "water_areas_z10_12": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank')", "tolerance": 100 }, - "water_areas_zoom_13_15": { + "water_areas_z13_15": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank', 'dock')", "tolerance": 10 diff --git a/images/tiler-imposm/config/layers/water_lines.json b/images/tiler-imposm/config/layers/water_lines.json index e8051d99..af674bc2 100644 --- a/images/tiler-imposm/config/layers/water_lines.json +++ b/images/tiler-imposm/config/layers/water_lines.json @@ -8,22 +8,22 @@ ] }, "generalized_tables": { - "water_lines_zoom_8_9": { + "water_lines_z8_9": { "source": "water_lines", "sql_filter": "type IN ('river', 'canal')", "tolerance": 1000 }, - "water_lines_zoom_10_11": { + "water_lines_z10_11": { "source": "water_lines", "sql_filter": "type IN ('river', 'canal', 'cliff', 'dam')", "tolerance": 100 }, - "water_lines_zoom_12_14": { + "water_lines_z12_14": { "source": "water_lines", "sql_filter": "type IN ('river', 'canal', 'cliff', 'dam', 'stream')", "tolerance": 10 }, - "water_lines_zoom_15_20": { + "water_lines_z15_20": { "source": "water_lines", "sql_filter": "type IN ('river', 'canal', 'cliff', 'dam', 'stream', 'ditch', 'drain')", "tolerance": 0 diff --git a/images/tiler-server/config/providers/admin_boundaries_maritime.toml b/images/tiler-server/config/providers/admin_boundaries_maritime.toml index 424963ec..02e3bc86 100644 --- a/images/tiler-server/config/providers/admin_boundaries_maritime.toml +++ b/images/tiler-server/config/providers/admin_boundaries_maritime.toml @@ -1,5 +1,5 @@ [[providers.layers]] -name = "admin_lines_zoom_0_2" +name = "admin_lines_z0_2" geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "osm_id" @@ -17,13 +17,13 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_lines_zoom_0_2 + osm_admin_lines_z0_2 WHERE geometry && !BBOX! """ [[providers.layers]] -name = "admin_lines_zoom_3_5" +name = "admin_lines_z3_5" geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "osm_id" @@ -41,13 +41,13 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_lines_zoom_3_5 + osm_admin_lines_z3_5 WHERE geometry && !BBOX! """ [[providers.layers]] -name = "admin_lines_zoom_6_7" +name = "admin_lines_z6_7" geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "osm_id" @@ -65,13 +65,13 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_lines_zoom_6_7 + osm_admin_lines_z6_7 WHERE geometry && !BBOX! """ [[providers.layers]] -name = "admin_lines_zoom_8_9" +name = "admin_lines_z8_9" geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "osm_id" @@ -89,13 +89,13 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_lines_zoom_8_9 + osm_admin_lines_z8_9 WHERE geometry && !BBOX! """ [[providers.layers]] -name = "admin_lines_zoom_10_12" +name = "admin_lines_z10_12" geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "osm_id" @@ -113,7 +113,7 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_lines_zoom_10_12 + osm_admin_lines_z10_12 WHERE geometry && !BBOX! """ diff --git a/images/tiler-server/config/providers/admin_boundaries_maritime.zoom.toml b/images/tiler-server/config/providers/admin_boundaries_maritime.zoom.toml index 56771b04..a6de8555 100644 --- a/images/tiler-server/config/providers/admin_boundaries_maritime.zoom.toml +++ b/images/tiler-server/config/providers/admin_boundaries_maritime.zoom.toml @@ -1,29 +1,29 @@ [[maps.layers]] name = "land_ohm_maritime" -provider_layer = "osm.admin_lines_zoom_0_2" +provider_layer = "osm.admin_lines_z0_2" min_zoom = 0 max_zoom = 2 [[maps.layers]] name = "land_ohm_maritime" -provider_layer = "osm.admin_lines_zoom_3_5" +provider_layer = "osm.admin_lines_z3_5" min_zoom = 3 max_zoom = 5 [[maps.layers]] name = "land_ohm_maritime" -provider_layer = "osm.admin_lines_zoom_6_7" +provider_layer = "osm.admin_lines_z6_7" min_zoom = 6 max_zoom = 7 [[maps.layers]] name = "land_ohm_maritime" -provider_layer = "osm.admin_lines_zoom_8_9" +provider_layer = "osm.admin_lines_z8_9" min_zoom = 8 max_zoom = 9 [[maps.layers]] name = "land_ohm_maritime" -provider_layer = "osm.admin_lines_zoom_10_12" +provider_layer = "osm.admin_lines_z10_12" min_zoom = 10 max_zoom = 12 diff --git a/images/tiler-server/config/providers/water_areas.toml b/images/tiler-server/config/providers/water_areas.toml index 0a6b6a4a..4e632dd0 100644 --- a/images/tiler-server/config/providers/water_areas.toml +++ b/images/tiler-server/config/providers/water_areas.toml @@ -2,7 +2,7 @@ geometry_fieldname = "geometry" geometry_type = "multipolygon" id_fieldname = "osm_id" -name = "water_areas_zoom_0_2" +name = "water_areas_z0_2" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, @@ -16,7 +16,7 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_areas_zoom_0_2 + osm_water_areas_z0_2 WHERE geometry && !BBOX! """ @@ -25,7 +25,7 @@ WHERE geometry_fieldname = "geometry" geometry_type = "multipolygon" id_fieldname = "osm_id" -name = "water_areas_zoom_3_5" +name = "water_areas_z3_5" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, @@ -39,7 +39,7 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_areas_zoom_3_5 + osm_water_areas_z3_5 WHERE geometry && !BBOX! """ @@ -49,7 +49,7 @@ WHERE geometry_fieldname = "geometry" geometry_type = "multipolygon" id_fieldname = "osm_id" -name = "water_areas_zoom_6_7" +name = "water_areas_z6_7" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, @@ -63,7 +63,7 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_areas_zoom_6_7 + osm_water_areas_z6_7 WHERE geometry && !BBOX! """ @@ -72,7 +72,7 @@ WHERE geometry_fieldname = "geometry" geometry_type = "multipolygon" id_fieldname = "osm_id" -name = "water_areas_zoom_8_9" +name = "water_areas_z8_9" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, @@ -86,7 +86,7 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_areas_zoom_8_9 + osm_water_areas_z8_9 WHERE geometry && !BBOX! """ @@ -95,7 +95,7 @@ WHERE geometry_fieldname = "geometry" geometry_type = "multipolygon" id_fieldname = "osm_id" -name = "water_areas_zoom_10_12" +name = "water_areas_z10_12" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, @@ -109,7 +109,7 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_areas_zoom_10_12 + osm_water_areas_z10_12 WHERE geometry && !BBOX! """ @@ -118,7 +118,7 @@ WHERE geometry_fieldname = "geometry" geometry_type = "multipolygon" id_fieldname = "osm_id" -name = "water_areas_zoom_13_15" +name = "water_areas_z13_15" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, @@ -132,7 +132,7 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_areas_zoom_13_15 + osm_water_areas_z13_15 WHERE geometry && !BBOX! """ diff --git a/images/tiler-server/config/providers/water_areas.zoom.toml b/images/tiler-server/config/providers/water_areas.zoom.toml index 6981362d..2b766cbe 100644 --- a/images/tiler-server/config/providers/water_areas.zoom.toml +++ b/images/tiler-server/config/providers/water_areas.zoom.toml @@ -1,36 +1,36 @@ [[maps.layers]] name = "water_areas" -provider_layer = "osm.water_areas_zoom_0_2" +provider_layer = "osm.water_areas_z0_2" min_zoom = 0 max_zoom = 2 [[maps.layers]] name = "water_areas" -provider_layer = "osm.water_areas_zoom_3_5" +provider_layer = "osm.water_areas_z3_5" min_zoom = 3 max_zoom = 5 [[maps.layers]] name = "water_areas" -provider_layer = "osm.water_areas_zoom_6_7" +provider_layer = "osm.water_areas_z6_7" min_zoom = 6 max_zoom = 7 [[maps.layers]] name = "water_areas" -provider_layer = "osm.water_areas_zoom_8_9" +provider_layer = "osm.water_areas_z8_9" min_zoom = 8 max_zoom = 9 [[maps.layers]] name = "water_areas" -provider_layer = "osm.water_areas_zoom_10_12" +provider_layer = "osm.water_areas_z10_12" min_zoom = 10 max_zoom = 12 [[maps.layers]] name = "water_areas" -provider_layer = "osm.water_areas_zoom_13_15" +provider_layer = "osm.water_areas_z13_15" min_zoom = 13 max_zoom = 15 diff --git a/images/tiler-server/config/providers/water_lines.toml b/images/tiler-server/config/providers/water_lines.toml index 709b796b..5c511e11 100644 --- a/images/tiler-server/config/providers/water_lines.toml +++ b/images/tiler-server/config/providers/water_lines.toml @@ -2,7 +2,7 @@ geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "osm_id" -name = "water_lines_zoom_8_9" +name = "water_lines_z8_9" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, @@ -16,7 +16,7 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_lines_zoom_8_9 + osm_water_lines_z8_9 WHERE geometry && !BBOX! """ @@ -25,7 +25,7 @@ WHERE geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "osm_id" -name = "water_lines_zoom_10_11" +name = "water_lines_z10_11" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, @@ -39,7 +39,7 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_lines_zoom_10_11 + osm_water_lines_z10_11 WHERE geometry && !BBOX! """ @@ -48,7 +48,7 @@ WHERE geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "osm_id" -name = "water_lines_zoom_12_14" +name = "water_lines_z12_14" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, @@ -62,7 +62,7 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_lines_zoom_12_14 + osm_water_lines_z12_14 WHERE geometry && !BBOX! """ @@ -71,7 +71,7 @@ WHERE geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "osm_id" -name = "water_lines_zoom_15_20" +name = "water_lines_z15_20" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, @@ -85,7 +85,7 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_lines_zoom_15_20 + osm_water_lines_z15_20 WHERE geometry && !BBOX! """ diff --git a/images/tiler-server/config/providers/water_lines.zoom.toml b/images/tiler-server/config/providers/water_lines.zoom.toml index 38a42f80..1549e745 100644 --- a/images/tiler-server/config/providers/water_lines.zoom.toml +++ b/images/tiler-server/config/providers/water_lines.zoom.toml @@ -1,23 +1,23 @@ [[maps.layers]] name = "water_lines" -provider_layer = "osm.water_lines_zoom_8_9" +provider_layer = "osm.water_lines_z8_9" min_zoom = 8 max_zoom = 9 [[maps.layers]] name = "water_lines" -provider_layer = "osm.water_lines_zoom_10_11" +provider_layer = "osm.water_lines_z10_11" min_zoom = 10 max_zoom = 11 [[maps.layers]] name = "water_lines" -provider_layer = "osm.water_lines_zoom_12_14" +provider_layer = "osm.water_lines_z12_14" min_zoom = 12 max_zoom = 14 [[maps.layers]] name = "water_lines" -provider_layer = "osm.water_lines_zoom_15_20" +provider_layer = "osm.water_lines_z15_20" min_zoom = 15 max_zoom = 20 From dc09ae71c26fa44599faf23a273600cc8ef57da8 Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 2 Dec 2024 17:02:33 -0500 Subject: [PATCH 07/13] Update centroid for water areas --- .../config/layers/water_areas.json | 54 +++++++++++---- .../providers/water_areas.centroids.toml | 66 ++++++++----------- .../providers/water_areas.centroids.zoom.toml | 14 ++-- 3 files changed, 75 insertions(+), 59 deletions(-) diff --git a/images/tiler-imposm/config/layers/water_areas.json b/images/tiler-imposm/config/layers/water_areas.json index 528717b0..397ae53e 100644 --- a/images/tiler-imposm/config/layers/water_areas.json +++ b/images/tiler-imposm/config/layers/water_areas.json @@ -1,42 +1,70 @@ { - "tags": { - "load_all": true, - "exclude": [ - "created_by", - "source", - "source:datetime" - ] - }, "generalized_tables": { "water_areas_z0_2": { "source": "water_areas", "sql_filter": "type IN ('water', 'riverbank') AND area > 100000000", - "tolerance": 250000 + "tolerance": 50000 + }, + "water_areas_centroid_z0_2": { + "source": "water_areas", + "sql_filter": "type IN ('water', 'riverbank') AND area > 100000000", + "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')" }, "water_areas_z3_5": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank') AND area > 50000000", "tolerance": 25000 }, + "water_areas_centroid_z3_5": { + "source": "water_areas", + "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank') AND area > 50000000", + "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')" + }, "water_areas_z6_7": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank') AND area > 1000000", - "tolerance": 5000 + "tolerance": 10000 + }, + "water_areas_centroid_z6_7": { + "source": "water_areas", + "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank') AND area > 1000000", + "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')" }, "water_areas_z8_9": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank') AND area > 10000", - "tolerance": 1000 + "tolerance": 5000 + }, + "water_areas_centroid_z8_9": { + "source": "water_areas", + "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank') AND area > 10000", + "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')" }, "water_areas_z10_12": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank')", - "tolerance": 100 + "tolerance": 1000 + }, + "water_areas_centroid_z10_12": { + "source": "water_areas", + "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank')", + "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')" }, "water_areas_z13_15": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank', 'dock')", - "tolerance": 10 + "tolerance": 100 + }, + "water_areas_centroid_z13_15": { + "source": "water_areas", + "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank', 'dock')", + "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", + "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')" } }, "tables": { diff --git a/images/tiler-server/config/providers/water_areas.centroids.toml b/images/tiler-server/config/providers/water_areas.centroids.toml index 314f8fc6..1edde430 100644 --- a/images/tiler-server/config/providers/water_areas.centroids.toml +++ b/images/tiler-server/config/providers/water_areas.centroids.toml @@ -2,10 +2,10 @@ geometry_fieldname = "geometry" geometry_type = "point" id_fieldname = "osm_id" -name = "water_areas_zoom_0_2_centroid" +name = "water_areas_centroid_z0_2" sql = """ SELECT - ST_AsMVTGeom((ST_MaximumInscribedCircle(geometry)).center, !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, name, type, @@ -16,21 +16,19 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_areas_zoom_0_2 + osm_water_areas_centroid_z0_2 WHERE - name IS NOT NULL - AND name <> '' - AND geometry && !BBOX! + geometry && !BBOX! """ [[providers.layers]] geometry_fieldname = "geometry" geometry_type = "point" id_fieldname = "osm_id" -name = "water_areas_zoom_3_5_centroid" +name = "water_areas_centroid_z3_5" sql = """ SELECT - ST_AsMVTGeom((ST_MaximumInscribedCircle(geometry)).center, !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, name, type, @@ -41,11 +39,9 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_areas_zoom_3_5 + osm_water_areas_centroid_z3_5 WHERE - name IS NOT NULL - AND name <> '' - AND geometry && !BBOX! + geometry && !BBOX! """ # Water bodies > 1,000,000 sqm @@ -53,10 +49,10 @@ WHERE geometry_fieldname = "geometry" geometry_type = "point" id_fieldname = "osm_id" -name = "water_areas_zoom_6_7_centroid" +name = "water_areas_centroid_z6_7" sql = """ SELECT - ST_AsMVTGeom((ST_MaximumInscribedCircle(geometry)).center, !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, name, type, @@ -67,11 +63,9 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_areas_zoom_6_7 + osm_water_areas_centroid_z6_7 WHERE - name IS NOT NULL - AND name <> '' - AND geometry && !BBOX! + geometry && !BBOX! """ # Water bodies > 10,000 sqm @@ -79,10 +73,10 @@ WHERE geometry_fieldname = "geometry" geometry_type = "point" id_fieldname = "osm_id" -name = "water_areas_zoom_8_9_centroid" +name = "water_areas_centroid_z8_9" sql = """ SELECT - ST_AsMVTGeom((ST_MaximumInscribedCircle(geometry)).center, !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, name, type, @@ -93,21 +87,19 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_areas_zoom_8_9 + osm_water_areas_centroid_z8_9 WHERE - name IS NOT NULL - AND name <> '' - AND geometry && !BBOX! + geometry && !BBOX! """ [[providers.layers]] geometry_fieldname = "geometry" geometry_type = "point" id_fieldname = "osm_id" -name = "water_areas_zoom_10_12_centroid" +name = "water_areas_centroid_z10_12" sql = """ SELECT - ST_AsMVTGeom((ST_MaximumInscribedCircle(geometry)).center, !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, name, type, @@ -118,7 +110,7 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_areas_zoom_10_12 + osm_water_areas_centroid_z10_12 WHERE name IS NOT NULL AND name <> '' @@ -129,10 +121,10 @@ WHERE geometry_fieldname = "geometry" geometry_type = "point" id_fieldname = "osm_id" -name = "water_areas_zoom_13_15_centroid" +name = "water_areas_centroid_z13_15" sql = """ SELECT - ST_AsMVTGeom((ST_MaximumInscribedCircle(geometry)).center, !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, name, type, @@ -143,21 +135,19 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_areas_zoom_13_15 + osm_water_areas_centroid_z13_15 WHERE - name IS NOT NULL - AND name <> '' - AND geometry && !BBOX! + geometry && !BBOX! """ [[providers.layers]] geometry_fieldname = "geometry" geometry_type = "point" id_fieldname = "osm_id" -name = "water_areas_16_20_centroid" +name = "water_areas_centroid_z16_20" sql = """ SELECT - ST_AsMVTGeom((ST_MaximumInscribedCircle(geometry)).center, !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, ABS(osm_id) AS osm_id, name, type, @@ -168,9 +158,7 @@ SELECT isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_water_areas_16_20 + osm_water_areas_centroid_16_20 WHERE - name IS NOT NULL - AND name <> '' - AND geometry && !BBOX! + geometry && !BBOX! """ diff --git a/images/tiler-server/config/providers/water_areas.centroids.zoom.toml b/images/tiler-server/config/providers/water_areas.centroids.zoom.toml index 9f8bec64..086b8c90 100644 --- a/images/tiler-server/config/providers/water_areas.centroids.zoom.toml +++ b/images/tiler-server/config/providers/water_areas.centroids.zoom.toml @@ -1,41 +1,41 @@ [[maps.layers]] name = "water_areas_centroids" -provider_layer = "osm.water_areas_zoom_0_2_centroid" +provider_layer = "osm.water_areas_centroid_z0_2" min_zoom = 0 max_zoom = 2 [[maps.layers]] name = "water_areas_centroids" -provider_layer = "osm.water_areas_zoom_3_5_centroid" +provider_layer = "osm.water_areas_centroid_z3_5" min_zoom = 3 max_zoom = 5 [[maps.layers]] name = "water_areas_centroids" -provider_layer = "osm.water_areas_zoom_6_7_centroid" +provider_layer = "osm.water_areas_centroid_z6_7" min_zoom = 6 max_zoom = 7 [[maps.layers]] name = "water_areas_centroids" -provider_layer = "osm.water_areas_zoom_8_9_centroid" +provider_layer = "osm.water_areas_centroid_z8_9" min_zoom = 8 max_zoom = 9 [[maps.layers]] name = "water_areas_centroids" -provider_layer = "osm.water_areas_zoom_10_12_centroid" +provider_layer = "osm.water_areas_centroid_z10_12" min_zoom = 10 max_zoom = 12 [[maps.layers]] name = "water_areas_centroids" -provider_layer = "osm.water_areas_zoom_13_15_centroid" +provider_layer = "osm.water_areas_centroid_z13_15" min_zoom = 13 max_zoom = 15 [[maps.layers]] name = "water_areas_centroids" -provider_layer = "osm.water_areas_16_20_centroid" +provider_layer = "osm.water_areas_centroid_z16_20" min_zoom = 16 max_zoom = 20 \ No newline at end of file From efec82c3aef4c23d6cc01257f62f40f686db9ebb Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 2 Dec 2024 18:27:20 -0500 Subject: [PATCH 08/13] Rename table name for boundary lines --- images/tiler-imposm/config/layers/admin_areas.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/images/tiler-imposm/config/layers/admin_areas.json b/images/tiler-imposm/config/layers/admin_areas.json index 7610e3a0..3fe1346f 100644 --- a/images/tiler-imposm/config/layers/admin_areas.json +++ b/images/tiler-imposm/config/layers/admin_areas.json @@ -8,7 +8,7 @@ ] }, "generalized_tables": { - "admin_boundaries_z0_2": { + "admin_boundaries_lines_z0_2": { "source": "admin_areas", "tolerance": 5000, "geometry_transform": "ST_Boundary(geometry)", @@ -22,7 +22,7 @@ "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", "sql_filter": "admin_level IN (1,2) AND name IS NOT NULL AND name <> ''" }, - "admin_boundaries_z3_5": { + "admin_boundaries_lines_z3_5": { "source": "admin_areas", "tolerance": 1000, "geometry_transform": "ST_Boundary(geometry)", @@ -36,7 +36,7 @@ "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", "sql_filter": "admin_level IN (1,2,3,4) AND name IS NOT NULL AND name <> ''" }, - "admin_boundaries_z6_7": { + "admin_boundaries_lines_z6_7": { "source": "admin_areas", "tolerance": 500, "geometry_transform": "ST_Boundary(geometry)", @@ -50,7 +50,7 @@ "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", "sql_filter": "admin_level IN (1,2,3,4,5,6) AND name IS NOT NULL AND name <> ''" }, - "admin_boundaries_z8_9": { + "admin_boundaries_lines_z8_9": { "source": "admin_areas", "tolerance": 200, "geometry_transform": "ST_Boundary(geometry)", @@ -64,7 +64,7 @@ "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9) AND name IS NOT NULL AND name <> ''" }, - "admin_boundaries_z10_12": { + "admin_boundaries_lines_z10_12": { "source": "admin_areas", "tolerance": 100, "geometry_transform": "ST_Boundary(geometry)", @@ -78,7 +78,7 @@ "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9,10) AND name IS NOT NULL AND name <> ''" }, - "admin_boundaries_z13_15": { + "admin_boundaries_lines_z13_15": { "source": "admin_areas", "tolerance": 50, "geometry_transform": "ST_Boundary(geometry)", @@ -92,7 +92,7 @@ "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9,10) AND name IS NOT NULL AND name <> ''" }, - "admin_boundaries_z16_20": { + "admin_boundaries_lines_z16_20": { "source": "admin_areas", "tolerance": 5, "geometry_transform": "ST_Boundary(geometry)", From 3eba4b0a2be37de444951c26f5c48a4ed0387c6d Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 2 Dec 2024 18:42:32 -0500 Subject: [PATCH 09/13] Update tiler server layers --- .../providers/admin_boundaries_areas.toml | 181 ------------------ .../admin_boundaries_areas.zoom.toml | 42 ---- .../providers/admin_boundaries_centroids.toml | 148 ++++++++------ .../admin_boundaries_centroids.zoom.toml | 23 ++- .../providers/admin_boundaries_lines.toml | 123 ++++++------ .../admin_boundaries_lines.zoom.toml | 14 +- 6 files changed, 167 insertions(+), 364 deletions(-) delete mode 100644 images/tiler-server/config/providers/admin_boundaries_areas.toml delete mode 100644 images/tiler-server/config/providers/admin_boundaries_areas.zoom.toml diff --git a/images/tiler-server/config/providers/admin_boundaries_areas.toml b/images/tiler-server/config/providers/admin_boundaries_areas.toml deleted file mode 100644 index a407a18c..00000000 --- a/images/tiler-server/config/providers/admin_boundaries_areas.toml +++ /dev/null @@ -1,181 +0,0 @@ -# Layer configuration for admin boundaries 0-2 -[[providers.layers]] -name = "admin_boundaries_0-2" -geometry_fieldname = "geometry" -geometry_type = "multipolygon" -id_fieldname = "id" -sql = """ -SELECT - ST_AsMVTGeom(ST_Simplify(geometry, 500), !BBOX!) AS geometry, - id, - osm_id, - admin_level, - name, - type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, - {{LENGUAGES}} -FROM - osm_admin_areas -WHERE - admin_level IN (1,2) - AND geometry && !BBOX! -""" - -# Layer configuration for admin boundaries 3-5 -[[providers.layers]] -name = "admin_boundaries_3-5" -geometry_fieldname = "geometry" -geometry_type = "multipolygon" -id_fieldname = "id" -sql = """ -SELECT - ST_AsMVTGeom(ST_Simplify(geometry, 200), !BBOX!) AS geometry, - id, - osm_id, - admin_level, - name, - type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, - {{LENGUAGES}} -FROM - osm_admin_areas -WHERE - admin_level IN (1,2,3,4) - AND geometry && !BBOX! -""" - -# Layer configuration for admin boundaries 6-7 -[[providers.layers]] -name = "admin_boundaries_6-7" -geometry_fieldname = "geometry" -geometry_type = "multipolygon" -id_fieldname = "id" -sql = """ -SELECT - ST_AsMVTGeom(ST_Simplify(geometry, 100), !BBOX!) AS geometry, - id, - osm_id, - admin_level, - name, - type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, - {{LENGUAGES}} -FROM - osm_admin_areas -WHERE - admin_level IN (1,2,3,4,5,6) - AND geometry && !BBOX! -""" - -# Layer configuration for admin boundaries 8-9 -[[providers.layers]] -name = "admin_boundaries_8-9" -geometry_fieldname = "geometry" -geometry_type = "multipolygon" -id_fieldname = "id" -sql = """ -SELECT - ST_AsMVTGeom(ST_Simplify(geometry, 50), !BBOX!) AS geometry, - id, - osm_id, - admin_level, - name, - type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, - {{LENGUAGES}} -FROM - osm_admin_areas -WHERE - admin_level IN (1,2,3,4,5,6,7,8,9) - AND geometry && !BBOX! -""" - -# Layer configuration for admin boundaries 10-12 -[[providers.layers]] -name = "admin_boundaries_10-12" -geometry_fieldname = "geometry" -geometry_type = "multipolygon" -id_fieldname = "id" -sql = """ -SELECT - ST_AsMVTGeom(ST_Simplify(geometry, 20), !BBOX!) AS geometry, - id, - osm_id, - admin_level, - name, - type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, - {{LENGUAGES}} -FROM - osm_admin_areas -WHERE - admin_level IN (1,2,3,4,5,6,7,8,9,10) - AND geometry && !BBOX! -""" - -# Layer configuration for admin boundaries 13-15 -[[providers.layers]] -name = "admin_boundaries_13-15" -geometry_fieldname = "geometry" -geometry_type = "multipolygon" -id_fieldname = "id" -sql = """ -SELECT - ST_AsMVTGeom(ST_Simplify(geometry, 5), !BBOX!) AS geometry, - id, - osm_id, - admin_level, - name, - type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, - {{LENGUAGES}} -FROM - osm_admin_areas -WHERE - admin_level IN (1,2,3,4,5,6,7,8,9,10) - AND geometry && !BBOX! -""" - -# Layer configuration for admin boundaries 16-20 -[[providers.layers]] -name = "admin_boundaries_16-20" -geometry_fieldname = "geometry" -geometry_type = "multipolygon" -id_fieldname = "id" -sql = """ -SELECT - ST_AsMVTGeom(ST_Simplify(geometry, 1), !BBOX!) AS geometry, - id, - osm_id, - admin_level, - name, - type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, - {{LENGUAGES}} -FROM - osm_admin_areas -WHERE - admin_level IN (1,2,3,4,5,6,7,8,9,10) - AND geometry && !BBOX! -""" diff --git a/images/tiler-server/config/providers/admin_boundaries_areas.zoom.toml b/images/tiler-server/config/providers/admin_boundaries_areas.zoom.toml deleted file mode 100644 index 976556e8..00000000 --- a/images/tiler-server/config/providers/admin_boundaries_areas.zoom.toml +++ /dev/null @@ -1,42 +0,0 @@ -# Admin Bounduaries Areas -[[maps.layers]] -name = "land_ohm" -provider_layer = "osm.admin_boundaries_0-2" -min_zoom = 0 -max_zoom = 2 - -[[maps.layers]] -name = "land_ohm" -provider_layer = "osm.admin_boundaries_3-5" -min_zoom = 3 -max_zoom = 5 - -[[maps.layers]] -name = "land_ohm" -provider_layer = "osm.admin_boundaries_6-7" -min_zoom = 6 -max_zoom = 7 - -[[maps.layers]] -name = "land_ohm" -provider_layer = "osm.admin_boundaries_8-9" -min_zoom = 8 -max_zoom = 9 - -[[maps.layers]] -name = "land_ohm" -provider_layer = "osm.admin_boundaries_10-12" -min_zoom = 10 -max_zoom = 12 - -[[maps.layers]] -name = "land_ohm" -provider_layer = "osm.admin_boundaries_13-15" -min_zoom = 13 -max_zoom = 15 - -[[maps.layers]] -name = "land_ohm" -provider_layer = "osm.admin_boundaries_16-20" -min_zoom = 16 -max_zoom = 20 \ No newline at end of file diff --git a/images/tiler-server/config/providers/admin_boundaries_centroids.toml b/images/tiler-server/config/providers/admin_boundaries_centroids.toml index 20c80413..57baa731 100644 --- a/images/tiler-server/config/providers/admin_boundaries_centroids.toml +++ b/images/tiler-server/config/providers/admin_boundaries_centroids.toml @@ -1,82 +1,71 @@ -## Boundaries centroids from admin_level=1,2 and zoom 0-2 [[providers.layers]] -name = "admin_boundaries_centroids_0-2" +name = "admin_boundaries_centroid_z0_2" geometry_fieldname = "geometry" geometry_type = "point" id_fieldname = "id" sql = """ SELECT - ST_AsMVTGeom((ST_MaximumInscribedCircle(geometry)).center, !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, osm_id, admin_level, name, type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_areas + osm_admin_boundaries_centroid_z0_2 WHERE - admin_level IN (1,2) - AND has_label = 0 - AND name IS NOT NULL - AND name <> '' - AND geometry && !BBOX! + geometry && !BBOX! """ -## Boundaries centroids from admin_level=1,2,3,4 and zoom=3-5 [[providers.layers]] -name = "admin_boundaries_centroids_3-5" +name = "admin_boundaries_centroid_z3_5" geometry_fieldname = "geometry" geometry_type = "point" id_fieldname = "id" sql = """ SELECT - ST_AsMVTGeom((ST_MaximumInscribedCircle(geometry)).center, !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, osm_id, admin_level, name, type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_areas + osm_admin_boundaries_centroid_z3_5 WHERE - admin_level IN (1,2,3,4) - AND has_label = 0 - AND name IS NOT NULL - AND name <> '' - AND geometry && !BBOX! + geometry && !BBOX! """ -## Boundaries centroids from admin_level=1,2,3,4,5,6 and zoom=6-7 [[providers.layers]] -name = "admin_boundaries_centroids_6-7" +name = "admin_boundaries_centroid_z6_7" geometry_fieldname = "geometry" geometry_type = "point" id_fieldname = "id" sql = """ SELECT - ST_AsMVTGeom((ST_MaximumInscribedCircle(geometry)).center, !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, osm_id, admin_level, name, type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_areas + osm_admin_boundaries_centroid_z6_7 WHERE admin_level IN (1,2,3,4,5,6) AND has_label = 0 @@ -85,60 +74,99 @@ WHERE AND geometry && !BBOX! """ -## Boundaries centroids from admin_level=1,2,3,4,5,6,7,8,9 and zoom=8-9 [[providers.layers]] -name = "admin_boundaries_centroids_8-9" +name = "admin_boundaries_centroid_z8_9" geometry_fieldname = "geometry" geometry_type = "point" id_fieldname = "id" sql = """ SELECT - ST_AsMVTGeom((ST_MaximumInscribedCircle(geometry)).center, !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, osm_id, admin_level, name, type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_areas + osm_admin_boundaries_centroid_z8_9 WHERE - admin_level IN (1,2,3,4,5,6,7,8,9) - AND has_label = 0 - AND name IS NOT NULL - AND name <> '' - AND geometry && !BBOX! + geometry && !BBOX! """ -## Boundaries centroids from admin_level=1,2,3,4,5,6,7,8,9,10 and zoom=10-20 [[providers.layers]] -name = "admin_boundaries_centroids_10-20" +name = "admin_boundaries_centroid_z10_12" geometry_fieldname = "geometry" geometry_type = "point" id_fieldname = "id" sql = """ SELECT - ST_AsMVTGeom((ST_MaximumInscribedCircle(geometry)).center, !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, osm_id, admin_level, name, type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_areas + osm_admin_boundaries_centroid_z10_12 WHERE - admin_level IN (1,2,3,4,5,6,7,8,9,10) - AND has_label = 0 - AND name IS NOT NULL - AND name <> '' - AND geometry && !BBOX! + geometry && !BBOX! +""" + + +[[providers.layers]] +name = "admin_boundaries_centroid_z13_15" +geometry_fieldname = "geometry" +geometry_type = "point" +id_fieldname = "id" +sql = """ +SELECT + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, + id, + osm_id, + admin_level, + name, + type, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, + {{LENGUAGES}} +FROM + osm_admin_boundaries_centroid_z13_15 +WHERE + geometry && !BBOX! +""" + +[[providers.layers]] +name = "admin_boundaries_centroid_z16_20" +geometry_fieldname = "geometry" +geometry_type = "point" +id_fieldname = "id" +sql = """ +SELECT + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, + id, + osm_id, + admin_level, + name, + type, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, + {{LENGUAGES}} +FROM + osm_admin_boundaries_centroid_z16_20 +WHERE + geometry && !BBOX! """ \ No newline at end of file diff --git a/images/tiler-server/config/providers/admin_boundaries_centroids.zoom.toml b/images/tiler-server/config/providers/admin_boundaries_centroids.zoom.toml index 9b831e35..9b96a896 100644 --- a/images/tiler-server/config/providers/admin_boundaries_centroids.zoom.toml +++ b/images/tiler-server/config/providers/admin_boundaries_centroids.zoom.toml @@ -1,30 +1,41 @@ - [[maps.layers]] name = "land_ohm_centroids" -provider_layer = "osm.admin_boundaries_centroids_0-2" +provider_layer = "osm.admin_boundaries_centroid_z0_2" min_zoom = 0 max_zoom = 2 [[maps.layers]] name = "land_ohm_centroids" -provider_layer = "osm.admin_boundaries_centroids_3-5" +provider_layer = "osm.admin_boundaries_centroid_z3_5" min_zoom = 3 max_zoom = 5 [[maps.layers]] name = "land_ohm_centroids" -provider_layer = "osm.admin_boundaries_centroids_6-7" +provider_layer = "osm.admin_boundaries_centroid_z6_7" min_zoom = 6 max_zoom = 7 [[maps.layers]] name = "land_ohm_centroids" -provider_layer = "osm.admin_boundaries_centroids_8-9" +provider_layer = "osm.admin_boundaries_centroid_z8_9" min_zoom = 8 max_zoom = 9 [[maps.layers]] name = "land_ohm_centroids" -provider_layer = "osm.admin_boundaries_centroids_10-20" +provider_layer = "osm.admin_boundaries_centroid_z10_12" min_zoom = 10 +max_zoom = 12 + +[[maps.layers]] +name = "land_ohm_centroids" +provider_layer = "osm.admin_boundaries_centroid_z13_15" +min_zoom = 13 +max_zoom = 15 + +[[maps.layers]] +name = "land_ohm_centroids" +provider_layer = "osm.admin_boundaries_centroid_z16_20" +min_zoom = 16 max_zoom = 20 \ No newline at end of file diff --git a/images/tiler-server/config/providers/admin_boundaries_lines.toml b/images/tiler-server/config/providers/admin_boundaries_lines.toml index 9dc8ac98..49e8e048 100644 --- a/images/tiler-server/config/providers/admin_boundaries_lines.toml +++ b/images/tiler-server/config/providers/admin_boundaries_lines.toml @@ -1,181 +1,168 @@ -## Boundaries lines from admin_level=1,2, zoom 0-2 and geometry simplification=500 [[providers.layers]] -name = "admin_boundaries_lines_0-2" +name = "admin_boundaries_lines_z0_2" geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "id" sql = """ SELECT - ST_AsMVTGeom(ST_Simplify(ST_Boundary(geometry), 500), !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, osm_id, admin_level, name, type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_areas + osm_admin_boundaries_lines_z0_2 WHERE - admin_level IN (1,2) - AND geometry && !BBOX! + geometry && !BBOX! """ -## Boundaries lines from admin_level=1,2,3,4, zoom 3-5 and geometry simplification=200 [[providers.layers]] -name = "admin_boundaries_lines_3-5" +name = "admin_boundaries_lines_z3_5" geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "id" sql = """ SELECT - ST_AsMVTGeom(ST_Simplify(ST_Boundary(geometry), 200), !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, osm_id, admin_level, name, type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_areas + osm_admin_boundaries_lines_z3_5 WHERE admin_level IN (1,2,3,4) AND geometry && !BBOX! """ -## Boundaries lines from admin_level=1,2,3,4,5,6 , zoom 6-7 and geometry simplification=100 [[providers.layers]] -name = "admin_boundaries_lines_6-7" +name = "admin_boundaries_lines_z6_7" geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "id" sql = """ SELECT - ST_AsMVTGeom(ST_Simplify(ST_Boundary(geometry), 100), !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, osm_id, admin_level, name, type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_areas + osm_admin_boundaries_lines_z6_7 WHERE - admin_level IN (1,2,3,4,5,6) - AND geometry && !BBOX! + geometry && !BBOX! """ -## Boundaries lines from admin_level=1,2,3,4,5,6,7,8,9 , zoom 8-9 and geometry simplification=50 [[providers.layers]] -name = "admin_boundaries_lines_8-9" +name = "admin_boundaries_lines_z8_9" geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "id" sql = """ SELECT - ST_AsMVTGeom(ST_Simplify(ST_Boundary(geometry), 50), !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, osm_id, admin_level, name, type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_areas + osm_admin_boundaries_lines_z8_9 WHERE - admin_level IN (1,2,3,4,5,6,7,8,9) - AND geometry && !BBOX! + geometry && !BBOX! """ -## Boundaries lines from admin_level=1,2,3,4,5,6,7,8,9,10 , zoom 10-12 and geometry simplification=20 [[providers.layers]] -name = "admin_boundaries_lines_10-12" +name = "admin_boundaries_lines_z10_12" geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "id" sql = """ SELECT - ST_AsMVTGeom(ST_Simplify(ST_Boundary(geometry), 20), !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, osm_id, admin_level, name, type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_areas + osm_admin_boundaries_lines_z10_12 WHERE - admin_level IN (1,2,3,4,5,6,7,8,9,10) - AND geometry && !BBOX! + geometry && !BBOX! """ -## Boundaries lines from admin_level=1,2,3,4,5,6,7,8,9,10 , zoom 13-15 and geometry simplification=5 [[providers.layers]] -name = "admin_boundaries_lines_13-15" +name = "admin_boundaries_lines_z13_15" geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "id" sql = """ SELECT - ST_AsMVTGeom(ST_Simplify(ST_Boundary(geometry), 5), !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, osm_id, admin_level, name, type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_areas + osm_admin_boundaries_lines_z13_15 WHERE - admin_level IN (1,2,3,4,5,6,7,8,9,10) - AND geometry && !BBOX! + geometry && !BBOX! """ -## Boundaries lines from admin_level=1,2,3,4,5,6,7,8,9,10 , zoom 16-20 [[providers.layers]] -name = "admin_boundaries_lines_16-20" +name = "admin_boundaries_lines_z16_20" geometry_fieldname = "geometry" geometry_type = "linestring" id_fieldname = "id" sql = """ SELECT - ST_AsMVTGeom(ST_Boundary(geometry), !BBOX!) AS geometry, + ST_AsMVTGeom(geometry, !BBOX!) AS geometry, id, osm_id, admin_level, name, type, - tags->'start_date' AS start_date, - tags->'end_date' AS end_date, - isodatetodecimaldate(pad_date(tags->'start_date', 'start'), FALSE) AS start_decdate, - isodatetodecimaldate(pad_date(tags->'end_date', 'end'), FALSE) AS end_decdate, + start_date, + end_date, + isodatetodecimaldate(pad_date(start_date, 'start'), FALSE) AS start_decdate, + isodatetodecimaldate(pad_date(end_date, 'end'), FALSE) AS end_decdate, {{LENGUAGES}} FROM - osm_admin_areas + osm_admin_boundaries_lines_z16_20 WHERE - admin_level IN (1,2,3,4,5,6,7,8,9,10) - AND geometry && !BBOX! + geometry && !BBOX! """ diff --git a/images/tiler-server/config/providers/admin_boundaries_lines.zoom.toml b/images/tiler-server/config/providers/admin_boundaries_lines.zoom.toml index 5edec885..7cdf0400 100644 --- a/images/tiler-server/config/providers/admin_boundaries_lines.zoom.toml +++ b/images/tiler-server/config/providers/admin_boundaries_lines.zoom.toml @@ -1,41 +1,41 @@ [[maps.layers]] name = "land_ohm_lines" -provider_layer = "osm.admin_boundaries_lines_0-2" +provider_layer = "osm.admin_boundaries_lines_z0_2" min_zoom = 0 max_zoom = 2 [[maps.layers]] name = "land_ohm_lines" -provider_layer = "osm.admin_boundaries_lines_3-5" +provider_layer = "osm.admin_boundaries_lines_z3_5" min_zoom = 3 max_zoom = 5 [[maps.layers]] name = "land_ohm_lines" -provider_layer = "osm.admin_boundaries_lines_6-7" +provider_layer = "osm.admin_boundaries_lines_z6_7" min_zoom = 6 max_zoom = 7 [[maps.layers]] name = "land_ohm_lines" -provider_layer = "osm.admin_boundaries_lines_8-9" +provider_layer = "osm.admin_boundaries_lines_z8_9" min_zoom = 8 max_zoom = 9 [[maps.layers]] name = "land_ohm_lines" -provider_layer = "osm.admin_boundaries_lines_10-12" +provider_layer = "osm.admin_boundaries_lines_z10_12" min_zoom = 10 max_zoom = 12 [[maps.layers]] name = "land_ohm_lines" -provider_layer = "osm.admin_boundaries_lines_13-15" +provider_layer = "osm.admin_boundaries_lines_z13_15" min_zoom = 13 max_zoom = 15 [[maps.layers]] name = "land_ohm_lines" -provider_layer = "osm.admin_boundaries_lines_16-20" +provider_layer = "osm.admin_boundaries_lines_z16_20" min_zoom = 16 max_zoom = 20 From cb8a9c91969c9b68f644c3f9e8e2433d5da0356c Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 2 Dec 2024 18:48:35 -0500 Subject: [PATCH 10/13] Remove tolerance for centroids --- images/tiler-imposm/config/layers/admin_areas.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/images/tiler-imposm/config/layers/admin_areas.json b/images/tiler-imposm/config/layers/admin_areas.json index 3fe1346f..398655f0 100644 --- a/images/tiler-imposm/config/layers/admin_areas.json +++ b/images/tiler-imposm/config/layers/admin_areas.json @@ -59,7 +59,6 @@ }, "admin_boundaries_centroid_z8_9": { "source": "admin_areas", - "tolerance": 200, "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9) AND name IS NOT NULL AND name <> ''" @@ -73,7 +72,6 @@ }, "admin_boundaries_centroid_z10_12": { "source": "admin_areas", - "tolerance": 100, "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9,10) AND name IS NOT NULL AND name <> ''" @@ -87,21 +85,18 @@ }, "admin_boundaries_centroid_z13_15": { "source": "admin_areas", - "tolerance": 50, "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9,10) AND name IS NOT NULL AND name <> ''" }, "admin_boundaries_lines_z16_20": { "source": "admin_areas", - "tolerance": 5, "geometry_transform": "ST_Boundary(geometry)", "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9,10)" }, "admin_boundaries_centroid_z16_20": { "source": "admin_areas", - "tolerance": 5, "geometry_transform": "(ST_MaximumInscribedCircle(geometry)).center", "geometry_transform_types": "GeometryType(geometry) IN ('POLYGON', 'MULTIPOLYGON')", "sql_filter": "admin_level IN (1,2,3,4,5,6,7,8,9,10) AND name IS NOT NULL AND name <> ''" From dc78768704c3ef18f2db9ac4659ed8b5516fdbc3 Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 2 Dec 2024 18:49:17 -0500 Subject: [PATCH 11/13] Update layers water areas --- images/tiler-imposm/config/layers/water_areas.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/images/tiler-imposm/config/layers/water_areas.json b/images/tiler-imposm/config/layers/water_areas.json index 397ae53e..cc45559a 100644 --- a/images/tiler-imposm/config/layers/water_areas.json +++ b/images/tiler-imposm/config/layers/water_areas.json @@ -3,7 +3,7 @@ "water_areas_z0_2": { "source": "water_areas", "sql_filter": "type IN ('water', 'riverbank') AND area > 100000000", - "tolerance": 50000 + "tolerance": 5000 }, "water_areas_centroid_z0_2": { "source": "water_areas", @@ -14,7 +14,7 @@ "water_areas_z3_5": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank') AND area > 50000000", - "tolerance": 25000 + "tolerance": 1000 }, "water_areas_centroid_z3_5": { "source": "water_areas", @@ -25,7 +25,7 @@ "water_areas_z6_7": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank') AND area > 1000000", - "tolerance": 10000 + "tolerance": 500 }, "water_areas_centroid_z6_7": { "source": "water_areas", @@ -36,7 +36,7 @@ "water_areas_z8_9": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank') AND area > 10000", - "tolerance": 5000 + "tolerance": 200 }, "water_areas_centroid_z8_9": { "source": "water_areas", @@ -47,7 +47,7 @@ "water_areas_z10_12": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank')", - "tolerance": 1000 + "tolerance": 100 }, "water_areas_centroid_z10_12": { "source": "water_areas", @@ -58,7 +58,7 @@ "water_areas_z13_15": { "source": "water_areas", "sql_filter": "type IN ('water', 'pond', 'basin', 'canal', 'mill_pond', 'riverbank', 'dock')", - "tolerance": 100 + "tolerance": 50 }, "water_areas_centroid_z13_15": { "source": "water_areas", From de2561d79994a534525156b9f2e90c42cc2754ef Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 2 Dec 2024 19:24:43 -0500 Subject: [PATCH 12/13] Update id column for layers --- .../providers/admin_boundaries_centroids.toml | 35 ++++++++----------- .../providers/admin_boundaries_lines.toml | 35 ++++++++----------- 2 files changed, 28 insertions(+), 42 deletions(-) diff --git a/images/tiler-server/config/providers/admin_boundaries_centroids.toml b/images/tiler-server/config/providers/admin_boundaries_centroids.toml index 57baa731..a309f074 100644 --- a/images/tiler-server/config/providers/admin_boundaries_centroids.toml +++ b/images/tiler-server/config/providers/admin_boundaries_centroids.toml @@ -2,12 +2,11 @@ name = "admin_boundaries_centroid_z0_2" geometry_fieldname = "geometry" geometry_type = "point" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, @@ -26,12 +25,11 @@ WHERE name = "admin_boundaries_centroid_z3_5" geometry_fieldname = "geometry" geometry_type = "point" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, @@ -50,12 +48,11 @@ WHERE name = "admin_boundaries_centroid_z6_7" geometry_fieldname = "geometry" geometry_type = "point" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, @@ -78,12 +75,11 @@ WHERE name = "admin_boundaries_centroid_z8_9" geometry_fieldname = "geometry" geometry_type = "point" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, @@ -102,12 +98,11 @@ WHERE name = "admin_boundaries_centroid_z10_12" geometry_fieldname = "geometry" geometry_type = "point" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, @@ -127,12 +122,11 @@ WHERE name = "admin_boundaries_centroid_z13_15" geometry_fieldname = "geometry" geometry_type = "point" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, @@ -151,12 +145,11 @@ WHERE name = "admin_boundaries_centroid_z16_20" geometry_fieldname = "geometry" geometry_type = "point" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, diff --git a/images/tiler-server/config/providers/admin_boundaries_lines.toml b/images/tiler-server/config/providers/admin_boundaries_lines.toml index 49e8e048..dfc680cd 100644 --- a/images/tiler-server/config/providers/admin_boundaries_lines.toml +++ b/images/tiler-server/config/providers/admin_boundaries_lines.toml @@ -2,12 +2,11 @@ name = "admin_boundaries_lines_z0_2" geometry_fieldname = "geometry" geometry_type = "linestring" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, @@ -26,12 +25,11 @@ WHERE name = "admin_boundaries_lines_z3_5" geometry_fieldname = "geometry" geometry_type = "linestring" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, @@ -51,12 +49,11 @@ WHERE name = "admin_boundaries_lines_z6_7" geometry_fieldname = "geometry" geometry_type = "linestring" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, @@ -75,12 +72,11 @@ WHERE name = "admin_boundaries_lines_z8_9" geometry_fieldname = "geometry" geometry_type = "linestring" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, @@ -99,12 +95,11 @@ WHERE name = "admin_boundaries_lines_z10_12" geometry_fieldname = "geometry" geometry_type = "linestring" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, @@ -123,12 +118,11 @@ WHERE name = "admin_boundaries_lines_z13_15" geometry_fieldname = "geometry" geometry_type = "linestring" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, @@ -147,12 +141,11 @@ WHERE name = "admin_boundaries_lines_z16_20" geometry_fieldname = "geometry" geometry_type = "linestring" -id_fieldname = "id" +id_fieldname = "osm_id" sql = """ SELECT ST_AsMVTGeom(geometry, !BBOX!) AS geometry, - id, - osm_id, + ABS(osm_id) AS osm_id, admin_level, name, type, From 73a36599f3709c7e3521c96861672c406119637d Mon Sep 17 00:00:00 2001 From: Rub21 Date: Mon, 2 Dec 2024 23:02:58 -0500 Subject: [PATCH 13/13] Update ebs for tiler imposm --- values.staging.template.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/values.staging.template.yaml b/values.staging.template.yaml index abed4fe2..9104eb43 100644 --- a/values.staging.template.yaml +++ b/values.staging.template.yaml @@ -397,7 +397,7 @@ osm-seed: mountPath: /var/lib/postgresql/data subPath: postgresql-d # In case cloudProvider: aws - AWS_ElasticBlockStore_volumeID : vol-0874ca57eef46a15c + AWS_ElasticBlockStore_volumeID : vol-036a6d4461508fcf8 AWS_ElasticBlockStore_size: 200Gi resources: enabled: false @@ -485,10 +485,10 @@ osm-seed: label_value: web_large env: TILER_IMPORT_FROM: osm - TILER_IMPORT_PBF_URL: http://s3.amazonaws.com/planet.openhistoricalmap.org/planet/planet-240726_0003.osm.pbf + TILER_IMPORT_PBF_URL: https://s3.amazonaws.com/planet.openhistoricalmap.org/planet/planet-241202_0001.osm.pbf REPLICATION_URL: http://s3.amazonaws.com/planet.openhistoricalmap.org/replication/minute/ - SEQUENCE_NUMBER: "1664000" - OVERWRITE_STATE: false + SEQUENCE_NUMBER: "1666000" + OVERWRITE_STATE: true UPLOAD_EXPIRED_FILES: true IMPORT_NATURAL_EARTH: true IMPORT_OSM_LAND: true @@ -498,7 +498,7 @@ osm-seed: accessMode: ReadWriteOnce mountPath: /mnt/data # In case cloudProvider: aws - AWS_ElasticBlockStore_volumeID: vol-04b247ef15765ba32 + AWS_ElasticBlockStore_volumeID: vol-0defbed7d3141afe9 AWS_ElasticBlockStore_size: 50Gi resources: enabled: false @@ -513,7 +513,7 @@ osm-seed: # ==================================================================================================== tilerServer: - enabled: true + enabled: false nodeSelector: enabled: true label_key: nodegroup_type