Skip to content

Commit be63f57

Browse files
authored
updates docs and create test for canal change (#2100)
* update docs and create test for canal change * Fixed test
1 parent ddc9c47 commit be63f57

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed

docs/layers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2468,7 +2468,7 @@ However, if the roads layer does not include `linear_ref_id`, then it should be
24682468

24692469
Water `polygons` representing oceans, riverbanks and lakes. Derived from a combination of the `waterway`, `natural`, and `landuse` OpenStreetMap tags. Includes coastline-derived water polygons from [osmdata.openstreetmap.de](https://osmdata.openstreetmap.de) and inland water directly from OpenStreetMap at higher zoom levels 8+, and [Natural Earth](http://naturalearthdata.com) polygons at lower zoom levels (0-7). Water polygons are progressively added based on an area filter until all water is shown at zoom 16+. Covered water is not included.
24702470

2471-
Also includes water `line` geometries for river and stream centerlines and "label_position" `points` for labeling polygons de-duplicated across tile boundaries. OpenStreetMap sourced waterway lines kinds of `river`, `canal`, and `stream` are included starting at zoom 11 and `ditch`, `drain` (zoom 16+).
2471+
Also includes water `line` geometries for river and stream centerlines and "label_position" `points` for labeling polygons de-duplicated across tile boundaries. OpenStreetMap sourced waterway lines with kinds of `river`, and `canal` with the tag `boat` = `yes` (aka navigable canals) are included starting at zoom 9, `stream` and other `canal` features are included starting at zoom 11, and `ditch`, `drain` (zoom 16+).
24722472

24732473
Tilezen calculates the composite exterior edge for overlapping water polygons and marks the resulting line `boundary=true`. Set to `true` when present on `line` geometry, or from Natural Earth line source.
24742474

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
import dsl
2+
3+
from . import FixtureTest
4+
5+
6+
class TestCanalMinZoom(FixtureTest):
7+
def test_canal(self):
8+
z, x, y = (16, 10483, 25332)
9+
self.generate_fixtures(
10+
dsl.way(76287073, dsl.tile_box(z, x, y), {
11+
'name': 'Ridenbaugh High Line Canal',
12+
'boat': 'no',
13+
'waterway': 'canal',
14+
'source': 'openstreetmap.org'
15+
})
16+
)
17+
18+
self.assert_has_feature(
19+
z, x, y, 'water',
20+
{'id': 76287073,
21+
'name': 'Ridenbaugh High Line Canal',
22+
'kind': 'canal',
23+
'min_zoom': 11,
24+
'source': 'openstreetmap.org'})
25+
26+
def test_boat_canal(self):
27+
z, x, y = (16, 10483, 25332)
28+
self.generate_fixtures(
29+
dsl.way(85123623, dsl.tile_box(z, x, y), {
30+
'name': 'Canal de Bourgogne',
31+
'access': 'boat',
32+
'boat': 'yes',
33+
'fishing': 'yes',
34+
'waterway': 'canal',
35+
'source': 'openstreetmap.org'
36+
})
37+
)
38+
39+
self.assert_has_feature(
40+
z, x, y, 'water',
41+
{'id': 85123623,
42+
'name': 'Canal de Bourgogne',
43+
'kind': 'canal',
44+
'boat': 'yes',
45+
'min_zoom': 9,
46+
'source': 'openstreetmap.org'})

0 commit comments

Comments
 (0)