Feature Filtering: don't match multipolygon lines as 'others'

(fixes #2548)

If the entity is a way that is a member of a parent relation,
use that parent relation's matches instead of matching 'other'
This commit is contained in:
Bryan Housel
2015-03-10 00:06:29 -04:00
parent 848d19a116
commit 3308b5507b
2 changed files with 41 additions and 20 deletions
+11 -2
View File
@@ -135,6 +135,15 @@ describe('iD.Features', function() {
iD.Way({id: 'scrub', tags: {area: 'yes', natural: 'scrub'}, version: 1}),
iD.Way({id: 'industrial', tags: {area: 'yes', landuse: 'industrial'}, version: 1}),
iD.Way({id: 'parkinglot', tags: {area: 'yes', amenity: 'parking', parking: 'surface'}, version: 1}),
iD.Way({id: 'inner', version: 1}),
iD.Way({id: 'outer', version: 1}),
iD.Relation({id: 'retail', tags: {landuse: 'retail', type: 'multipolygon'},
members: [
{id: 'outer', role: 'outer', type: 'way'},
{id: 'inner', role: 'inner', type: 'way'}
],
version: 1
}),
// Boundaries
iD.Way({id: 'boundary', tags: {boundary: 'administrative'}, version: 1}),
@@ -279,7 +288,7 @@ describe('iD.Features', function() {
doMatch([
'forest', 'scrub', 'industrial', 'parkinglot', 'building_no',
'rail_landuse', 'landuse_construction'
'rail_landuse', 'landuse_construction', 'retail', 'inner', 'outer'
]);
dontMatch([
@@ -385,7 +394,7 @@ describe('iD.Features', function() {
dontMatch([
'point_bar', 'motorway', 'service', 'path', 'building_yes',
'forest', 'boundary', 'water', 'railway', 'power_line',
'motorway_construction',
'motorway_construction', 'retail', 'inner', 'outer'
]);
});
});