Rename major_roads -> traffic_roads, minor_roads -> service_roads

This commit is contained in:
Bryan Housel
2016-03-05 23:58:09 -05:00
parent 3ef05cad79
commit c4fbacd625
4 changed files with 36 additions and 35 deletions
+20 -19
View File
@@ -13,7 +13,7 @@ describe('iD.Features', function() {
it('returns feature keys', function() {
var keys = features.keys();
expect(keys).to.include(
'points', 'major_roads', 'minor_roads', 'paths',
'points', 'traffic_roads', 'service_roads', 'paths',
'buildings', 'landuse', 'boundaries', 'water', 'rail',
'power', 'past_future', 'others'
);
@@ -71,8 +71,8 @@ describe('iD.Features', function() {
expect(stats.boundaries).to.eql(1);
expect(stats.buildings).to.eql(1);
expect(stats.landuse).to.eql(0);
expect(stats.major_roads).to.eql(1);
expect(stats.minor_roads).to.eql(0);
expect(stats.traffic_roads).to.eql(1);
expect(stats.service_roads).to.eql(0);
expect(stats.others).to.eql(1);
expect(stats.past_future).to.eql(1);
expect(stats.paths).to.eql(0);
@@ -92,7 +92,7 @@ describe('iD.Features', function() {
iD.Node({id: 'point_generator', tags: {power: 'generator'}, version: 1}),
iD.Node({id: 'point_old_rail_station', tags: {railway: 'station', disused: 'yes'}, version: 1}),
// Major Roads
// Traffic Roads
iD.Way({id: 'motorway', tags: {highway: 'motorway'}, version: 1}),
iD.Way({id: 'motorway_link', tags: {highway: 'motorway_link'}, version: 1}),
iD.Way({id: 'trunk', tags: {highway: 'trunk'}, version: 1}),
@@ -104,12 +104,12 @@ describe('iD.Features', function() {
iD.Way({id: 'tertiary', tags: {highway: 'tertiary'}, version: 1}),
iD.Way({id: 'tertiary_link', tags: {highway: 'tertiary_link'}, version: 1}),
iD.Way({id: 'residential', tags: {highway: 'residential'}, version: 1}),
// Minor Roads
iD.Way({id: 'service', tags: {highway: 'service'}, version: 1}),
iD.Way({id: 'living_street', tags: {highway: 'living_street'}, version: 1}),
iD.Way({id: 'road', tags: {highway: 'road'}, version: 1}),
iD.Way({id: 'unclassified', tags: {highway: 'unclassified'}, version: 1}),
iD.Way({id: 'living_street', tags: {highway: 'living_street'}, version: 1}),
// Service Roads
iD.Way({id: 'service', tags: {highway: 'service'}, version: 1}),
iD.Way({id: 'road', tags: {highway: 'road'}, version: 1}),
iD.Way({id: 'track', tags: {highway: 'track'}, version: 1}),
// Paths
@@ -231,36 +231,37 @@ describe('iD.Features', function() {
});
it("matches major roads", function () {
features.disable('major_roads');
it("matches traffic roads", function () {
features.disable('traffic_roads');
features.gatherStats(all, graph, dimensions);
doMatch([
'motorway', 'motorway_link', 'trunk', 'trunk_link',
'primary', 'primary_link', 'secondary', 'secondary_link',
'tertiary', 'tertiary_link', 'residential', 'inner3'
'tertiary', 'tertiary_link', 'residential', 'living_street',
'unclassified', 'inner3'
]);
dontMatch([
'point_bar', 'service', 'path', 'building_yes',
'point_bar', 'service', 'road', 'track', 'path', 'building_yes',
'forest', 'boundary', 'water', 'railway', 'power_line',
'motorway_construction', 'fence'
]);
});
it("matches minor roads", function () {
features.disable('minor_roads');
it("matches service roads", function () {
features.disable('service_roads');
features.gatherStats(all, graph, dimensions);
doMatch([
'service', 'living_street', 'road', 'unclassified', 'track'
'service', 'road', 'track'
]);
dontMatch([
'point_bar', 'motorway', 'path', 'building_yes',
'forest', 'boundary', 'water', 'railway', 'power_line',
'motorway_construction', 'fence'
'point_bar', 'motorway', 'unclassified', 'living_street',
'path', 'building_yes', 'forest', 'boundary', 'water',
'railway', 'power_line', 'motorway_construction', 'fence'
]);
});