Issues requiring deviation from OpenMapTiles · Issue #93 · hyperknot/openfreemap · GitHub
Skip to content

Issues requiring deviation from OpenMapTiles #93

Open

Description

@hyperknot

Collecting issues that require deviating from the standard OpenMapTiles schema, or where the Planetiler implementation doesn't match the OMT spec.

PR #134 is a candidate implementation of a custom Planetiler profile on the new tilegen pipeline (replaces #133). It covers railways from zoom 6, via ferratas, extended path tags and hiking routes.

Need a custom profile (not in standard OMT schema)

Might already be in the OMT spec but missing from Planetiler

Unclear, needs investigation

Activity

  1. NoPlanNomad commented on May 31, 2026

    @NoPlanNomad

    Planetiler has two ways of adding custom information to the tiles: yaml config or java class.
    Yaml gives less control and seems like it is intended for defining fully new layers not altering existing onces, as a result my attempts of adding sac_scale to paths that have it resulted in duplicated lines in the layer.
    So I've tried to write a custom java class with a couple of goals in mind:

    • Adding a new "feature" to the map should not require custom logic for every feature.
    • Configuration should be somewhat straight forward if possible.
    • Expanding on a features information should not create a duplicate of said feature (example: adding sac_scale to a path should not cause a line on the map to still have the original value, this should help keep the tile sizes down).

    Planetiler uses the term feature for any point, line, polygon it is processing.

    what I've ended up with is a set of:

    • filters: used to check if incoming feature matches required conditions.
    • tag_maps: used to define the feature that should end up in the tiles that are being generated.
    • extractors: two constructs that bring filters and tag_maps together to actually process the incoming features into tile features.

    I've designed this in an attempt to find a way to get tags for outdoor into the mbtiles, whilst keeping the openmaptiles spec in mind.
    To prevent the double processing of features it doesn't allow planetiler to process a feature that it has processed it self.
    The main issue with no custom logic should be required happens when trying to process hiking routes. as a result of the route_x_ref, route_x_name etc. that are present in the transportation_name layer. to solve this I've added a lambda processor that can be added to the config of mapping relations onto a layer.

    A previous iteration was posted in #31 but this is a significant rewrite, a few of the open issues that could be fixed with this were also tagged over there.

    The main downside I see in this system is that right now it doesn't allow for overwriting the bypass of the default processing.

    Overall this system should be flexible enough to fix multiple open issues regarding information missing from the map and deviating from the openmaptiles spec in general.

    I could make further changes to it if you are interested in using this for deviating from openmaptiles.
    Any configs defined up top are just there for testing / as examples of how to use it.

    One of the things that should possibly be added is a way to set zoom levels of features.

    repository with the custom profile

  2. NoPlanNomad commented on Jun 4, 2026

    @NoPlanNomad

    The following issues also seem to relate.
    #31 #77 #103 #115 #116 #117

    The main issue issue with solving these issues is determining which tags to include.

    I've reworked my previously linked code to be more flexible.
    It can now actually add new tags to the base Planetiler profile and it supports for setting the zoom levels of features and individual tags within a feature.

  3. hyperknot commented on Sep 4, 2026

    @hyperknot
    OwnerAuthor

    I've just shipped a major refactor of the whole project. The tilegen pipeline is rebuilt from scratch and there's now a clean integration point for a custom Planetiler profile in tilegen/tilegen_lib/planetiler.py. Production still uses the standard OpenMapTiles profile for now.

    Updated the issue body with all related requests, grouped by whether they actually need a custom profile or might be gaps in Planetiler's OMT implementation.

  4. hyperknot commented on Sep 4, 2026

    @hyperknot
    OwnerAuthor

    Outdoor-related data/tag requests from the discussion in #31:

    • sac_scale, trail_visibility, surface, tracktype on paths/trails
    • via_ferrata_scale and highway=via_ferrata
    • Route relations (type=route, route=hiking) with network hierarchy (iwn/nwn/rwn/lwn), name, ref, colour, osmc:symbol
    • tourism=alpine_hut, tourism=wilderness_hut, amenity=shelter in POI layer
    • highway=trailhead as POI

    @ravenfeld and @NoPlanNomad have working custom profile code in #31 that covers most of these. PR #133 is a separate attempt at the same thing.

  5. added
    umbrellaUmbrella issue tracking multiple related issues
    on Sep 4, 2026
  6. anderslundx commented on Sep 5, 2026

    @anderslundx

    Regarding ocean names (#116):

    Ocean names are not in the tile data. They are mentioned in the water_name layer here: https://github.com/openmaptiles/openmaptiles/blob/master/layers/water_name/water_name.yaml

    I use a plugin that shows all data in the tiles at current level, and I can find no sign of ocean names.

    I would have to create an account with maptiler to be able to check if they are in the OMT tile data.

    I have two style layers that are relevant, one covering linestrings and one for points, limited to a few classes:

        {
          "id": "water-name-lakeline",
          "type": "symbol",
          "source": "openmaptiles",
          "source-layer": "water_name",
          "filter": ["==", ["geometry-type"], "LineString"],
          "layout": {
            "symbol-placement": "line",
            "symbol-spacing": 350,
            "text-field": ["coalesce", ["get", "name"], ["get", "name:en"]],
            "text-font": ["Noto Sans Italic"],
            "text-letter-spacing": 0.2,
            "text-max-width": 5,
            "text-rotation-alignment": "map",
            "text-size": 12
          },
          "paint": {"text-color": "#497fa0"}
        },
        {
          "id": "water-name-ocean",
          "type": "symbol",
          "source": "openmaptiles",
          "source-layer": "water_name",
          "filter": [
            "all",
            ["==", ["geometry-type"], "Point"],
            ["match", ["get", "class"], ["ocean", "sea", "bay", "strait"], true, false]
          ],
          "layout": {
            "symbol-placement": "point",
            "text-field": ["coalesce", ["get", "name"], ["get", "name:en"]],
            "text-font": ["Noto Sans Italic"],
            "text-letter-spacing": 0.2,
            "text-max-width": 5,
            "text-rotation-alignment": "map",
            "text-size": 14
          },
    

    Other water bodies of type point and class sea, bay or strait are visible in my map.

    Thanks for caring!

  7. anderslundx commented on Sep 5, 2026

    @anderslundx

    Regarding straits tagged as polygons and linestrings (#115)

    It's not in the data, so a problem with the schema. An error, because these are in the water_name.yaml file, same with ocean names.

    Image
  8. hyperknot commented on Sep 5, 2026

    @hyperknot
    OwnerAuthor

    @anderslundx you seem to understand a lot about this topic. Which of these do you think is fixable easily by a custom planetiler profile?

    I mean we'll be adding a custom profile/OMT mod soon, but its not clear what your "custom plugin" does. #115 can be done by profile?

  9. anderslundx commented on Sep 5, 2026

    @anderslundx

    Thanks for the trust! I have no idea about planetiler though, and some unread emails which may help me understanding how to fix things in the spec. I have a list of shortcomings, where the tiles are not aligned with the yaml files, if you are interrested. The OMT folks have been positive to fixing, but it seems not to actually fix things themselves.

    The problem with straits is that only one form of the tag is included - point. Straits can be points, linestrings or areas (including relations). Place=ocean are points, and there are exactly 5 of them, according to the osm wiki.

  10. hyperknot commented on Sep 5, 2026

    @hyperknot
    OwnerAuthor

    Look into planetiler, it's an amazing tool. Ask your favourite agenic harness like pi.dev to make a git clone and explore the codebase, it can tell you what it can and cannot do. I mean this whole thread is about fixing things in OMT without requiring the upstream project to agree with our decisions.

  11. NoPlanNomad commented on Sep 5, 2026

    @NoPlanNomad

    Regarding the oceans.

    If the goal is to get a similar setup to the lake centerlines, where you get a (curved) line that has the localized names for oceans, this is not provided by OSM.
    I believe the lake centerlines are a custom dataset used by planetiler, doing the same for oceans should be possible once the custom profiles are in.

    @anderslundx: What exactly was the issue with the strait?
    I seem to remember it being pressent in the mbtiles as polygon but not as a line?
    There was a fix that would add those lines in PR #133

  12. anderslundx commented on Sep 5, 2026

    @anderslundx

    I know what I can see comparing my own map with carto and OMT maps on osm.org, and from looking at the osm wiki and using overpass turbo.
    In my own map (using ofm tiles) I can find straits tagged as points in the osm data. Not straits mapped as areas (like Als Sund) or linestrings (like Svendborg Sund). Carto displays both, though the area ones are converted to a (center-) point, where a string would be much better.

    I can see #133 was closed a few hours ago - I will see the changes when the map tiles are updated.

    The problem apperas (to me) to be related to objects tagged differently (point/string/area) in the osm data, som objects does not end in the tiles. This probably affects other objects than straits as well.

    Another issue is with where the data for the OMT subclass field is taken from, an example is wetlands. Most wetland areas in OMT tiles have subclass wetland, bc the correct data is not collected, so no way to spearate various types of wetands, although a list of subclasses are mentioned in the yaml files (landcover, water layers, maybe also water_name).

  13. hyperknot commented on Sep 5, 2026

    @hyperknot
    OwnerAuthor

    @anderslundx can you post screenshot of all examples you are referring to? Both good and bad?

  14. anderslundx commented on Sep 5, 2026

    @anderslundx

    Als Sund, which is an area
    Image

    Svendborg Sund, which is a linestring

    Image

    Siø Sund, which is a point

    Image
  15. hyperknot commented on Sep 5, 2026

    @hyperknot
    OwnerAuthor

    Thanks, this is great reference, when we'll get there to have these fixed properly.

  16. anderslundx commented on Sep 5, 2026

    @anderslundx

    What I see/look for is the name, from water_name, either point or linestring, ofc.

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

    openmaptilesumbrellaUmbrella issue tracking multiple related issues

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions