From 14d8f61189b4a15ca87f18bc717b9e82e1d5d482 Mon Sep 17 00:00:00 2001 From: Tobias Zwick Date: Mon, 29 Oct 2018 21:47:00 +0100 Subject: [PATCH 1/8] Add turning circles and turning loops to pois.yaml Implements #1695 --- yaml/pois.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/yaml/pois.yaml b/yaml/pois.yaml index 03927a53e..6b6891e96 100644 --- a/yaml/pois.yaml +++ b/yaml/pois.yaml @@ -188,7 +188,7 @@ global: - lifeguard_tower - phone - harbour: harbour_master - - highway: [ bus_stop, elevator, ford, mini_roundabout, motorway_junction, platform, + - highway: [ bus_stop, elevator, ford, turning_circle, turning_loop, mini_roundabout, motorway_junction, platform, rest_area, street_lamp, traffic_signals, trailhead ] - historic: [landmark, wayside_cross] - landuse: quarry @@ -1351,6 +1351,11 @@ filters: output: <<: *output_properties kind: toll_booth + - filter: {highway: [turning_circle, turning_loop]} + min_zoom: 16 + output: + <<: *output_properties + kind: { col: highway } - filter: {highway: mini_roundabout} min_zoom: 15 output: From 7e3367be39506a4763cdc69926df78a91a673b5a Mon Sep 17 00:00:00 2001 From: Tobias Zwick Date: Mon, 29 Oct 2018 21:54:35 +0100 Subject: [PATCH 2/8] update documentation for turning_circle and loop --- docs/layers.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/layers.md b/docs/layers.md index 4d39e5d1c..ee49fb8da 100644 --- a/docs/layers.md +++ b/docs/layers.md @@ -1160,6 +1160,8 @@ To resolve inconsistency in data tagging in OpenStreetMap we normalize several o * `travel_agency` * `travel_agent` * `tree` +* `turning_circle` +* `turning_loop` * `tyres` - A shop selling car tyres or tires. * `university` * `variety_store` From 6353eda88a3952dbc2f4608a1dff75a654d75128 Mon Sep 17 00:00:00 2001 From: Tobias Zwick Date: Mon, 29 Oct 2018 23:38:00 +0100 Subject: [PATCH 3/8] add test --- .../1695-turning-circles-turning-loops.py | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 integration-test/1695-turning-circles-turning-loops.py diff --git a/integration-test/1695-turning-circles-turning-loops.py b/integration-test/1695-turning-circles-turning-loops.py new file mode 100644 index 000000000..5bcee0a5d --- /dev/null +++ b/integration-test/1695-turning-circles-turning-loops.py @@ -0,0 +1,22 @@ +# -*- encoding: utf-8 -*- +from shapely.wkt import loads as wkt_loads +import dsl +from . import FixtureTest + + +# test turning circles and loops +class TurningCirclesAndLoops(FixtureTest): + + def turning_circle(self): + self.generate_fixtures(dsl.point(106186562, ( -0.3544854, 51.5785667), {u'source': u'openstreetmap.org', u'highway': u'turning_circle'})) + + self.assert_has_feature( + 16, 32703, 21771, 'pois', + {'id': 106186562, 'kind': 'turning_circle'}) + + def turning_loop(self): + self.generate_fixtures(dsl.point(4260010359, ( 8.43452, 49.4596352), {u'source': u'openstreetmap.org', u'highway': u'turning_loop'})) + + self.assert_has_feature( + 16, 34303, 22378, 'pois', + {'id': 4260010359, 'kind': 'turning_loop'}) From b851ee4fc4231f8fba860228ab7100246682780d Mon Sep 17 00:00:00 2001 From: Tobias Zwick Date: Mon, 29 Oct 2018 23:43:00 +0100 Subject: [PATCH 4/8] apparently solve some coding style problems --- integration-test/1695-turning-circles-turning-loops.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/integration-test/1695-turning-circles-turning-loops.py b/integration-test/1695-turning-circles-turning-loops.py index 5bcee0a5d..1b3dd2f7b 100644 --- a/integration-test/1695-turning-circles-turning-loops.py +++ b/integration-test/1695-turning-circles-turning-loops.py @@ -1,5 +1,4 @@ # -*- encoding: utf-8 -*- -from shapely.wkt import loads as wkt_loads import dsl from . import FixtureTest @@ -8,14 +7,14 @@ class TurningCirclesAndLoops(FixtureTest): def turning_circle(self): - self.generate_fixtures(dsl.point(106186562, ( -0.3544854, 51.5785667), {u'source': u'openstreetmap.org', u'highway': u'turning_circle'})) + self.generate_fixtures(dsl.point(106186562, (-0.3544854, 51.5785667), {u'source': u'openstreetmap.org', u'highway': u'turning_circle'})) self.assert_has_feature( 16, 32703, 21771, 'pois', {'id': 106186562, 'kind': 'turning_circle'}) def turning_loop(self): - self.generate_fixtures(dsl.point(4260010359, ( 8.43452, 49.4596352), {u'source': u'openstreetmap.org', u'highway': u'turning_loop'})) + self.generate_fixtures(dsl.point(4260010359, (8.43452, 49.4596352), {u'source': u'openstreetmap.org', u'highway': u'turning_loop'})) self.assert_has_feature( 16, 34303, 22378, 'pois', From a8c56221e611bba89ddb782be9b60dae4b669e65 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Mon, 5 Nov 2018 14:40:05 -0800 Subject: [PATCH 5/8] flake8 --- integration-test/1695-turning-circles-turning-loops.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/integration-test/1695-turning-circles-turning-loops.py b/integration-test/1695-turning-circles-turning-loops.py index 1b3dd2f7b..9af909ff7 100644 --- a/integration-test/1695-turning-circles-turning-loops.py +++ b/integration-test/1695-turning-circles-turning-loops.py @@ -7,14 +7,16 @@ class TurningCirclesAndLoops(FixtureTest): def turning_circle(self): - self.generate_fixtures(dsl.point(106186562, (-0.3544854, 51.5785667), {u'source': u'openstreetmap.org', u'highway': u'turning_circle'})) + self.generate_fixtures(dsl.point(106186562, (-0.3544854, 51.5785667), + {u'source': u'openstreetmap.org', u'highway': u'turning_circle'})) self.assert_has_feature( 16, 32703, 21771, 'pois', {'id': 106186562, 'kind': 'turning_circle'}) def turning_loop(self): - self.generate_fixtures(dsl.point(4260010359, (8.43452, 49.4596352), {u'source': u'openstreetmap.org', u'highway': u'turning_loop'})) + self.generate_fixtures(dsl.point(4260010359, (8.43452, 49.4596352), + {u'source': u'openstreetmap.org', u'highway': u'turning_loop'})) self.assert_has_feature( 16, 34303, 22378, 'pois', From d52f47650f61dfb1384d909dfb2067f5df764c41 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Mon, 5 Nov 2018 14:41:04 -0800 Subject: [PATCH 6/8] flake8 line whitespace --- integration-test/1695-turning-circles-turning-loops.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration-test/1695-turning-circles-turning-loops.py b/integration-test/1695-turning-circles-turning-loops.py index 9af909ff7..50bf101fb 100644 --- a/integration-test/1695-turning-circles-turning-loops.py +++ b/integration-test/1695-turning-circles-turning-loops.py @@ -13,7 +13,7 @@ def turning_circle(self): self.assert_has_feature( 16, 32703, 21771, 'pois', {'id': 106186562, 'kind': 'turning_circle'}) - + def turning_loop(self): self.generate_fixtures(dsl.point(4260010359, (8.43452, 49.4596352), {u'source': u'openstreetmap.org', u'highway': u'turning_loop'})) From ae189eed72462e00ef31a58b5da607eb3d323067 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Fri, 9 Nov 2018 09:44:12 -0800 Subject: [PATCH 7/8] omg, flake8 --- .../1695-turning-circles-turning-loops.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/integration-test/1695-turning-circles-turning-loops.py b/integration-test/1695-turning-circles-turning-loops.py index 50bf101fb..a680acdae 100644 --- a/integration-test/1695-turning-circles-turning-loops.py +++ b/integration-test/1695-turning-circles-turning-loops.py @@ -7,16 +7,20 @@ class TurningCirclesAndLoops(FixtureTest): def turning_circle(self): - self.generate_fixtures(dsl.point(106186562, (-0.3544854, 51.5785667), - {u'source': u'openstreetmap.org', u'highway': u'turning_circle'})) + self.generate_fixtures( + dsl.point(106186562, (-0.3544854, 51.5785667), + {u'source': u'openstreetmap.org', + u'highway': u'turning_circle'})) self.assert_has_feature( 16, 32703, 21771, 'pois', {'id': 106186562, 'kind': 'turning_circle'}) def turning_loop(self): - self.generate_fixtures(dsl.point(4260010359, (8.43452, 49.4596352), - {u'source': u'openstreetmap.org', u'highway': u'turning_loop'})) + self.generate_fixtures( + dsl.point(4260010359, (8.43452, 49.4596352), + {u'source': u'openstreetmap.org', + u'highway': u'turning_loop'})) self.assert_has_feature( 16, 34303, 22378, 'pois', From 2c60ef09643a758e038ee3f8b7125b9a0ed4a453 Mon Sep 17 00:00:00 2001 From: "Nathaniel V. KELSO" Date: Fri, 9 Nov 2018 09:48:45 -0800 Subject: [PATCH 8/8] use proper linter ahead of time --- integration-test/1695-turning-circles-turning-loops.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/integration-test/1695-turning-circles-turning-loops.py b/integration-test/1695-turning-circles-turning-loops.py index a680acdae..36a9605d2 100644 --- a/integration-test/1695-turning-circles-turning-loops.py +++ b/integration-test/1695-turning-circles-turning-loops.py @@ -9,8 +9,8 @@ class TurningCirclesAndLoops(FixtureTest): def turning_circle(self): self.generate_fixtures( dsl.point(106186562, (-0.3544854, 51.5785667), - {u'source': u'openstreetmap.org', - u'highway': u'turning_circle'})) + {u'source': u'openstreetmap.org', + u'highway': u'turning_circle'})) self.assert_has_feature( 16, 32703, 21771, 'pois', @@ -19,8 +19,8 @@ def turning_circle(self): def turning_loop(self): self.generate_fixtures( dsl.point(4260010359, (8.43452, 49.4596352), - {u'source': u'openstreetmap.org', - u'highway': u'turning_loop'})) + {u'source': u'openstreetmap.org', + u'highway': u'turning_loop'})) self.assert_has_feature( 16, 34303, 22378, 'pois',