mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-10-20 22:16:26 +00:00
c8eb510bd4
A new Nest domain plans the legs of a ski and winter tour on the runs, lifts, cross-country trails, ski touring and winter paths the Places host builds from OpenStreetMap, one SGR1 graph per ski area. TREK fetches the index once, downloads an area by its id when a planner first plans in it, checks it against the index's SHA-256 and keeps it in data/ski; no clicked point ever leaves the server. A leg whose area is slower than two seconds answers loading, and an older copy stands in while the host is down. The reader decodes the writer's golden file byte for byte, including the two edge flags it added (area_has_run, type_unknown). The search is A* in a worker thread over a profile per discipline (alpine, snowboard, cross-country by technique, touring, snowshoe, winter hike) with the times and penalties of the cost model, up to five snap candidates per point, lift stations as entry points, legs that go on from each other, pieces of a split network stitched by their boundary nodes, other ways by the penalty method, and a failed leg explained by relaxing one rule at a time (difficulty, lift class, technique, riding down, uphill) without ever handing out the relaxed line. POST /api/trips/:tripId/ski/route, GET .../ski/area-near and GET .../ski/network/:areaId sit behind Tours and the trip, with plan_ski_route as their MCP twin. A daily job looks for a new build and sweeps areas unused for 90 days. The admin switch ski_routing_enabled is on wherever TREK Places is.
34 lines
765 B
Plaintext
34 lines
765 B
Plaintext
# Normalize line endings to LF on commit
|
|
* text=auto eol=lf
|
|
# Explicitly enforce LF for source files
|
|
*.ts text eol=lf
|
|
*.tsx text eol=lf
|
|
*.js text eol=lf
|
|
*.jsx text eol=lf
|
|
*.json text eol=lf
|
|
*.css text eol=lf
|
|
*.html text eol=lf
|
|
*.md text eol=lf
|
|
*.yml text eol=lf
|
|
*.yaml text eol=lf
|
|
*.py text eol=lf
|
|
*.sh text eol=lf
|
|
# Binary files — no line ending conversion
|
|
*.png binary
|
|
*.webp binary
|
|
*.jpg binary
|
|
*.jpeg binary
|
|
*.gif binary
|
|
*.ico binary
|
|
*.woff binary
|
|
*.woff2 binary
|
|
*.ttf binary
|
|
*.eot binary
|
|
*.pdf binary
|
|
*.zip binary
|
|
# Ski area graphs (SGR1) as the Places host writes them, byte for byte
|
|
*.sgr binary
|
|
*.gz binary
|
|
# A GPX fixture whose byte-order mark and CRLF line endings are what it tests
|
|
server/tests/fixtures/gpx/bom-crlf.gpx -text
|