protomaps / basemaps

Basemap PMTiles generation and cartographic styles for OpenStreetMap data and more
https://maps.protomaps.com/
Other
378 stars 49 forks source link

Ensure strait labels are limited to single layer (and not any water polygon exterior rings) #87

Closed nvkelso closed 1 year ago

nvkelso commented 1 year ago

Strait features were eligible for both physical_point and physical_line layers, producing duplicate horizontal point labels and oriented line labels in the same tile.

There should only ever be a single representation, and we should prefer the point label at this time.

(In future we may want to generate curved lines suitable for labeling from the area, but right now we derive a label point instead.)

The result of this change keeps the blue circled node, but drops the red line.

image

nvkelso commented 1 year ago

This problem is actually more widespread, in that any OSM polygon that could be a line (because it has an exterior ring) is then exported into the physical_lines data layer.

Planetiler doesn't have functionality to say it's ONLY a line, so the solution here seems to be to test that it CAN be a line, but it's NOT also a polygon.

Test location is in San Francisco south of the ballpark.

image
nvkelso commented 1 year ago

After:

image image
bdon commented 1 year ago

LGTM