Skip to content

Show surfaces and way types of tracks from OpenStreetMap data #1280

Closed

Description

@switch87

Is your feature request related to a problem? Please describe.

When planning a hike or a ride I want to know what a track is made of: how much is asphalt, gravel or dirt, and how much is path, forest track or road. QMapShack shows length, elevation and slope, but nothing about the surface or the way type. Today I have to look this up in other tools (e.g. Komoot shows "surfaces" and "way types" for every route), although the information is in OpenStreetMap and QMapShack users who route with Routino already have the OSM extract on disk.

Describe the solution you'd like

  • A per-region surface database built from an OSM extract (.osm.pbf, e.g. from Geofabrik), the same file that is used to build a Routino database. Built from a new tool tab (Tool → Create Surface Database) in a background thread, or with a small command line tool. Several databases can be active at once.
  • For every track, the Info tab shows two stacked bars with legend (km and %): Surfaces (paved / semi-paved / unpaved / unknown) and Way types (path, forest/field track, cycleway, steps, street, road, busy road), plus a collapsible list with the detailed surfaces (asphalt, gravel, dirt, …). It is recomputed in the background whenever the track's points change.
  • In the Style tab, two new colour sources "Surface" and "Way type" (like Slope), drawn with one fixed colour per category and a legend.
  • The track point tooltip shows surface and way type.
  • Nothing is stored in GPX/QMS files; it is derived data like the slope.

Describe alternatives you've considered

  • Using the Routino database: its files keep only a "paved" flag, no surface or track type.
  • An online service per track: not wanted for an offline-first application.
  • Reading the map files (Garmin/Mapsforge): their way types don't carry the OSM surface tags reliably.
  • An external script that writes the values as track point extensions into the GPX: works (QMapShack can colour by extensions), but it is manual work for every track and not part of the UI.

Give a reason why someone else should spend time on that request

Surface is one of the first things hikers, cyclists and MTB riders check when planning, and it is a major reason people use web planners next to QMapShack. The data is free in OSM and the users who route offline already have it locally. I have a working implementation and will open a pull request for it, so the effort for the maintainers is review.

Additional context

A working implementation is tested on Linux (Gentoo, Qt 6.11): own PBF reader (no new library), SQLite with R*Tree, Qt Concurrent for the background work. For a 28 km hike near Durbuy (Belgium) it gives 27 % paved, 21 % semi-paved, 47 % unpaved, 6 % unknown; Komoot shows 35 % asphalt, 62 % unpaved, 3 % unknown for the same route.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions