Skip to content

Vector tiles: Centroid points should indicate area represented #801

Closed

Description

@1ec5

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

  1. 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. ↩

Activity

  1. self-assigned this
    on Feb 11, 2025
  2. Rub21 commented on Feb 12, 2025

    @Rub21
    Member

    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.

    Image
  3. 1ec5 commented on Feb 12, 2025

    @1ec5
    MemberAuthor

    Awesome! Next steps in #926.

  4. 1ec5 commented on Feb 12, 2025

    @1ec5
    MemberAuthor

    Ah, looks like we haven’t deployed this to production yet, my bad.

  5. reopened this on Feb 12, 2025
  6. Rub21 commented on Feb 12, 2025

    @Rub21
    Member

    Done, This is been deployed in production.

  7. added theissue type on Mar 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions