From a159c7c26c3f4288cdcf80d68ffa6355bed40f60 Mon Sep 17 00:00:00 2001 From: Rub21 Date: Tue, 3 Dec 2024 01:51:36 -0500 Subject: [PATCH] Remove indexing the tables --- .../layers/relation_members_routes.json | 164 ++++++++++++++++++ images/tiler-imposm/start.sh | 2 +- values.staging.template.yaml | 5 +- 3 files changed, 167 insertions(+), 4 deletions(-) create mode 100644 images/tiler-imposm/config/layers/relation_members_routes.json diff --git a/images/tiler-imposm/config/layers/relation_members_routes.json b/images/tiler-imposm/config/layers/relation_members_routes.json new file mode 100644 index 00000000..0608baba --- /dev/null +++ b/images/tiler-imposm/config/layers/relation_members_routes.json @@ -0,0 +1,164 @@ +{ + "tags": { + "load_all": true, + "exclude": [ + "created_by", + "source", + "source:datetime" + ] + }, + "generalized_tables": { + "route_lines_z5_7": { + "source": "relation_members_routes", + "sql_filter": "type IS NOT NULL AND route IS NOT NULL", + "tolerance": 500 + }, + "route_lines_z8_9": { + "source": "relation_members_routes", + "sql_filter": "type IS NOT NULL AND route IS NOT NULL", + "tolerance": 200 + }, + "route_lines_z10_12": { + "source": "relation_members_routes", + "sql_filter": "type IS NOT NULL AND route IS NOT NULL", + "tolerance": 100 + }, + "route_lines_z12_20": { + "source": "relation_members_routes", + "sql_filter": "type IS NOT NULL AND route IS NOT NULL" + } + }, + "tables": { + "relation_members_routes": { + "type": "relation_member", + "fields": [ + { + "type": "id", + "name": "osm_id", + "key": null + }, + { + "type": "string", + "name": "name", + "key": "name" + }, + { + "type": "mapping_value", + "name": "type", + "key": null + }, + { + "type": "integer", + "name": "admin_level", + "key": "admin_level" + }, + { + "key": "route", + "name": "route", + "type": "string" + }, + { + "key": "ref", + "name": "ref", + "type": "string" + }, + { + "key": "network", + "name": "network", + "type": "string" + }, + { + "key": "direction", + "name": "direction", + "type": "string" + }, + { + "key": "operator", + "name": "operator", + "type": "string" + }, + { + "key": "state", + "name": "state", + "type": "string" + }, + { + "key": "symbol", + "name": "symbol", + "type": "string" + }, + { + "key": "distance", + "name": "distance", + "type": "string" + }, + { + "key": "roundtrip", + "name": "roundtrip", + "type": "string" + }, + { + "key": "interval", + "name": "interval", + "type": "string" + }, + { + "key": "duration", + "name": "duration", + "type": "string" + }, + { + "key": "tourism", + "name": "tourism", + "type": "string" + }, + { + "key": "start_date", + "name": "start_date", + "type": "string" + }, + { + "key": "end_date", + "name": "end_date", + "type": "string" + }, + { + "type": "hstore_tags", + "name": "tags", + "key": null + }, + { + "name": "geometry", + "type": "geometry", + "key": null + }, + { + "name": "member", + "type": "member_id" + }, + { + "name": "me_maritime", + "type": "string", + "key": "maritime", + "from_member": true + }, + { + "type": "hstore_tags", + "name": "me_tags", + "from_member": true + }, + { + "name": "me_name", + "key": "name", + "type": "string", + "from_member": true + } + ], + "mapping": { + "route": [ + "__any__" + ] + } + } + } +} \ No newline at end of file diff --git a/images/tiler-imposm/start.sh b/images/tiler-imposm/start.sh index cbafde24..c900e43a 100755 --- a/images/tiler-imposm/start.sh +++ b/images/tiler-imposm/start.sh @@ -170,7 +170,7 @@ function importData() { -deployproduction # These index will help speed up tegola tile generation - psql "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST/$POSTGRES_DB" -a -f config/postgis_index.sql + # psql "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST/$POSTGRES_DB" -a -f config/postgis_index.sql psql "postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST/$POSTGRES_DB" -a -f config/postgis_post_import.sql touch $INIT_FILE diff --git a/values.staging.template.yaml b/values.staging.template.yaml index 8dd6b878..0b0d5737 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-05aa0df896ba49c01 + AWS_ElasticBlockStore_volumeID : vol-0492574788bacbabb AWS_ElasticBlockStore_size: 200Gi resources: enabled: false @@ -498,7 +498,7 @@ osm-seed: accessMode: ReadWriteOnce mountPath: /mnt/data # In case cloudProvider: aws - AWS_ElasticBlockStore_volumeID: vol-0defbed7d3141afe9 + AWS_ElasticBlockStore_volumeID: vol-02af939ea87b8c5db AWS_ElasticBlockStore_size: 50Gi resources: enabled: false @@ -1015,4 +1015,3 @@ ohm: enabled: true label_key: nodegroup_type label_value: web_large - \ No newline at end of file