diff options
| author | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-03 08:25:07 +0200 |
|---|---|---|
| committer | Martin Kagamino Lehoux <martin@lehoux.net> | 2026-08-03 08:25:07 +0200 |
| commit | 9707f9ad09db935af7d06b5de08bc52de13ba6a7 (patch) | |
| tree | 34bcd01e5eda302a8730bf0817d5dd7e82186359 /db/migrations/20260802090000_osm_passes.sql | |
| parent | f06a10982ab9d5aaa7d31cea31964431fa75f253 (diff) | |
feat: Detect mountain pass crossings, name climbs after passes, render ride charts
- osmpass: extract mountain_pass=yes nodes from an OSM PBF, enrich centcols passes with OSM coordinates, resumable -fetch-osm download
- mountain_pass: DetectCrossings for a ride, MatchClimb to name a climb after the pass it tops
- ride: expose Points(), add Climb.Top() and Climb.Name
- chart: -chart renders elevation profile with climb bands and pass markers
- commands: -fetch-osm, -extract-osm, -import-cached, -enrich
Diffstat (limited to 'db/migrations/20260802090000_osm_passes.sql')
| -rw-r--r-- | db/migrations/20260802090000_osm_passes.sql | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrations/20260802090000_osm_passes.sql b/db/migrations/20260802090000_osm_passes.sql new file mode 100644 index 0000000..873e80a --- /dev/null +++ b/db/migrations/20260802090000_osm_passes.sql @@ -0,0 +1,17 @@ +-- migrate:up +create table osm_passes ( + id integer primary key, + osm_id integer unique not null, + name text, + elevation integer, + latitude real not null, + longitude real not null +); + +alter table mountain_passes add column latitude real; +alter table mountain_passes add column longitude real; + +-- migrate:down +alter table mountain_passes drop column latitude; +alter table mountain_passes drop column longitude; +drop table osm_passes; |