mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 09:04:02 +02:00
crossing_ways fixing - specially handle crossing nodes
This commit is contained in:
@@ -141,6 +141,10 @@ Object.assign(osmNode.prototype, {
|
||||
return utilArrayUniq(results);
|
||||
},
|
||||
|
||||
isCrossing: function(){
|
||||
return this.tags.highway === 'crossing' ||
|
||||
this.tags.railway && this.tags.railway.indexOf('crossing') !== -1;
|
||||
},
|
||||
|
||||
isEndpoint: function(resolver) {
|
||||
return resolver.transient(this, 'isEndpoint', function() {
|
||||
|
||||
@@ -721,7 +721,8 @@ export function validationCrossingWays(context) {
|
||||
var edgeNodes = [graph.entity(edge[0]), graph.entity(edge[1])];
|
||||
var nearby = geoSphericalClosestNode(edgeNodes, loc);
|
||||
// if there is already a suitable node nearby, use that
|
||||
if (!nearby.node.hasInterestingTags() && nearby.distance < mergeThresholdInMeters) {
|
||||
// use the node if node has no interesting tags or if it is a crossing node #8326
|
||||
if ((!nearby.node.hasInterestingTags() || nearby.node.isCrossing()) && nearby.distance < mergeThresholdInMeters) {
|
||||
nodesToMerge.push(nearby.node.id);
|
||||
// else add the new node to the way
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user