Commit Graph

47 Commits

Author SHA1 Message Date
Bryan Housel
00e5e8efa0 Avoid reversing osmWays in order to "prefer a forward path"
(closes #4872, related #4859)
2018-04-18 23:43:19 -04:00
Bryan Housel
d20c537e46 Don't match a simple from-via-to restriction by taking a longer path 2018-04-11 22:54:49 -04:00
Bryan Housel
540f0f11dd Add failing test for alternate path matching a restrictionID 2018-04-11 00:24:20 -04:00
Bryan Housel
56dba67b42 Add via 2 way tests 2018-04-10 22:11:06 -04:00
Bryan Housel
63b73c59b4 Add tests for complex intersections, no/only restrictions, via node/way
(tests cover #4951, #4928, #4849)
2018-03-29 23:13:22 -04:00
Bryan Housel
241159b547 Cleanup docs and tests for actionRestrictTurn / actionUnrestrictTurn
- actionRestrictTurn will no longer "infer" the turn type
- restrictionType *must* be passed in - this is ok because the only code
  we use this action (restrictions.js) already has inferred the type
- this simplifies what the action actually does
- moved the tests from restrict_turn.js that were really just testing
  the restriction type inferrence over to intersection.js
  (and added a few more tests for iD.osmInferRestriction)
2018-02-28 23:55:59 -05:00
Bryan Housel
e1cf49eaff Remove the "excludes coincident highways" check
These should not be a thing, and if they are, I'm ok with them
being treated as 2 separate ways.  We can add code back in later
if it turns out to be a widespread issue in OSM.
2018-02-28 13:42:26 -05:00
Bryan Housel
7fa27217b6 Return an indirect u-turn restriction for an only restriction 2018-02-23 11:59:44 -05:00
Bryan Housel
46cc6cc262 Update tests to use '_' id separators instead of ','
(using ',' with css selectors was problematic)
2018-02-23 11:30:54 -05:00
Bryan Housel
0cbff57dc9 Cycle through only_ turn restriction states
(re: #2622)
2018-02-07 19:04:28 -05:00
Bryan Housel
c1378a141f Add support for complex intersection and via way restrictions 2018-02-02 19:58:09 -05:00
Bryan Housel
80a998e9c5 Support multiple semicolon delimited direction values
(closes #4755)
2018-01-29 17:49:08 -05:00
Bryan Housel
b35f6f3f15 highway=motorway_link no longer implies oneway=yes
(closes #4727)

iD still explicitly set the tag, and default it to `oneway=yes`
2018-01-22 21:45:14 -05:00
Bryan Housel
de488e252f Draw covered/underground lines beneath areas
(closes #4718)
2018-01-22 15:06:58 -05:00
Bryan Housel
7c918ba161 Allow Relation.replaceMember to optionally preserve duplicates
(closes #4696)
2018-01-18 16:52:23 -05:00
Bryan Housel
075b85c81d Apply reversal actions in actionJoin
(closes #4688)
2018-01-14 14:49:57 -05:00
Bryan Housel
8dbb6eb20c Return reversal actions performed by osmJoinWays
(see #4688)
2018-01-13 01:45:46 -05:00
Bryan Housel
0fd801d750 Prefer to join member ways in a way that preserves their order
(re #4589)

Strongly prefer to generate a forward path that preserves the order
of the members array. For multipolygons and most relations, member
order does not matter - but for routes, it does. If we started this
sequence backwards (i.e. next member way attaches to the start node
and not the end node), reverse the initial way before continuing.
2018-01-12 17:23:56 -05:00
Bryan Housel
8f6cb207fc Much expanded tests for osmJoinWays 2018-01-11 21:42:29 -05:00
Bryan Housel
07262fa711 Add tests for #4589 2018-01-09 23:57:44 -05:00
Bryan Housel
748abdb950 Code formatting 2018-01-09 17:46:15 -05:00
Bryan Housel
c908807f64 Render oneway=alternating, oneway=reversible with dual arrows
(closes #4291)
2018-01-04 13:40:49 -05:00
Bryan Housel
9f1b71bb7e Add support for junction=circular (same as junction=roundabout)
(closes #4637)
2018-01-02 13:27:11 -05:00
Bryan Housel
6b9ccdb45a Add tests for osmNode#direction 2017-12-11 14:33:22 -05:00
Bryan Housel
b3842d97f4 Remove lodash from the test suite
(closes #4378)
2017-10-18 14:37:39 -04:00
Bryan Housel
10659505e2 Add code to treat a few special tags as areas instead of lines
even in the absense of a proper `area=yes` or `areaKeys` tag.
(closes #4194)
2017-08-06 23:39:58 -04:00
Bryan Housel
89013627fb Don't consider untagged multipolygons as old multipolygons
Also add a lot of old-style multipolygon tests
(closes #4009)
2017-05-04 12:16:04 -04:00
Bryan Housel
fb4c64bf70 Fix isConnected tests 2017-04-26 00:54:45 -04:00
Bryan Housel
1a8cfcc8b1 Changeset refactor
(closes #2633)

* move osmChangeJXON from osm service to osmChangeset
* cleanup putChangeset for code clarity
* adjust params for callbacks (pass changeset around instead of changeset_id)
* add commit.reset() to reset changeset object after successful save
* improve checks for changeset tags (trim whitespace, etc)
2017-03-15 11:03:43 -04:00
Bryan Housel
f783fe4942 Create osmChangeset object, inherit from osmEntity 2017-03-11 01:12:37 -05:00
Bryan Housel
8ecff8b8bc Add osmNode#isConnected
This is used to draw vertices
* where multiple parent ways meet
* where a single way self intersects (but not the closing node of a loop)

We were using Graph#isShared or osmNode#isIntersection, but this is slightly
different to handle self-intersecting ways.
2017-01-23 23:44:04 -05:00
Bryan Housel
04971478cb Add osmNode#isEndpoint 2017-01-23 21:03:34 -05:00
Bryan Housel
ec2c2e6612 Ensure isDegenerate can be called for all entities 2017-01-23 14:17:41 -05:00
Bryan Housel
f109efda7b Fix close() for single node ways 2017-01-12 15:56:46 +05:30
Bryan Housel
cadb38009a Add tests for way.close, way.unclose 2017-01-09 19:58:18 -05:00
Bryan Housel
8676dd6e4c Changes to removeNode and add tests 2017-01-09 18:38:28 -05:00
Bryan Housel
7b86afc9de Changes to replaceNode and add tests, also stricter isClosed 2017-01-09 18:16:30 -05:00
Bryan Housel
f510038791 Changes to updateNode and add tests 2017-01-09 17:33:46 -05:00
Bryan Housel
f1cdde0f92 Changes to addNode and add tests 2017-01-09 17:33:26 -05:00
slhh
fa70d79622 Additional tests added for addNode, updateNode, and replaceNode. 2016-12-24 18:32:26 +01:00
Bryan Housel
9b7d79a3fe Use live bound object for presets object, change context.presets() getter 2016-11-14 15:44:02 -05:00
Bryan Housel
f800e5afbc Remove unnecessary window parameter to Context 2016-11-10 15:19:03 -05:00
Bryan Housel
ad17220577 Pacify eslint 2016-10-18 00:44:31 -04:00
Bryan Housel
2023f28fee iD.Way tests need context for proper setup of areaKeys
I'm not sure why this is failing all of a sudden
I think iD.modeAddPoint was setting it up for other tests to use
iD.modeAddPoint needs to be commented out because of happen mouse handlers.
Not happy about all the side effects in our test suite :-(
2016-10-17 19:09:12 -04:00
Bryan Housel
b07bf8eaa2 Extract lane parsing code from way.js into lanes.js 2016-10-12 00:10:46 -04:00
Bryan Housel
f50e80d0b5 Refactor Intersection, Multipolygon from geo to osm 2016-10-11 23:09:27 -04:00
Bryan Housel
07fa5fcc34 Refactor Entity, Node, Relation, Tags, Way from core to osm 2016-10-11 22:41:24 -04:00