osm-americana/openstreetmap-americana

Odd-numbered admin-level boundaries are missing

Open

#481 opened on Jul 9, 2022

View on GitHub
 (4 comments) (0 reactions) (0 assignees)JavaScript (78 forks)auto 404
boundariesbuggood first issue

Repository metrics

Stars
 (238 stars)
PR merge metrics
 (PR metrics pending)

Description

Boundary lines are only visible for countries (admin_level=2), states (4), counties (6), and municipalities (8), but not for odd values in between. Any boundary shared by an odd-numbered boundary relation is missing. Odd-numbered boundaries are used for various purposes, such as for townships in Ohio and for cities and boroughs in New York State.

Examples

For example, the tripoint of two townships (7) and one city (8) in Ohio:

A boundary between two cities (8) that looks like an island because it’s only connected to boundaries between cities and townships (7):

What should be the wiggly boundary of New York City (5), the boundary between Bronx and Westchester counties (6), and the boundary between The Bronx and Yonkers (7):

Diagnosis

Currently, we have four boundary line layers and three boundary casing layers that each match a single admin_level value exactly. This leaves the intermediate values uncovered.

https://github.com/osm-americana/openstreetmap-americana/blob/a8597df2616d9293d29b17d53eaafb4186f63ed2/src/layer/boundary.js#L44

Implementation notes

An intermediate value should have a dash pattern that’s similar to both adjacent values. This can make it difficult to visually discern the adjacent values. A common technique is to alternate dash patterns. Some use shorter dashes or dots among longer dashes to communicate the admin level quite literally.

We could add more layers for the intermediate values, but there’s so much commonality between these layers that we should instead consolidate them into one line layer and one casing layer, using expressions to control the dash pattern or casing size based on the admin_level property.

Contributor guide