Skip to content

fix(1.2): Correct zoom values of link and service attributes - #189

Open
MichaelKreil wants to merge 1 commit into
shortbread-tiles:mainfrom
versatiles-org:main
Open

MichaelKreil wants to merge 1 commit into
shortbread-tiles:mainfrom
versatiles-org:main

Conversation

@MichaelKreil

Copy link
Copy Markdown
Member

As discussed in #184, this should be included in version 1.2.

Problem:

Some features in the streets layer can only be distinguished by an attribute, but the schema lists that attribute for a higher zoom level than the feature itself. Between these two zoom levels, features end up in tiles with the wrong attribute because it is missing.

Link roads (kind=motorway/trunk/primary/secondary/tertiary):

  • in layer from zoom level 5+/6+/8+/9+/10+
  • links are identified by attribute link
  • but the attribute was available from: 11+ (shortbread 1.0, 1.1)
  • now the attribute is available from: 5+ (shortbread 1.2)

Railways with service=* (kind=rail/narrow_gauge):

  • in layer from zoom level 10+
  • identified by attribute service
  • but the attribute was available from: 11+ (shortbread 1.0, 1.1)
  • now the attribute is available from: 10+ (shortbread 1.2)

As a result, motorway links are drawn as stumps of main roads below z11. At z10, railway yards, sidings, and spurs are drawn at main-line weight, and then switch to service styling at z11.

Change

In schema/1.2.md, layer streets:

  • link: zoom 11+ -> 5+, the lowest zoom where any link road appears
  • service: zoom 11+ -> 10+, the lowest zoom level at which railways with service=* appear

Impact on implementations

These changes affect the data, not just the documentation. TileMaker and the OSM2PGSQL Themepark shortbread_v1 theme split the layer into streets_low (z5–10, only kind and rail), streets_med and streets. They need to add link and service to the streets_low writes. In TileMaker, this involves a two-line change. The Planetiler custommap sample requires a matching zoom change.

What this does not fix

This PR is not a "hot fix" for the 1.0 and 1.1 specifications. Tiles built against these specifications will still contain incorrect data with erroneous attributes at certain zoom levels.

@MichaelKreil
MichaelKreil requested a review from pnorman October 26, 2026 13:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant