mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-29 08:00:06 +00:00
feat(tours): round hikes, other ways of a leg and wanderer trails through the assistant
The assistant can now search a round hike of about a wished length from one point and the router's other ways for one leg of a hike, with the planner's own search, and propose each one as a hike card to compare and take. It can also search the user's wanderer trails, preview one as a card, import it and check a wanderer tour against its source. The round search, its loop geometry, the test whether two lines are one way, the other ways among a router's offers and the pins that hold a chosen way move to @trek/shared; the planner and the road trip use them from there.
This commit is contained in:
@@ -314,6 +314,12 @@ The saved tours of a trip, as the Tours list and the tour detail show them, how
|
||||
| `undo_tour_change` | Takes back a saved step once the traveller said yes to the preview of exactly that step: `step_id` and `expected_revision` as `prepare_tour_undo` gave them, and `confirmed` set to true. Everything is checked again before anything is written, and a tour changed since the preview, a step no longer the latest change or taken back already, or a station visited or skipped meanwhile that would go, refuses it and leaves the tour as it is. Restores the tour whole or not at all, exactly as it was before the step: its line, its stations with their keys and the distance and walking time stored then. A step is taken back once, and taking it back raises the tour's revision like any other save. Needs `place_edit` on the trip | `trips:write` |
|
||||
| `plan_paddle_route` | Plans the legs of a paddle tour on the water network TREK builds from the paddle regions an admin added: each leg (`from`, `to`) along rivers and canals and across lakes, carried round weirs, dams and waterfalls, through or round locks (`lock_policy`), with `boat` and `lake_style` (`direct` or `shore`). Answers per leg its length, how far its ends were moved onto the water and its stretches (water, lake, whitewater, boat pass, portage with its source, lock, gap) with where each starts and ends in metres along the leg; a leg that cannot be planned says why (`not_on_water`, `no_region`, `cross_region`, `no_water_path`, `busy`, `timeout`). Nothing is saved; a planning aid, never a safety or legal clearance. With `include_geometry` each planned leg adds its line for drawing (`line_geometry`), all legs together up to 300 points shared by length | `trips:read` |
|
||||
| `plan_ski_route` | Plans the legs of a ski and winter tour on the runs, lifts, cross-country trails, ski touring and winter paths of OpenStreetMap, which the Places host serves as one graph per ski area: for a `discipline` (`alpine`, `snowboard`, `cross_country` with a `technique`, `touring`, `snowshoe`, `winter_hike`) and its `options` (difficulty limit, freeride, lift classes to avoid, riding down, priority, pace, groomed or lit trails only, ascent along pistes, lifts at all). Answers per leg its length, climb and descent, its time split into skiing, lifts, waiting and walking, how far its ends were moved onto the network, its stretches with where each starts and ends in metres along the leg, and notes on what they rest on; a leg that cannot be planned says why (`not_on_piste`, `no_area`, `cross_area`, `disconnected`, `blocked_by_difficulty`, `blocked_by_lift_avoid`, `blocked_by_technique`, `needs_ride_down`, `uphill_only`, `loading`, `places_unavailable`, `disabled`, `busy`, `timeout`) and, where one helps, the one change that would plan it. No clicked point leaves the server. Times are estimates, nothing says what is open, groomed or safe today; nothing is saved. With `include_geometry` each planned leg adds its line for drawing (`line_geometry`, with its heights), all legs together up to 300 points shared by length | `trips:read` |
|
||||
| `propose_round_hike` | Finds round hikes of about `distance_km` (1 to 60) out of one start and back, as the Tours planner's round search does, and proposes one of them without saving anything: loops on foot steered round circles in several directions under the hike's limit and preferences, those within a fifth of the length that do not walk the same ground twice, up to three different ones (`round` a, b or c). One search answers all three and is kept for 15 minutes, so the rounds are asked for one after another without asking the router again. Each answer is the proposal `propose_hike` gives for the round, with how far it lies off the length and `create_with`, the points `create_hike` creates it through; a round that is not there says why | `trips:read` |
|
||||
| `propose_hike_leg_way` | Proposes another way for one leg of a hike, as the planner's other ways of a section: the router's other ways on foot between the leg's two points under the hike's rules, each held by the fewest points on it the router keeps to, up to three (`way` a, b or c). The answer is the proposal of the whole hike with the leg taken that way, beside the hike as it runs now (`current`), with `create_with`; a hike not yet saved is created with `create_hike`, a saved one (`tour_id`) changed with `update_tour` | `trips:read` |
|
||||
| `search_wanderer_trails` | Searches the user's own wanderer trails by words, page and part of the map, as the Tours tab's wanderer search does, on their own connection; each trail with its facts and the tours of the trip already imported from it. Only while the admin allows wanderer under Tours. Needs `place_edit` on the trip | `trips:read` |
|
||||
| `preview_wanderer_trail` | Previews one wanderer trail before it is imported, without writing anything: its length and climb measured from its full GPX, the fingerprint the import takes (`contentHash`) and how it stands to a tour of the trip already imported from it. Needs `place_edit` on the trip | `trips:read` |
|
||||
| `import_wanderer_trail` | Imports a wanderer trail into the trip as a tour, as the Tours tab's import does, with the fingerprint the preview gave: refused when the trail changed since, or when the trip holds this very content already. An earlier import stays as it is. Needs `place_edit` on the trip | `trips:write` |
|
||||
| `check_tour_source` | Asks wanderer whether the trail a tour was imported from changed since, without changing the tour: unchanged, changed (with what changed and what a new import takes), unknown, unavailable, no connection or another instance. Needs `place_edit` on the trip | `trips:read` |
|
||||
|
||||
### Road trip _(Road trip addon required)_
|
||||
|
||||
|
||||
Reference in New Issue
Block a user