mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Don't flag very close nodes in boundaries
This commit is contained in:
@@ -11,13 +11,21 @@ export function validationCloseNodes() {
|
||||
|
||||
function shouldCheckWay(way, context) {
|
||||
|
||||
// expect that indoor features may be mapped in very fine detail
|
||||
if (way.tags.indoor) return false;
|
||||
|
||||
// don't flag issues where merging would create degenerate ways
|
||||
if (way.nodes.length <= 2 ||
|
||||
(way.isClosed() && way.nodes.length <= 4)) return false;
|
||||
|
||||
// expect that indoor features may be mapped in very fine detail
|
||||
if (way.tags.indoor) return false;
|
||||
|
||||
var parentRelations = context.graph().parentRelations(way);
|
||||
|
||||
// don't flag close nodes in boundaries since it's unlikely the user can accurately resolve them
|
||||
if (way.tags.boundary) return false;
|
||||
if (parentRelations.length && parentRelations.some(function(parentRelation) {
|
||||
return parentRelation.tags.type === 'boundary';
|
||||
})) return false;
|
||||
|
||||
var bbox = way.extent(context.graph()).bbox();
|
||||
var hypotenuseMeters = geoSphericalDistance([bbox.minX, bbox.minY], [bbox.maxX, bbox.maxY]);
|
||||
// don't flag close nodes in very small ways
|
||||
|
||||
Reference in New Issue
Block a user