diff --git a/CHANGELOG.md b/CHANGELOG.md index 98fdf9d54..670ff92fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,7 @@ _Breaking developer changes, which may affect downstream projects or sites that #### :sparkles: Usability & Accessibility * Always render `ref` tag as label ([#9054], thanks [@k-yle]) * Remember last map location when no location is externally specified ([#7790], thanks [@bvercelli99]) +* Add a `crossing=traffic_signals` tag to the intersection node when using _connect features_ of a _crossing with pedestrian signals_ way in the validator ([#9176], thanks [@faebebin]) #### :bug: Bugfixes * When typing an invalid unit into the Speed Limit or Max Height field, revert to the previous unit ([#9110], thanks [@1ec5]) * Fix wikidata field displaying `[object Object]` instead of item labels after wikibase API change ([#9067]) @@ -96,6 +97,7 @@ _Breaking developer changes, which may affect downstream projects or sites that [@paulklie]: https://github.com/paulklie [@renancleyson-dev]: https://github.com/renancleyson-dev [@bvercelli99]: https://github.com/bvercelli99 +[@faebebin]:_https://github.com/faebebin # 2.21.1 diff --git a/modules/validations/crossing_ways.js b/modules/validations/crossing_ways.js index 7c5ad2019..bec80921f 100644 --- a/modules/validations/crossing_ways.js +++ b/modules/validations/crossing_ways.js @@ -146,7 +146,7 @@ export function validationCrossingWays(context) { return {}; } var pathFeature = entity1IsPath ? entity1 : entity2; - if (['marked', 'unmarked'].indexOf(pathFeature.tags.crossing) !== -1) { + if (['marked', 'unmarked', 'traffic_signals'].indexOf(pathFeature.tags.crossing) !== -1) { // if the path is a crossing, match the crossing type return bothLines ? { highway: 'crossing', crossing: pathFeature.tags.crossing } : {}; } diff --git a/test/spec/validations/crossing_ways.js b/test/spec/validations/crossing_ways.js index ae46b98f7..308af2272 100644 --- a/test/spec/validations/crossing_ways.js +++ b/test/spec/validations/crossing_ways.js @@ -213,11 +213,21 @@ describe('iD.validations.crossing_ways', function () { verifySingleCrossingIssue(validate(), { highway: 'crossing' }); }); - it('flags road crossing crosswalk', function() { + it('flags road crossing marked crosswalk', function() { createWaysWithOneCrossingPoint({ highway: 'residential' }, { highway: 'footway', crossing: 'marked' }); verifySingleCrossingIssue(validate(), { highway: 'crossing', crossing: 'marked' }); }); + it('flags road crossing crosswalk with traffic_signals', function() { + createWaysWithOneCrossingPoint({ highway: 'residential' }, { highway: 'footway', crossing: 'traffic_signals' }); + verifySingleCrossingIssue(validate(), { highway: 'crossing', crossing: 'traffic_signals' }); + }); + + it('flags road crossing unmarked crosswalk', function() { + createWaysWithOneCrossingPoint({ highway: 'residential' }, { highway: 'footway', crossing: 'unmarked' }); + verifySingleCrossingIssue(validate(), { highway: 'crossing', crossing: 'unmarked' }); + }); + it('flags road=track crossing footway', function() { createWaysWithOneCrossingPoint({ highway: 'track' }, { highway: 'footway' }); verifySingleCrossingIssue(validate(), {});