You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vector tiles: Centroid points should indicate area represented #801
When a stylesheet labels the centroids of areas, it might need to prioritize the centroids of large features over those of smaller features, all things being equal, to keep barely discernible features from misleadingly crowding out much larger features.1 A centroid point in the land_ohm_centroids or place_points layer should have a property that indicates the area of the feature it represents, based on the area of any associated boundary relation. Although the tiles now represent the boundary as a linestring feature as of #701, we could compute the area at the same time that we calculate the centroid, when we still have the whole boundary geometry as a polygon feature.
I’m unsure if the area should be in a physical unit such as hectares or in a projected unit. For the time being, MapLibre GL JS only supports Mercator projection, but there’s work underway to support a globe view that would benefit more from measurements in physical units.
Footnotes
A stylesheet may also wish to factor in the feature’s age or longevity. It can already do so using subtracting end_decdate from start_decdate, but ranking features by these properties would lead to quite bizarre results unless the area is also taken into account. ↩
I have added extra configuration in Imposm to calculate areas during the import and update processes. By default, areas are imported in square meters, but since this is a large BIGINT, I convert them to square kilometers.
Activity
Rub21 commentedon Feb 12, 2025
I have added extra configuration in Imposm to calculate areas during the import and update processes. By default, areas are imported in square meters, but since this is a large BIGINT, I convert them to square kilometers.
1ec5 commentedon Feb 12, 2025
Awesome! Next steps in #926.
1ec5 commentedon Feb 12, 2025
Ah, looks like we haven’t deployed this to production yet, my bad.
Rub21 commentedon Feb 12, 2025
Done, This is been deployed in production.