Skip to content

Major road minzoom #221

Open
Open

Description

@wipfli

In many development countries the fastest roads are of type major_road. However, such roads show only up starting from z6 and more. Motorways would usually be shown at z3 to z6 but if a country has no motorways, the map looks very empty at these zoom levels.

Example: Tanzania at z4.5 looks like this:

Screenshot_20240227-032838

While Switzerland at z4.5 looks like this:
Screenshot_20240227-032821

Activity

  1. nvkelso commented on Feb 27, 2024

    @nvkelso
    Collaborator

    A few solutions (there are probably more):

    • Brute force: Show non-motorway roads earlier, at expense of clutter in more developed countries and large file size increases in same tile areas.
    • Algo: Calculate directions between major cities shown at the next zoom (or zoom +2) using that "next" zoom's place nodes and OSM road network and show the deduplicated way results (to reduce tile size) at the current zoom, regardless of the highway class, while preserving the highway tag so motorways versus non-motorway could optionally be styled distinctly. This should ideally be done per data release but in practice happens one-off and then can go stale with bit rot and operational decay.
    • Curation: Switch to Natural Earth for low zoom roads from OSM. While this would provide coverage and not be too big a tile size incrase, downside is the roads there in NE v5 are out of date and don't match up geometry wise on zoom in to OSM zooms. However, NE v6 is around 50% done redrawing the roads to solve that problem. Overtime the curation would need to be updated.
  2. wipfli commented on Feb 27, 2024

    @wipfli
    SponsorCollaboratorAuthor

    What about a per-country minzoom? For example in Switzerland I am happy with trunk at z6, but in Tanzania I would prefer trunk already at z3. This of course leads to some questions about styling...

  3. nvkelso commented on Feb 27, 2024

    @nvkelso
    Collaborator

    What about a per-country minzoom? For example in Switzerland I am happy with trunk at z6, but in Tanzania I would prefer trunk already at z3. This of course leads to some questions about styling...

    That can work well for clusters of countries that all have the same network pattern (eg trunk versus motorway more common as highest functional class in the country). It works less well if a more developed country is next to a less developed country and the roads might appear to start/stop at country boundaries because different threshold were used. In Europe this could be observed between Germany and Poland and Poland and Ukraine. In Africa this might add extra road detail in say Egypt and South Africa but overall improve the whole continent (a collection of countries with a localized config enabled).

    It could be a good interim approach, but is blocked here in Protomaps basemap repo by #44. Now that the NL.net grant is active this may be a priority @bdon?

  4. added a commit that references this issue on Feb 24, 2025
  5. wipfli commented on Mar 11, 2025

    @wipfli
    SponsorCollaboratorAuthor

    Can be implemented with roads matching rules #407

  6. pekkine commented on Oct 5, 2026

    @pekkine
    Contributor

    The US rules in highwayZoomsIndex already do per-country minzoom, so I added Finland the same way.

    Finland tags its national road network highway=trunk, not motorway, so z3 to z5 carry almost none of it. All of Finland fits on a phone screen at about z3, which is where we need it for a public weather service.

    PR: #640

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

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions