Skip to content

Commit 0944f44

Browse files
authored
Update BuildingShapeUtils.js
1 parent f8ba849 commit 0944f44

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/extras/BuildingShapeUtils.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,20 @@ class BuildingShapeUtils extends ShapeUtils {
4949
return elements[0].getAttribute('ref') === elements[elements.length - 1].getAttribute('ref');
5050
}
5151

52+
/**
53+
* Check if a way is self-intersecting.
54+
*
55+
* @param {DOM.Element} way - OSM XML way element.
56+
*
57+
* @return {boolean}
58+
*/
59+
static isSelfIntersecting(way) {
60+
if (isClosed(way))){
61+
// Drop the final node.
62+
}
63+
// Check if the same node ref appears multiple times
64+
}
65+
5266
/**
5367
* Walk through an array and seperate any closed ways.
5468
* Attempt to find matching open ways to enclose them.

0 commit comments

Comments
 (0)