gravitystorm / openstreetmap-carto

A general-purpose OpenStreetMap mapnik style, in CartoCSS
Other
1.51k stars 811 forks source link

Restricting road types used for shield placement #4897

Closed dch0ph closed 6 months ago

dch0ph commented 8 months ago

Expected behavior

Road name shields should be in "boring" bits of the map.

Actual behavior

Shields can be placed on any road segment, This seems to have the effect of increased likelihood of shields appearing in busy parts of the map with multiple short segments.

Screenshots with links illustrating the problem

From area

Shields placed here, obscuring detail image

image

It's unclear to me why mapnik fails to place a shield on the boring stretch between roundabouts (here at Z14) image

A solution to the primary issue would be to exclude ways with junction=roundabout and junction=circular. It doesn't make sense to allow shields here.

You could make a similar argument to exclude bridge=*. But in contrast to junctions, bridges can be long, and so at higher zoom levels shields might improve information quality rather than obscure.

I don't understand shield placement well enough to encourage shield placement in long stretches.

imagico commented 8 months ago

Related issues: #951, #4401.

dch0ph commented 8 months ago

Thanks for linking related issues. It looks like shield placement is a general nightmare.

I'm experimenting with "AND junction IS NULL", which seems a simple way to remove some of worst placements.

dch0ph commented 6 months ago

I'm closing this issue, effectively folding into #951.

"AND junction IS NULL" would be a logical addition, since you don't want shields on junctions, but in practice it has made little observable difference in experiments. Mapnik just loves putting shields on junction flares.