@wemap/routers 12.9.0 → 12.9.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,12 @@
1
+ <?xml version='1.0' encoding='UTF-8'?>
2
+ <osm version='0.6' generator='JOSM'>
3
+ <node id='-161218670344274' action='modify' visible='true' lat='48.84835435445' lon='2.39650479554' />
4
+ <node id='-161218670344470' action='modify' visible='true' lat='48.84826992031' lon='2.39687830076' />
5
+ <way id='-921430905723165' action='modify' visible='true'>
6
+ <nd ref='-161218670344470' />
7
+ <nd ref='-161218670344274' />
8
+ <tag k='highway' v='elevator' />
9
+ <tag k='incline' v='up' />
10
+ <tag k='level' v='-3' />
11
+ </way>
12
+ </osm>
package/dist/index.js CHANGED
@@ -2833,7 +2833,7 @@ const _OsmGraphUtils = class _OsmGraphUtils {
2833
2833
  }
2834
2834
  });
2835
2835
  let fakeOsmNodeId = -1;
2836
- osmModel.ways.filter((way) => way.isElevator).forEach((way) => {
2836
+ osmModel.ways.filter((way) => way.isElevator && way.isGeometryClosed).forEach((way) => {
2837
2837
  const entryVertices = way.nodes.map((node) => verticesMapping.filter(([osmId]) => osmId === node.id).map((vm) => vm[1])).flat();
2838
2838
  const elevatorCenter = way.nodes.reduce((acc, node) => [acc[0] + node.coords.lat, acc[1] + node.coords.lng], [0, 0]).map((val) => val / way.nodes.length);
2839
2839
  const elevatorLevel = entryVertices.reduce((acc, v) => geo.Level.union(acc, v.coords.level), null);