openmaptiles / openmaptiles

OpenMapTiles Vector Tile Schema Implementation
https://openmaptiles.org
Other
2.35k stars 576 forks source link

Merging Overlapping Building Geometries #1667

Open lorenzoMezza opened 2 weeks ago

lorenzoMezza commented 2 weeks ago

Where I should look in the OpenMapTiles source code to merge building geometries that overlap or contain each other within the same tile? Or is there any other way to do this with OpenMapTiles?

I thought of this because I'm writing a 3D OSM map renderer and noticed that for buildings, enabling transparency causes unpleasant Z-fighting due to overlapping geometries. Even without considering transparency, the fact remains that these are redundant pieces of information hidden inside the building itself, which are invisible and waste both graphic and network resources when talking about map rendering. I've found various ways to solve the problem directly in the renderer, but I would prefer to resolve the issue at its core.

Thank you in advance for any suggestions.

pnorman commented 1 week ago

There shouldn't be overlapping buildings - building parts are not buildings.

Merging overlapping buildings will result in also merging adjacent buildings, turning a row of terraced houses into one long building.