Skip to content

Commit 7345305

Browse files
committed
Standardize zoom level - other areas , routes and transport areas
1 parent c47ea70 commit 7345305

File tree

3 files changed

+21
-66
lines changed

3 files changed

+21
-66
lines changed

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

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
SELECT create_areas_mview(
1010
'osm_other_areas',
1111
'mv_other_areas_z8_9',
12-
50,
12+
100,
1313
1000000,
1414
'id, osm_id, type',
1515
NULL
@@ -21,21 +21,19 @@ SELECT create_points_centroids_mview(
2121
);
2222

2323
-- ============================================================================
24-
-- Zoom 10-11:
25-
-- Medium-low simplification (15m)
26-
-- Medium areas (>50K m² = 0.05 km²)
24+
-- Zoom 10-12
2725
-- ============================================================================
2826
SELECT create_areas_mview(
2927
'osm_other_areas',
30-
'mv_other_areas_z10_11',
31-
15,
28+
'mv_other_areas_z10_12',
29+
20,
3230
50000,
3331
'id, osm_id, type',
3432
NULL
3533
);
3634
SELECT create_points_centroids_mview(
37-
'mv_other_areas_z10_11',
38-
'mv_other_points_centroids_z10_11',
35+
'mv_other_areas_z10_12',
36+
'mv_other_points_centroids_z10_12',
3937
NULL
4038
);
4139

@@ -49,43 +47,21 @@ SELECT create_points_mview(
4947
'mv_other_points'
5048
);
5149

52-
-- ============================================================================
53-
-- Zoom 12-13:
54-
-- Low simplification (10m)
55-
-- Small areas (>10K m² = 0.01 km²)
56-
-- Include other points
57-
-- ============================================================================
58-
SELECT create_areas_mview(
59-
'osm_other_areas',
60-
'mv_other_areas_z12_13',
61-
10,
62-
10000,
63-
'id, osm_id, type',
64-
NULL
65-
);
66-
SELECT create_points_centroids_mview(
67-
'mv_other_areas_z12_13',
68-
'mv_other_points_centroids_z12_13',
69-
'mv_other_points'
70-
);
7150

7251
-- ============================================================================
73-
-- Zoom 14-15:
74-
-- Very low simplification (5m)
75-
-- Very small areas (>5K m² = 0.005 km²)
76-
-- Include other points
52+
-- Zoom 13-15:
7753
-- ============================================================================
7854
SELECT create_areas_mview(
7955
'osm_other_areas',
80-
'mv_other_areas_z14_15',
56+
'mv_other_areas_z13_15',
8157
5,
8258
5000,
8359
'id, osm_id, type',
8460
NULL
8561
);
8662
SELECT create_points_centroids_mview(
87-
'mv_other_areas_z14_15',
88-
'mv_other_points_centroids_z14_15',
63+
'mv_other_areas_z13_15',
64+
'mv_other_points_centroids_z13_15',
8965
'mv_other_points'
9066
);
9167

@@ -112,4 +88,6 @@ SELECT create_points_centroids_mview(
11288
-- ============================================================================
11389
-- Create materialized views for other lines
11490
-- ============================================================================
115-
SELECT create_generic_mview('osm_other_lines', 'mv_other_lines_z14_20', ARRAY['osm_id', 'type', 'class']);
91+
SELECT create_lines_mview('osm_other_lines', 'mv_other_lines_z16_20', 0, 0, 'id, osm_id, type');
92+
SELECT create_mview_line_from_mview('mv_other_lines_z16_20', 'mv_water_lines_z14_15', 5);
93+

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,9 @@ BEGIN
388388
END;
389389
$$ LANGUAGE plpgsql;
390390

391-
SELECT create_mv_routes_by_length('mv_routes_indexed_z5_8', 500);
392-
SELECT create_mv_routes_by_length('mv_routes_indexed_z9_10', 100);
393-
SELECT create_mv_routes_by_length('mv_routes_indexed_z11_12', 25);
394-
SELECT create_mv_routes_by_length('mv_routes_indexed_z13_14', 2);
395-
SELECT create_mv_routes_by_length('mv_routes_indexed_z15_20', 0);
391+
SELECT create_mv_routes_by_length('mv_routes_indexed_z5', 1000);
392+
SELECT create_mv_routes_by_length('mv_routes_indexed_z6_7', 200);
393+
SELECT create_mv_routes_by_length('mv_routes_indexed_z8_9', 100);
394+
SELECT create_mv_routes_by_length('mv_routes_indexed_z10_12', 20);
395+
SELECT create_mv_routes_by_length('mv_routes_indexed_z13_15', 5);
396+
SELECT create_mv_routes_by_length('mv_routes_indexed_z16_20', 0);

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

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -31,16 +31,13 @@ SELECT create_points_mview(
3131
);
3232

3333
-- ============================================================================
34-
-- Zoom 12-13:
35-
-- Low simplification (10m)
36-
-- Small areas (>10K m² = 0.01 km²)
37-
-- Include other points
34+
-- Zoom 13-15:
3835
-- Exclude closed highways from https://github.com/OpenHistoricalMap/issues/issues/1194
3936
-- ============================================================================
4037
SELECT create_areas_mview(
4138
'osm_transport_areas',
4239
'mv_transport_areas_z13_15',
43-
10,
40+
5,
4441
10000,
4542
'id, osm_id, type',
4643
'NOT (class = ''highway'' AND type IN (''motorway'', ''motorway_link'', ''trunk'', ''trunk_link'', ''primary'', ''primary_link'', ''secondary'', ''secondary_link'', ''tertiary'', ''tertiary_link'', ''unclassified'', ''residential'', ''service'', ''living_street'', ''cycleway'', ''bridleway''))'
@@ -51,27 +48,6 @@ SELECT create_points_centroids_mview(
5148
'mv_transport_points'
5249
);
5350

54-
-- ============================================================================
55-
-- Zoom 14-15:
56-
-- Very low simplification (5m)
57-
-- Very small areas (>5K m² = 0.005 km²)
58-
-- Include transport points
59-
-- Exclude closed highways from https://github.com/OpenHistoricalMap/issues/issues/1194
60-
-- ============================================================================
61-
SELECT create_areas_mview(
62-
'osm_transport_areas',
63-
'mv_transport_areas_z14_15',
64-
5,
65-
5000,
66-
'id, osm_id, type',
67-
'NOT (class = ''highway'' AND type IN (''motorway'', ''motorway_link'', ''trunk'', ''trunk_link'', ''primary'', ''primary_link'', ''secondary'', ''secondary_link'', ''tertiary'', ''tertiary_link'', ''unclassified'', ''residential'', ''service'', ''living_street'', ''cycleway'', ''bridleway''))'
68-
);
69-
SELECT create_points_centroids_mview(
70-
'mv_transport_areas_z14_15',
71-
'mv_transport_points_centroids_z14_15',
72-
'mv_transport_points'
73-
);
74-
7551
-- ============================================================================
7652
-- Zoom 16-20:
7753
-- No simplification

0 commit comments

Comments
 (0)