Ignore proposed features for crossings ways, almost junction, and disconnected way validations (close #5922)

This commit is contained in:
Quincy Morgan
2019-02-21 10:14:25 -05:00
parent 7da37384f1
commit 2d6c49b92b
3 changed files with 11 additions and 5 deletions
+4 -1
View File
@@ -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) {
+4 -3
View File
@@ -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;
+3 -1
View File
@@ -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)