mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-24 00:54:03 +02:00
Ignore proposed features for crossings ways, almost junction, and disconnected way validations (close #5922)
This commit is contained in:
@@ -24,7 +24,10 @@ export function validationAlmostJunction() {
|
||||
|
||||
|
||||
function isHighway(entity) {
|
||||
return entity.type === 'way' && entity.tags.highway && entity.tags.highway !== 'no';
|
||||
return entity.type === 'way' &&
|
||||
entity.tags.highway &&
|
||||
entity.tags.highway !== 'no' &&
|
||||
entity.tags.highway !== 'proposed';
|
||||
}
|
||||
|
||||
function isNoexit(node) {
|
||||
|
||||
@@ -56,12 +56,13 @@ export function validationCrossingWays() {
|
||||
// only validate certain waterway features
|
||||
var waterways = ['canal', 'ditch', 'drain', 'river', 'stream'];
|
||||
// ignore certain highway and railway features
|
||||
var ignoredHighways = ['rest_area', 'services'];
|
||||
var ignoredRailways = ['train_wash'];
|
||||
var ignoredHighways = ['rest_area', 'services', 'proposed'];
|
||||
var ignoredRailways = ['train_wash', 'proposed'];
|
||||
var ignoredBuildings = ['proposed'];
|
||||
|
||||
|
||||
function getFeatureTypeForTags(tags) {
|
||||
if (hasTag(tags, 'building')) return 'building';
|
||||
if (hasTag(tags, 'building') && ignoredBuildings.indexOf(tags.building) === -1) return 'building';
|
||||
|
||||
// don't check non-building areas
|
||||
if (hasTag(tags, 'area')) return null;
|
||||
|
||||
@@ -10,7 +10,9 @@ export function validationDisconnectedWay() {
|
||||
|
||||
|
||||
function isDisconnectedHighway(entity, graph) {
|
||||
if (!entity.tags.highway) return false;
|
||||
if (!entity.tags.highway ||
|
||||
entity.tags.highway === 'no' ||
|
||||
entity.tags.highway === 'proposed') return false;
|
||||
if (entity.geometry(graph) !== 'line') return false;
|
||||
|
||||
return graph.childNodes(entity)
|
||||
|
||||
Reference in New Issue
Block a user