Skip to content

Commit cb81663

Browse files
authored
Merge pull request #667 from OpenHistoricalMap/1244_transport_lines_routes
1244 transport lines routes
2 parents 79930a0 + 8025620 commit cb81663

File tree

4 files changed

+19
-31
lines changed

4 files changed

+19
-31
lines changed

images/tiler-imposm/queries/ohm_mviews/routes_03_mv.sql

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
-- FUNCTION: create_mv_routes_by_length
33
-- ============================================================================
44
-- Purpose:
5-
-- Creates a materialized view filtered by minimum geometry length and
6-
-- optionally simplified geometry, based on the source view mv_routes_indexed.
5+
-- Creates a materialized view with optionally simplified geometry,
6+
-- based on the source view mv_routes_indexed.
77
--
88
-- Includes all route_* columns generated in mv_routes_indexed
99
-- (up to 6 slots per type: road, train, subway, light_rail, tram, trolleybus, bus),
@@ -15,12 +15,11 @@
1515
--
1616
-- Parameters:
1717
-- full_view_name TEXT - Name of the new materialized view
18-
-- min_length DOUBLE PRECISION - Minimum geometry length (ST_Length filter)
1918
-- simplify_tol DOUBLE PRECISION - Simplification tolerance (ST_Simplify)
2019
--
2120
-- Typical usage:
22-
-- SELECT create_mv_routes_by_length('mv_routes_indexed_z5_6', 500, 500);
23-
-- SELECT create_mv_routes_by_length('mv_routes_indexed_z11_13', 1, 50);
21+
-- SELECT create_mv_routes_by_length('mv_routes_indexed_z5_6', 500);
22+
-- SELECT create_mv_routes_by_length('mv_routes_indexed_z11_13', 50);
2423
--
2524
-- Notes:
2625
-- - mv_routes_indexed must exist before calling this function.
@@ -31,7 +30,6 @@ DROP MATERIALIZED VIEW IF EXISTS create_mv_routes_by_length CASCADE;
3130

3231
CREATE OR REPLACE FUNCTION create_mv_routes_by_length(
3332
full_view_name TEXT,
34-
min_length DOUBLE PRECISION,
3533
simplify_tol DOUBLE PRECISION
3634
) RETURNS void AS $$
3735
DECLARE
@@ -364,7 +362,6 @@ BEGIN
364362
NULLIF(route_bus_6_direction, '') AS route_bus_6_direction
365363

366364
FROM mv_routes_indexed
367-
WHERE ST_Length(geometry) > %s
368365
WITH DATA;
369366

370367
-- Índice único (con todas las columnas *_ref)
@@ -381,7 +378,6 @@ BEGIN
381378
$f$,
382379
full_view_name, full_view_name,
383380
simplify_tol::text, simplify_tol::text,
384-
min_length::text,
385381
full_view_name, full_view_name,
386382
full_view_name, full_view_name
387383
);
@@ -392,15 +388,9 @@ BEGIN
392388
END;
393389
$$ LANGUAGE plpgsql;
394390

395-
396-
SELECT create_mv_routes_by_length('mv_routes_indexed_z5_6', 500, 100);
397-
SELECT create_mv_routes_by_length('mv_routes_indexed_z7_8', 200, 50);
398-
SELECT create_mv_routes_by_length('mv_routes_indexed_z9_10', 100, 20);
399-
SELECT create_mv_routes_by_length('mv_routes_indexed_z11_13', 1, 5);
400-
SELECT create_mv_routes_by_length('mv_routes_indexed_z14_20', 0, 0);
401-
402-
-- REFRESH MATERIALIZED VIEW CONCURRENTLY mv_routes_indexed_z5_6;
403-
-- REFRESH MATERIALIZED VIEW CONCURRENTLY mv_routes_indexed_z7_8;
404-
-- REFRESH MATERIALIZED VIEW CONCURRENTLY mv_routes_indexed_z9_10;
405-
-- REFRESH MATERIALIZED VIEW CONCURRENTLY mv_routes_indexed_z11_13;
406-
-- REFRESH MATERIALIZED VIEW CONCURRENTLY mv_routes_indexed_z14_20;
391+
SELECT create_mv_routes_by_length('mv_routes_indexed_z5_6', 1000);
392+
SELECT create_mv_routes_by_length('mv_routes_indexed_z7_8', 300);
393+
SELECT create_mv_routes_by_length('mv_routes_indexed_z9_10', 100);
394+
SELECT create_mv_routes_by_length('mv_routes_indexed_z11_12', 10);
395+
SELECT create_mv_routes_by_length('mv_routes_indexed_z13_14', 1);
396+
SELECT create_mv_routes_by_length('mv_routes_indexed_z15_20', 0);

