Skip to content

Commit

Permalink
Merge pull request #1740 from tilezen/zerebubuth/1637-hide-early-wood…
Browse files Browse the repository at this point in the history
…-platform

Hide early wood & platform
  • Loading branch information
zerebubuth authored Dec 20, 2018
2 parents 3f169f0 + 64cc595 commit 97c53f4
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 11 deletions.
8 changes: 4 additions & 4 deletions integration-test/1218-poni-whitelist.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@ def test_public_transportation_platform(self):
self.generate_fixtures(dsl.way(2073000913, wkt_loads('POINT (-122.4514815228 37.72302879364989)'), {u'source': u'openstreetmap.org', u'public_transport': u'platform'})) # noqa

self.assert_has_feature(
15, 5238, 12671, 'pois',
{'id': 2073000913})
16, 10476, 25342, 'pois',
{'id': 2073000913, 'min_zoom': 17})

def test_public_transport_stop_area(self):
self.generate_fixtures(dsl.way(2991866242, wkt_loads('POINT (-122.714192210673 38.43852797107748)'), {u'source': u'openstreetmap.org', u'public_transport': u'stop_area'})) # noqa
Expand All @@ -315,8 +315,8 @@ def test_railway_platform(self):
self.generate_fixtures(dsl.way(3987143106, wkt_loads('POINT (-72.0929836528225 41.354925008914)'), {u'source': u'openstreetmap.org', u'railway': u'platform'})) # noqa

self.assert_has_feature(
15, 9821, 12242, 'pois',
{'id': 3987143106})
16, 19643, 24485, 'pois',
{'id': 3987143106, 'min_zoom': 17})

def test_railway_stop(self):
self.generate_fixtures(dsl.way(1130268570, wkt_loads('POINT (-76.9349771452377 38.9629633645972)'), {u'source': u'openstreetmap.org', u'railway': u'stop', u'rail': u'yes', u'public_transport': u'stop_position'})) # noqa
Expand Down
49 changes: 49 additions & 0 deletions integration-test/1637-hide-early-wood-platform.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- encoding: utf-8 -*-
from . import FixtureTest


class HideEarlyWoodPlatformTest(FixtureTest):

def test_platform_z17(self):
import dsl

z, x, y = (16, 32765, 21800)

self.generate_fixtures(
# https://www.openstreetmap.org/node/5266974822
dsl.point(5266974822, (-0.0144533, 51.4782507), {
'name': u'Greenwich DLR',
'railway': u'platform',
'source': u'openstreetmap.org',
'wheelchair': u'yes',
}),
)

self.assert_has_feature(
z, x, y, 'pois', {
'id': 5266974822,
'kind': u'platform',
'min_zoom': 17,
})

def test_wood_z17(self):
import dsl

z, x, y = (16, 32661, 21458)

self.generate_fixtures(
# https://www.openstreetmap.org/way/152558913
dsl.way(152558913, dsl.tile_box(z, x, y), {
'landuse': u'wood',
'name': u'Wytchley Warren Spinney',
'source': u'openstreetmap.org',
'source:name': u'OS OpenData StreetView',
}),
)

self.assert_has_feature(
z, x, y, 'pois', {
'id': 152558913,
'kind': u'wood',
'min_zoom': 17,
})
4 changes: 2 additions & 2 deletions integration-test/742-predictable-layers-pois.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,8 @@ def test_wood_way(self):
self.generate_fixtures(dsl.way(433247531, wkt_loads('POLYGON ((-1.72388733215078 51.77740627297298, -1.72255701704653 51.77782451358231, -1.71885550891832 51.77827587560999, -1.71869668677608 51.77668577843119, -1.72165573732197 51.77702126586529, -1.72293251283529 51.7767092893118, -1.72335094809463 51.77667610728528, -1.72353330609731 51.77672257323179, -1.72385526229514 51.77692839012048, -1.72388733215078 51.77740627297298))'), {u'way_area': u'112601', u'source': u'openstreetmap.org', u'landuse': u'wood', u'name': u"No Man's Land Plantation"})) # noqa

self.assert_has_feature(
14, 8113, 5428, 'pois',
{'id': 433247531, 'kind': 'wood'})
16, 32454, 21713, 'pois',
{'id': 433247531, 'kind': 'wood', 'min_zoom': 17})

# Label placement landuse: wood in landuse
self.assert_no_matching_feature(
Expand Down
10 changes: 5 additions & 5 deletions yaml/pois.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ filters:
kind: wood
tier: 2
- filter: {landuse: wood}
min_zoom: { min: [ { max: [ 10, { sum: [ { col: zoom }, 2 ] }, *tier2_min_zoom ] }, 14 ] }
min_zoom: 17
output:
<<: *output_properties
kind: wood
Expand Down Expand Up @@ -1524,7 +1524,7 @@ filters:
<<: *transit_properties
kind: {col: railway}
- filter: {railway: platform}
min_zoom: 15
min_zoom: 17
output:
<<: *output_properties
<<: *transit_properties
Expand All @@ -1536,13 +1536,13 @@ filters:
<<: *transit_properties
kind: bus_stop
- filter: {public_transport: platform, tags->rail: 'yes'}
min_zoom: 15
min_zoom: 17
output:
<<: *output_properties
<<: *transit_properties
kind: platform
- filter: {public_transport: platform, tags->light_rail: 'yes'}
min_zoom: 15
min_zoom: 17
output:
<<: *output_properties
<<: *transit_properties
Expand All @@ -1554,7 +1554,7 @@ filters:
<<: *transit_properties
kind: bus_stop
- filter: {public_transport: platform}
min_zoom: 15
min_zoom: 17
output:
<<: *output_properties
<<: *transit_properties
Expand Down

0 comments on commit 97c53f4

Please sign in to comment.