路线高程分析:本地读取 GPX 的高程剖面
读取 GPX 或 GeoJSON,计算距离、累计爬升/下降、海拔范围和最大坡度,并显示降采样后的高程剖面。高程缺失时保持未知,不按零处理。
读取高程剖面
选择一个 GPX 或 GeoJSON 文件。文件只在当前浏览器读取,不上传。
支持 GPX 与 GeoJSON;高程缺失时不会按 0 计算。
选择文件后开始分析。
- 距离
- —
- 累计爬升
- —
- 累计下降
- —
- 最低海拔
- —
- 最高海拔
- —
- 最大坡度
- —
高程剖面
高程来自文件本身;GPS 高程会漂移,不能把点对坡度当作道路设计坡度或路线安全认证。
公式与适用条件
工具做什么
选择本地 GPX 或 GeoJSON 文件,工具会在当前浏览器内读取轨迹,计算总距离、累计爬升、累计下降、最低/最高海拔和相邻点之间的最大绝对坡度,并绘制高程剖面。文件不会上传,也不需要账户。
它适合在出发前了解路线起伏,或核对一次活动记录的高程结构。它不是赛事认证、路线安全评估或导航工具。
距离、爬升和坡度的口径
距离按每条线段内相邻点的 WGS84 大圆距离累加;不同线段分别计算,不把线段端点人为连接。累计爬升是所有正向高差之和,累计下降是所有负向高差绝对值之和。
坡度使用相邻点的 Δ海拔 / 水平距离 × 100%;为避免过近采样点放大噪声,只对水平距离至少 5 米的点对计算。最大坡度因此是点对估计,不是公路设计坡度,也不能代表整段路线的平均难度。
高程缺失与 GPS 噪声
如果文件完全没有高程,或只有部分点有高程,工具会把累计爬升、下降和剖面显示为未知,而不是把缺失值当作 0;否则会低估爬升。GPS 高程本身会有漂移,不同设备、气压计和修正算法可能给出不同的累计爬升。
若需要比较两条路线,尽量使用同一来源和同一高程口径;不要把设备自动修正前后的数字直接混用。
怎样使用
先看总距离和爬升量级,再看剖面中的陡升、陡降和长坡位置;结合补给点、路面和天气阅读。对于比赛路线,仍需以组委会公布的路线、强制装备和技术说明为准,不能只凭一个 GPX 文件判断安全性。
文件在本地解析;关闭页面后结果不会保存。若文件过大或格式异常,工具会给出错误提示,不会生成半成品结果。
适用边界
本工具不验证赛道是否为官方版本、是否获得通行许可、是否适合比赛,也不评估落石、交通、天气或技术难度。技术性山径、冰川或需要绳索的路线,需要专门培训和当地信息。
来源与适用范围
GPX 与 GeoJSON 的格式边界参考公开规范;上下坡的力学差异参考运动生物力学综述。高程数值来自文件本身,工具不对设备精度或路线安全作保证。
实现规范(英文原文)
以下字段用于实现与核验核对,正文提供中文解释。
- 公式与适用条件
- Parse GPX or GeoJSON locally, compute horizontal distance between consecutive points in each segment with the WGS84 haversine formula, sum positive and negative elevation differences, and compute grade = (Δelevation / horizontal distance) × 100 for pairs at least 5 metres apart. If any point lacks elevation, gain, loss and profile are returned as unknown rather than undercounted. Profile is downsampled to at most 160 points for display.
- 适用条件
- Elevation values in the file are treated as supplied; GPS elevation is noisy.
- Separate segments are measured independently and are not joined.
- Grade is a point-to-point estimate, not a smoothed road design grade.
- The file is read in the browser only and is not uploaded.
- The tool does not certify a route or assess surface, technicality or safety.
- 舍入规则
- Distance, gain and loss to the nearest metre; elevations to one decimal place; grade to one decimal place; profile points keep whole-metre distance and two-decimal elevation.
独立算例
期望值由独立算术或已核验算法得出,不由页面脚本生成。
case-route-elevation-hill独立算例
Independent elevation arithmetic from the supplied points: +100 m then -100 m; the near-111 m horizontal step gives a grade near 90%, so the expected maximum absolute grade is at least 80%.
{
"track": {
"format": "gpx",
"segments": [
[
{
"lon": 0,
"lat": 0,
"elevation": 0
},
{
"lon": 0,
"lat": 0.001,
"elevation": 100
},
{
"lon": 0,
"lat": 0.002,
"elevation": 0
}
]
]
}
}{
"gainMeters": 100,
"lossMeters": 100,
"minElevationMeters": 0,
"maxElevationMeters": 100,
"maxGradePercentAtLeast": 80,
"profilePoints": 3
}case-route-elevation-missing独立算例
No elevation values are present, so gain, loss and profile must remain unknown rather than becoming zero.
{
"track": {
"format": "gpx",
"segments": [
[
{
"lon": 0,
"lat": 0,
"elevation": null
},
{
"lon": 0,
"lat": 0.001,
"elevation": null
}
]
]
}
}{
"gainMeters": null,
"lossMeters": null,
"profilePoints": 0,
"warning": "elevation-missing"
}来源与证据
GPX is an XML schema for exchanging GPS data. GPX 1.1 defines track, route and waypoint structures with latitude, longitude and optional elevation.
GeoJSON defines JSON-based geospatial objects including LineString coordinates. GeoJSON coordinates use longitude, latitude order and positions may include elevation.
Uphill running has a higher step frequency, shorter swing and aerial phase, and greater duty factor than level running. Downhill running has longer aerial time, lower step frequency and more rear-foot striking than level running. Downhill running emphasises eccentric work and energy dissipation; uphill running requires greater muscular work, particularly at the hip.
版本与核验
撰写: 跑地图编辑部
更新于: 2026年10月28日
核验于: 2026年10月28日
结果仅为估算,不构成比赛、医疗或安全建议。文件只在你的浏览器中处理,不会上传。 法律与许可