images/tiler-imposm/queries/ohm_mviews/transport_lines.sql

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,9 @@ $$ LANGUAGE plpgsql;
164164
-- ============================================================================
165165
-- Create materialized views for transport lines
166166
-- ============================================================================
167-
SELECT create_transport_lines_mview('mv_transport_lines_z5', 2000, ARRAY['motorway', 'motorway_link', 'trunk', 'trunk_link', 'construction', 'primary', 'primary_link', 'rail'], ARRAY['railway']);
168-
SELECT create_transport_lines_mview('mv_transport_lines_z6', 1500, ARRAY['motorway', 'motorway_link', 'trunk', 'trunk_link', 'construction', 'primary', 'primary_link', 'rail'], ARRAY['railway']);
169-
SELECT create_transport_lines_mview('mv_transport_lines_z7', 1000, ARRAY['motorway', 'motorway_link', 'trunk', 'trunk_link', 'construction', 'primary', 'primary_link', 'rail'], ARRAY['railway']);
170-
SELECT create_transport_lines_mview('mv_transport_lines_z8', 500, ARRAY['motorway', 'motorway_link', 'trunk', 'trunk_link', 'construction', 'primary', 'primary_link', 'rail', 'secondary', 'secondary_link'], ARRAY['railway']);
171-
SELECT create_transport_lines_mview('mv_transport_lines_z9', 200, ARRAY['motorway', 'motorway_link', 'trunk', 'trunk_link', 'construction', 'primary', 'primary_link', 'rail', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link'], ARRAY['railway']);
172-
SELECT create_transport_lines_mview('mv_transport_lines_z10_11', 100, ARRAY['motorway', 'motorway_link', 'trunk', 'trunk_link', 'construction', 'primary', 'primary_link', 'rail', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'taxiway', 'runway'], ARRAY['railway']);
173-
SELECT create_transport_lines_mview('mv_transport_lines_z12_13', 50, ARRAY['motorway', 'motorway_link', 'trunk', 'trunk_link', 'construction', 'primary', 'primary_link', 'rail', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'miniature', 'narrow_gauge', 'dismantled', 'abandoned', 'disused', 'razed', 'light_rail', 'preserved', 'proposed', 'tram', 'funicular', 'monorail', 'taxiway', 'runway', 'raceway', 'residential', 'service', 'unclassified'], ARRAY['railway']);
174-
SELECT create_transport_lines_mview('mv_transport_lines_z14_20', 0, ARRAY['*'], ARRAY['railway','route']);
167+
SELECT create_transport_lines_mview('mv_transport_lines_z5_6', 1000, ARRAY['motorway', 'motorway_link', 'trunk', 'trunk_link', 'construction', 'primary', 'primary_link', 'rail'], ARRAY['railway']);
168+
SELECT create_transport_lines_mview('mv_transport_lines_z7_8', 300, ARRAY['motorway', 'motorway_link', 'trunk', 'trunk_link', 'construction', 'primary', 'primary_link', 'rail', 'secondary', 'secondary_link'], ARRAY['railway']);
169+
SELECT create_transport_lines_mview('mv_transport_lines_z9_10', 100, ARRAY['motorway', 'motorway_link', 'trunk', 'trunk_link', 'construction', 'primary', 'primary_link', 'rail', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'taxiway', 'runway'], ARRAY['railway']);
170+
SELECT create_transport_lines_mview('mv_transport_lines_z11_12',10, ARRAY['motorway', 'motorway_link', 'trunk', 'trunk_link', 'construction', 'primary', 'primary_link', 'rail', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'miniature', 'narrow_gauge', 'dismantled', 'abandoned', 'disused', 'razed', 'light_rail', 'preserved', 'proposed', 'tram', 'funicular', 'monorail', 'taxiway', 'runway', 'raceway', 'residential', 'service', 'unclassified'], ARRAY['railway']);
171+
SELECT create_transport_lines_mview('mv_transport_lines_z13_14',1, ARRAY['motorway', 'motorway_link', 'trunk', 'trunk_link', 'construction', 'primary', 'primary_link', 'rail', 'secondary', 'secondary_link', 'tertiary', 'tertiary_link', 'miniature', 'narrow_gauge', 'dismantled', 'abandoned', 'disused', 'razed', 'light_rail', 'preserved', 'proposed', 'tram', 'funicular', 'monorail', 'taxiway', 'runway', 'raceway', 'residential', 'service', 'unclassified'], ARRAY['railway']);
172+
SELECT create_transport_lines_mview('mv_transport_lines_z15_20', 0, ARRAY['*'], ARRAY['railway','route']);

ohm/requirements.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
dependencies:
22
- name: osm-seed
3-
version: '0.1.0-0.dev.git.973.hb03b96b'
3+
version: '0.1.0-0.dev.git.976.h81b6cdf'
44
repository: https://devseed.com/osm-seed-chart/

values.staging.template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -330,13 +330,13 @@ osm-seed:
330330
# Variables for replication-job, Configuration to create the replication files by, minute, hour, or day
331331
# ====================================================================================================
332332
replicationJob:
333-
enabled: false
333+
enabled: true
334334
priorityClass: medium-priority
335335
serviceAccount:
336336
enabled: true
337337
name: ohm-s3-bucket-access-staging
338338
env:
339-
ENABLE_SEND_SLACK_MESSAGE: "true"
339+
ENABLE_SEND_SLACK_MESSAGE: "false"
340340
SLACK_WEBHOOK_URL: {{OHM_SLACK_WEBHOOK_URL}}
341341
resources:
342342
enabled: false

0 commit comments

Comments
 (0)