OvertureMaps / io-site

MIT License
31 stars 4 forks source link

Display geometrically scoped names only in those scopes #118

Open hlfan opened 1 month ago

hlfan commented 1 month ago

Description

Names of tunnels and bridges are being incorrectly displayed on open road segments instead of just at their respective scopes. This issue affects multiple transportation segments across the map.

image In the example above, the A2 is labeled "Seelisbergtunnel" outside the tunnel (its scope) on an open road section (highlighted in red).

What browser are you seeing the problem on? What version are you running?

every

The OS you're using

No response

Steps to reproduce

  1. Open the map with the provided link
  2. Observe the wrong labeling

The browser URL at the time you encountered the bug

https://explore.overturemaps.org/#12/46.95/8.5

bdon commented 1 month ago

It looks like this is an underlying data issue.

segment with GERS ID 0811fbffffffffff04716acab0f59fb1 has this name with linearly referenced sections:

{"rules":[{"variant":"common","value":"Seelisbergtunnel","between":[0.184943068,0.788987941]},{"variant":"common","value":"Fischlauwitunnel","between":[0.890559732,0.897527917]},{"variant":"alternate","value":"Fischlauitunnel","between":[0.890559732,0.897527917]},{"variant":"common","value":"Schopflibachviadukt","between":[0.91246581,0.92106792]}],"primary":"Seelisbergtunnel"}

If the name is not uniform among those sections, maybe it shouldn't be assigned the primary name?

hlfan commented 1 month ago

If we blame the issue on the data, then really the schema is to blame, since the primary property is required to be populated:

If a feature has a name, expect names to have at least one property: primary. This will always be populated with the localized name of a feature.

On the other hand, I'd say the renderer also shouldn't display the primary name if

names.rules?.some(rule => rule.value === names.primary && !rule.between.every(Number.isInteger))

since

The value of the between property is a pair of numbers [a, b] where 0a < b1.

bdon commented 1 month ago

Good point, since we can't do filtering operations in the renderer we need to remove the @name helper attribute in the tileset here: https://github.com/OvertureMaps/overture-tiles/blob/main/profiles/OvertureProfile.java#L36

jwass commented 1 month ago

How to handle the primary name when a segment has LR names was a hot topic some time ago. We ultimately decided that the longest segment's name would go in primary. I'll see if we have this documented somewhere.

A few solutions:

  1. If the renderer sees that a segment has LR names it should show the names on their appropriate segments. (I realize this is a huge pain).
  2. Overture redefines transportation segmentation to force splits on name changes so that the primary name always applies over the whole segment. There were good arguments against this.
  3. Use the new transportation splitter (https://github.com/OvertureMaps/transportation-splitter) for the segments which split segments on LR properties to me more OSM-like where all attributes apply to the whole segment. That could be the data feeding into the tiling pipeline rather than the raw data with LR names. (Solution 1 is basically having the renderer do this itself).
bdon commented 1 month ago

The tileset has been updated so it doesn't incorrectly label geometrically scoped names: https://explore.overturemaps.org/#12/46.95/8.5

unfortunately this means now neither part of the example is labeled on the map. To do this we would need to use the transportation-splitter.

Use the new transportation splitter

if everyone needs to run transportation-splitter for visual rendering purposes, maybe this output could be distributed alongside the non-split GeoParquet?