-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
…strian-plaza Add handling for underground water and reorder garden and pedestrian areas to render correctly
- Loading branch information
Showing
5 changed files
with
125 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# -*- encoding: utf-8 -*- | ||
import dsl | ||
from . import FixtureTest | ||
|
||
|
||
class UndergroundWaterTest(FixtureTest): | ||
def test_water_level_1(self): | ||
z, x, y = (16, 33199, 22547) | ||
|
||
self.generate_fixtures( | ||
# https://www.openstreetmap.org/way/236735251 | ||
dsl.way(236735251, dsl.tile_box(z, x, y), { | ||
'layer': '-1', | ||
'name': u'Vo\xfbte Richard Lenoir', | ||
'source': 'openstreetmap.org', | ||
'tunnel': 'yes', | ||
'waterway': 'riverbank', | ||
}), | ||
) | ||
|
||
self.assert_has_feature( | ||
16, 33199, 22547, "water", | ||
{"kind": "riverbank", "id": 236735251, | ||
"name": "Voûte Richard Lenoir", "is_tunnel": True, | ||
"sort_rank": 9}) | ||
|
||
def test_water_level_2(self): | ||
z, x, y = (16, 33504, 22442) | ||
|
||
self.generate_fixtures( | ||
# https://www.openstreetmap.org/way/94321616 | ||
dsl.way(94321616, dsl.tile_box(z, x, y), { | ||
'layer': '-2', | ||
'source': 'openstreetmap.org', | ||
'tunnel': 'yes', | ||
'waterway': 'riverbank', | ||
}), | ||
) | ||
|
||
self.assert_has_feature( | ||
z, x, y, 'water', { | ||
'id': 94321616, | ||
"kind": "riverbank", "is_tunnel": True, "sort_rank": 8}) | ||
|
||
def test_pedestrian(self): | ||
z, x, y = (16, 33199, 22546) | ||
|
||
self.generate_fixtures( | ||
# https://www.openstreetmap.org/way/115027186 | ||
dsl.way(115027186, dsl.tile_box(z, x, y), { | ||
'highway': 'pedestrian', | ||
'source': 'openstreetmap.org', | ||
'area': 'yes', | ||
'type': 'polygon', | ||
}), | ||
dsl.relation(1602299, { | ||
'area': 'yes', | ||
'bicycle': 'no', | ||
'highway': 'pedestrian', | ||
'source': 'openstreetmap.org', | ||
'name': 'Esplanade Roger Joseph Boscovich', | ||
'type': 'polygon', | ||
}, ways=[115027186]) | ||
) | ||
|
||
self.assert_has_feature( | ||
z, x, y, "landuse", | ||
{"kind": "pedestrian", "id": 115027186, | ||
"sort_rank": 110}) | ||
|
||
def test_garden(self): | ||
z, x, y = (16, 33199, 22546) | ||
|
||
self.generate_fixtures( | ||
# https://www.openstreetmap.org/way/115027177 | ||
dsl.way(115027177, dsl.tile_box(z, x, y), { | ||
'leisure': 'garden', | ||
'source': 'openstreetmap.org', | ||
}), | ||
) | ||
|
||
self.assert_has_feature( | ||
z, x, y, "landuse", | ||
{"kind": "garden", "id": 115027177, | ||
"sort_rank": 112}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,36 @@ | ||
kind,boundary,sort_rank | ||
river,-,201 | ||
canal,-,201 | ||
stream,-,201 | ||
dam,-,201 | ||
ditch,-,201 | ||
drain,-,201 | ||
playa,-,203 | ||
lake,-,204 | ||
water,-,204 | ||
riverbank,-,204 | ||
reservoir,-,204 | ||
swimming_pool,-,206 | ||
ocean,true,205 | ||
*,true,367 | ||
*,*,200 | ||
layer::int,kind,boundary,sort_rank | ||
*,swimming_pool,-,206 | ||
*,ocean,true,205 | ||
*,reservoir,-,204 | ||
*,lake,-,204 | ||
*,water,-,204 | ||
-1,riverbank,-,9 | ||
-2,riverbank,-,8 | ||
-3,riverbank,-,7 | ||
-4,riverbank,-,6 | ||
-5,riverbank,-,5 | ||
*,riverbank,-,204 | ||
*,playa,-,203 | ||
-1,river,-,9 | ||
-2,river,-,8 | ||
-3,river,-,7 | ||
-4,river,-,6 | ||
-5,river,-,5 | ||
*,river,-,201 | ||
-1,canal,-,9 | ||
-2,canal,-,8 | ||
-3,canal,-,7 | ||
-4,canal,-,6 | ||
-5,canal,-,5 | ||
*,canal,-,201 | ||
-1,stream,-,9 | ||
-2,stream,-,8 | ||
-3,stream,-,7 | ||
-4,stream,-,6 | ||
-5,stream,-,5 | ||
*,stream,-,201 | ||
*,dam,-,201 | ||
*,ditch,-,201 | ||
*,drain,-,201 | ||
*,*,true,367 | ||
*,*,*,200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters