diff --git a/data/presets/presets.json b/data/presets/presets.json index f6897c7cd..ce5ebd704 100644 --- a/data/presets/presets.json +++ b/data/presets/presets.json @@ -7214,7 +7214,7 @@ "fields": [ "name", "ref_road_number", - "oneway_yes", + "oneway", "maxspeed", "lanes", "surface", diff --git a/data/presets/presets/highway/motorway_link.json b/data/presets/presets/highway/motorway_link.json index 141e78a1e..c64f6e950 100644 --- a/data/presets/presets/highway/motorway_link.json +++ b/data/presets/presets/highway/motorway_link.json @@ -3,7 +3,7 @@ "fields": [ "name", "ref_road_number", - "oneway_yes", + "oneway", "maxspeed", "lanes", "surface", @@ -25,6 +25,10 @@ "highway": "motorway_link", "oneway": "yes" }, - "terms": ["ramp", "on ramp", "off ramp"], + "terms": [ + "ramp", + "on ramp", + "off ramp" + ], "name": "Motorway Link" } diff --git a/modules/osm/tags.js b/modules/osm/tags.js index 1a66bdbd6..10d71ec4a 100644 --- a/modules/osm/tags.js +++ b/modules/osm/tags.js @@ -20,8 +20,7 @@ export var osmOneWayTags = { 'yes': true }, 'highway': { - 'motorway': true, - 'motorway_link': true + 'motorway': true }, 'junction': { 'circular': true, diff --git a/test/spec/osm/lanes.js b/test/spec/osm/lanes.js index 4a072a28c..636d3513b 100644 --- a/test/spec/osm/lanes.js +++ b/test/spec/osm/lanes.js @@ -16,18 +16,17 @@ describe('iD.Lanes', function() { .to.eql(4); }); - it('returns 1 lane for highway=motorway_link', function() { + it('returns 2 lanes for highway=motorway_link', function() { expect(iD.Way({tags: { highway: 'motorway_link' }}).lanes().metadata.count, 'motorway_link lanes') - .to.eql(1); - expect(iD.Way({tags: { highway: 'motorway_link', oneway: 'yes' }}).lanes().metadata.count, 'motorway_link lanes') - .to.eql(1); - }); - - it('returns 2 lanes for highway=motorway_link and oneway=no', function() { + .to.eql(2); expect(iD.Way({tags: { highway: 'motorway_link', oneway: 'no' }}).lanes().metadata.count, 'motorway_link lanes') .to.eql(2); }); + it('returns 1 lane for highway=motorway_link and oneway=yes', function() { + expect(iD.Way({tags: { highway: 'motorway_link', oneway: 'yes' }}).lanes().metadata.count, 'motorway_link lanes') + .to.eql(1); + }); }); describe('trunk', function() { diff --git a/test/spec/osm/way.js b/test/spec/osm/way.js index 45039eca6..e847da830 100644 --- a/test/spec/osm/way.js +++ b/test/spec/osm/way.js @@ -309,12 +309,12 @@ describe('iD.osmWay', function() { expect(iD.Way({tags: { waterway: 'river' }}).isOneWay(), 'river').to.be.true; expect(iD.Way({tags: { waterway: 'stream' }}).isOneWay(), 'stream').to.be.true; expect(iD.Way({tags: { highway: 'motorway' }}).isOneWay(), 'motorway').to.be.true; - expect(iD.Way({tags: { highway: 'motorway_link' }}).isOneWay(), 'motorway_link').to.be.true; expect(iD.Way({tags: { junction: 'roundabout' }}).isOneWay(), 'roundabout').to.be.true; expect(iD.Way({tags: { junction: 'circular' }}).isOneWay(), 'circular').to.be.true; }); it('returns false when the way does not have implied oneway tag', function() { + expect(iD.Way({tags: { highway: 'motorway_link' }}).isOneWay(), 'motorway_link').to.be.false; expect(iD.Way({tags: { highway: 'trunk' }}).isOneWay(), 'trunk').to.be.false; expect(iD.Way({tags: { highway: 'trunk_link' }}).isOneWay(), 'trunk_link').to.be.false; expect(iD.Way({tags: { highway: 'primary' }}).isOneWay(), 'primary').to.be.false;