Skip to content

Generalize geometries across time #603

Open

Description

@1ec5

The vector tiles contain simplified geometries at lower zoom levels to reduce the size of the tile, but the simplification only occurs at the level of an individual feature. When single conceptual feature varies in geometry over time, we map it as multiple elements. If the feature’s geometry remains mostly constant except for minor changes, the tile ends up with a lot of mostly redundant data; the changes in geometry might be too minor for the user to even perceive at a lower zoom level.

For example, the now-infamous 10/165/397 tile weighs a whopping 10.5 megabytes, the vast majority of which consists of the historical boundaries of San José, California. There are so many boundary relations because the city annexed additional property every few days for decades on end. Each of these annexations is significant enough to show cumulatively at, say, zoom level 16, but not at zoom level 10.

We could significantly reduce the size of the zoom level 10 tile by merging an element with the preceding or following element in chronological order if the two geometries differ by only a small area (in projected units). The merged feature’s geometry would be the union of the two elements’ geometries, and its start_date and end_date properties would be the minimum and maximum, respectively. If any other included key differs, such as name, the elements would not be merged.

This simplification would need to assume that the elements are part of the same chronology relation. I think it would be reasonable to assume that the relation’s members are correctly sorted chronologically, but it might not be necessary, depending on how this merging is implemented.

I give the z10 San José tile as an extreme example, but other areas might still benefit from the cumulative effect of merging lots of buildings, land use areas, and boundaries.

/ref #588 (comment) #577 (comment)

Activity

  1. changed the title [-]Simplify geometries across time[/-] [+]Generalize geometries across time[/+] on Sep 9, 2023
  2. 1ec5 commented on Sep 9, 2023

    @1ec5
    MemberAuthor

    We could significantly reduce the size of the zoom level 10 tile by merging an element with the preceding or following element in chronological order if the two geometries differ by only a small area (in projected units). The merged feature’s geometry would be the union of the two elements’ geometries, and its start_date and end_date properties would be the minimum and maximum, respectively. If any other included key differs, such as name, the elements would not be merged.

    This is a simplistic explanation that suggests an easy literal approach, but it comes with the downside that it would ignore an annexation on one side of town that cancels out a deannexation on the other side of town. This is rather contrived in the case of San José’s aggressive annexations of the ’50s and ’60s under City Manager Dutch Hamann, but land swaps have occurred many times elsewhere, and other kinds of features like buildings might see similarly subtle changes in area.

    It might be worth investigating algorithms for generalizing geometry changes across zoom levels, substituting the zoom levels for timestamps. Perhaps looking beyond cartography to the world of computer graphics, the feature could be modeled as a 3D mesh and then decimated. This would require the chronology relation’s members to be well-ordered and contiguous in the time dimension.

  3. 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

No one assigned

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions