Skip to content

Add distance and elevation calculations for routes - #304

Open
natesute wants to merge 1 commit into
tkrajina:devfrom
natesute:feat/route-elevation
Open

natesute wants to merge 1 commit into
tkrajina:devfrom
natesute:feat/route-elevation

Conversation

@natesute

Copy link
Copy Markdown

Add GPXRoute.length_3d() and GPXRoute.get_uphill_downhill() so route-only GPX files can expose distance and elevation gain/loss directly, without converting their points into tracks. Both methods use the existing geographic routines, including the same elevation smoothing and treatment of missing elevations as track segments.

The existing GPX aggregate methods retain their track-based behavior. The README shows how to call the new methods while iterating routes.

Addresses #290.

Validation: both new tests fail before the change. All 154 unit tests pass with lxml installed, and the gpxinfo fixture run passes. Strict mypy was run on both baseline and branch; both report the same 19 existing errors in four files with mypy 2.3.1. No new type errors are introduced.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant