Surfaces and stairs, from OpenStreetMap
Published 8 October 2026
Peakline carries a database of paths' surfaces and flights of stairs, for the strips under a route's elevation chart. It is derived from OpenStreetMap, and you may have it here, free, under the Open Database License.
Licence
This database is made available under the Open Database License 1.0 (ODbL). It is derived from OpenStreetMap, © OpenStreetMap contributors, which is made available under the same licence.
You may copy, distribute and adapt it under the ODbL's terms: keep this notice with it, credit OpenStreetMap, and offer what you derive from it under the ODbL.
Download
- surfaces.geojson.gz (4.7 MB, 30 MB unpacked): the lines as GeoJSON in WGS84, each with its
surface(ornull) and whether it isstairs. - surfaces.hk3a (2.1 MB): the same lines exactly as the app carries them.
- SHA256SUMS
What it holds
From Geofabrik's Hong Kong extract of OpenStreetMap, of 5 October 2026:
- every way whose
surfacetag names a known surface, as one of ten: asphalt, concrete, paving, gravel, dirt, grass, sand, wood, paved, unpaved; - every way tagged
highway=steps, marked as stairs; - the ways of no known surface within 24 m of those;
- each line simplified to 1 m, its points in the Hong Kong 1980 Grid (EPSG:2326) in steps of 0.5 m. The GeoJSON gives them in WGS84 to seven decimal places.
135,769 lines: 57,266 of a known surface or stairs and 78,503 of no known surface, with 595,867 points.
How it was made
With the tools in Peakline's engine:
sh docs/verification/scripts/fetch_osm_ways.sh data/sources/osm/2026-10-06
hk3d-bake surfaces <dir> --ways data/sources/osm/2026-10-06/ways.geojson
hk3d-bake pack --levels 5-5 --out surfaces.hk3a <dir>
hk3d-bake surfaces-geojson surfaces.hk3a --out surfaces.geojson
Each way's surface is mapped to the nearest of the ten above. Ways without one are kept only near a way with one, or near stairs. Nothing is added that OpenStreetMap does not hold.
The .hk3a format
An archive of cells of 24 × 19.2 km. Each cell is a list of lines, a line written whole into every cell it crosses. A line has a kind byte, its surface in the low seven bits and stairs in the top bit, followed by its points as zigzag variable-length steps of 0.5 m. The GeoJSON holds the same lines, each once.
路面與樓梯數據,來自 OpenStreetMap
發佈日期:2026 年 10 月 8 日
Peakline 內附一個路徑路面及樓梯的數據庫,用於路線高度圖下方的路面資料條。它衍生自 OpenStreetMap,你可在此按《開放數據庫授權協議》免費取得。
授權
本數據庫按 Open Database License 1.0(ODbL) 提供。它衍生自 OpenStreetMap,© OpenStreetMap 貢獻者,亦按同一授權提供。
你可按 ODbL 的條款複製、分發及改編本數據庫:須保留本聲明、註明 OpenStreetMap,並將你衍生的數據庫按 ODbL 提供。
下載
- surfaces.geojson.gz(4.7 MB,解壓後 30 MB):WGS84 坐標的 GeoJSON 線條,每條附
surface(路面,或null)及是否stairs(樓梯)。 - surfaces.hk3a(2.1 MB):與 App 內附的完全相同。
- SHA256SUMS
內容
取自 Geofabrik 於 2026 年 10 月 5 日的 OpenStreetMap 香港數據:
- 所有
surface標籤屬已知路面的路徑,歸入十類之一:瀝青、混凝土、鋪砌、碎石、泥地、草地、沙地、木、已鋪設、未鋪設; - 所有標記為
highway=steps的路徑,列為樓梯; - 上述路徑 24 米範圍內未標路面的路徑;
- 每條線簡化至 1 米,坐標為香港 1980 方格網(EPSG:2326),以 0.5 米為單位;GeoJSON 則以 WGS84 表示,至小數點後七位。
共 135,769 條線:57,266 條屬已知路面或樓梯,78,503 條未知路面,合共 595,867 個點。
製作方法
使用 Peakline 引擎的工具,指令見英文版。每條路徑的 surface 會歸入上述十類中最接近的一類;未標路面的路徑只在接近已知路面或樓梯時保留。不會加入任何 OpenStreetMap 沒有的內容。