More work on conflation logic

This commit is contained in:
Pieter Vander Vennet 2022-01-05 16:36:08 +01:00
parent d9ad4daaf6
commit 8485773a1d
3 changed files with 315 additions and 213 deletions

View file

@ -391,10 +391,9 @@ export class OsmWay extends OsmObject {
// This is probably part of a relation which hasn't been fully downloaded
continue;
}
const cp = node.centerpoint();
this.coordinates.push(cp);
latSum += cp[0]
lonSum += cp[1]
this.coordinates.push(node.centerpoint());
latSum += node.lat
lonSum += node.lon
}
let count = this.coordinates.length;
this.lat = latSum / count;