Commit Graph

62 Commits

Author SHA1 Message Date
Bryan Housel
d4bf42b6c4 Remove code attempting to extend leaf ways
(closes #4869)

It was causing more rendering issues than it was solving
2018-03-10 17:51:17 -05:00
Bryan Housel
88dea28cf7 only_ restrictions only count if they leave the FROM towards the VIA
(closes #4849)
2018-03-09 22:39:30 -05:00
Bryan Housel
ecd63cdad2 Use maxDistance passed in to osmIntersection() in turn search
(closes #4844)

The maxDistance was previously hardcoded to 30 meters.
Now we pass it in as a parameter when creating the intersection.
But we need to honor that same maxDistance later when walking the graph
to find turns from.
2018-03-02 17:27:57 -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
156d0fd681 Drop confusing fromOnly code, consolidate path highlighting code 2018-02-21 00:33:41 -05:00
Bryan Housel
200098dff9 Render restriction paths with red/green/blue shadow 2018-02-19 21:30:47 -05:00
Bryan Housel
d940200ef0 osmInferRestriction can just take a turn, instead of from/to
This is better because it makes explicit that osmInferRestriction
needs an actual turn now (from/to with vertex, etc)
2018-02-16 13:27:23 -05:00
Bryan Housel
aff9258dee Indirect restrictions now include only the partial path
This lets us properly infer the actual turn taken through the indirect
restriction using osmInferRestriction (an improvement over 5e9db0d)
2018-02-16 11:42:44 -05:00
Bryan Housel
a2b6a3b09b Flag restriction as indirect if from doesn't match 2018-02-15 22:18:01 -05:00
Bryan Housel
f7e6eae065 Support Only Via paths, render indirect turn restriction with opacity 2018-02-15 17:27:45 -05:00
Bryan Housel
1612326ffa Move dist/via sliders to bottom, add imperial/metric conversion 2018-02-13 17:25:49 -05:00
Bryan Housel
777585317a Better inference of u-turns via way 2018-02-12 14:42:39 -05:00
Bryan Housel
957896656a Detail slider affects turns, but not geometry
(I decided that the larger context of the intersection is important and
shouldn't be hidden from the user)

Also
- show detail slider only if the intersection is complex
- hide the restriction editor completely if there is no real intersection
  (e.g. junction of `highway=path`)
2018-02-09 22:11:22 -05:00
Bryan Housel
47eb5256cc WIP: add detail slider to restriction editor 2018-02-09 16:22:49 -05:00
Bryan Housel
0cbff57dc9 Cycle through only_ turn restriction states
(re: #2622)
2018-02-07 19:04:28 -05:00
Bryan Housel
ea4ac80fee Extend max distance to 30m, but as measured from starting vertex 2018-02-07 09:27:54 -05:00
Bryan Housel
5ca56b6873 Handle situation where nodes have no loc (like in tests) 2018-02-07 01:16:14 -05:00
Bryan Housel
aa7925a918 Extend leaf ways, so they don't stop within the viewport 2018-02-07 00:07:38 -05:00
Bryan Housel
520cfd3276 Fix bug causing improper calc of from/via/to metadata after trimming
This is the part of the algorithm where trivial sections get trimmed
from the vgraph.  Removing a vertex from `vertexIds` means "stop checking
this one".  But there were some situations where it could get removed
twice, so we now just verify that `vertexId` is actually in the array
before calling `splice`.
2018-02-06 14:34:26 -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
be46e85ec0 Move insert way pairing code from osmJoinWays to actionAddMember
(tests for actionAddMember now passing!)
2018-01-16 17:41:14 -05:00
Bryan Housel
221158e918 WIP: Add insertHint to actionAddMember, actionSplit 2018-01-15 23:13:59 -05:00
Bryan Housel
03fa6e7be9 Add tryInsert option to osmJoinWays 2018-01-15 22:02:43 -05:00
Bryan Housel
0382ce7d4b Updated function doc 2018-01-14 21:45:25 -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
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
96afbbd785 Refactor vector math functions from geo.js to vector.js 2017-12-28 01:08:11 -05:00
Bryan Housel
2e2b037e36 Move a bunch of commonly used vector and projection math functions into geo
- geoVecAdd
- geoVecSubtract
- geoVecScale
- geoZoomToScale
- geoScaleToZoom
2017-12-18 15:05:42 -05:00
Bryan Housel
2edbcc4b82 Match any *:direction key, rather than hardcoding a list 2017-12-11 15:17:17 -05:00
Bryan Housel
ee3083b113 Support rendering camera:direction 2017-12-11 11:46:11 -05:00
Bryan Housel
8e19474293 Render directional points (e.g. benches, cameras, signs) as vertices 2017-12-11 10:48:04 -05:00
Bryan Housel
34c98b94e6 Move directions code from vertices to node.js 2017-12-09 12:53:08 -05:00
Bryan Housel
855c112ae0 Convert lodah-es and d3 to named imports for osm 2017-09-25 14:14:49 -04:00
Bryan Housel
4904b7a253 Recognize more kinds of concrete surface as "paved" 2017-08-10 11:11:54 -04:00
Bryan Housel
8de3429f2b Fix misspelling 2017-08-06 23:59:16 -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
795fe29cdd Only show connected vertex if it connects an interesting line 2017-04-26 00:34:48 -04:00
Bryan Housel
f92320c166 Ignore uninteresting tags in old-style multipolygon code 2017-04-21 09:40:05 -04:00
Bryan Housel
af757d31be General usability improvements
* Reevaluate all featuers stroke widths for shadow, casing, stroke
* Shadow width is important to make sure all features are easily clickable
* Casing width is important to see oneway arrows
* Make sure all line styles have normal and low-zoom variants
* Show directional arrows for all waterway types
2017-03-16 16:16:35 -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