Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,13 +1,51 @@
### Unreleased

- Give every place the geohash cell that contains its own centroid, ahead of
the population tie-break, so a border town no longer loses its own centre to
the larger city across the border (for example Calexico resolving to
Mexicali, or Heerlen to Aachen). Placetype ranking is unchanged, and cells
holding two centroids are still decided by population. Disable with
`--home-cell-priority false` (`WOF_HOME_CELL_PRIORITY=0`). Centroid
coordinates outside the place geometry, including an exterior bounding-box
midpoint fallback, do not receive home-cell priority.
- Stop the dominant-city rollup absorbing the home cell of a town in another
country, whether that cell is a descendant of the promoted parent or the
promoted parent itself. Rollups inside a country are unchanged, so a metro
still reads as one city.
- Apply home-cell ownership across nested cover cells, not only within a single
hash. A place that owns the coarse cell holding its centroid now also keeps
the finer cells over that same point when a neighbour emits them, so the rule
holds for the longest-prefix lookup the runtime actually performs. Placetype
ranking still decides first, and no cell is added to the index.
- By default, stop the dominant-city rollup suppressing or replacing a place
whose placetype it does not outrank, whether that place owns a descendant cell
or the promoted parent itself. A county could absorb the cell holding a town's
own centre, which is a downgrade the cell comparator would never make - and
because the rollup runs per batch, it left that cell undefended in an
`--append` build, so the next country written took it and the town's centre
resolved across the border (Douglas AZ reading as Agua Prieta; Mittelberg and
Riezlern, the Austrian Kleinwalsertal, reading as Oberstdorf). Rollups between
localities are unchanged; explicitly adding `county` to
`--dominant-city-placetypes` restores the earlier county suppression behavior.
- Judge compact-index redundancy against the nearest kept ancestor cell instead
of any matching prefix. A row was dropped whenever some coarser cell named the
same place, even when a different place owned the cell in between, and the
lookup then answered with that other place.
- Reconcile nested home cells from each place's own cover rather than from the
cells it happened to win, so a place that loses the cell holding its centroid
to a co-centred neighbour still carries its claim to the finer cells over that
point. The pass no longer depends on the order places are read.
- Report the rollup and home-cell invariants in the build summary (promotions
refused, home cells reclaimed or kept, rows kept from a shadowing owner), so a
world build shows whether any of these rules ever fires.
- Keep counties out of the dominant-city rollup. A parent geohash cell rolled
up to the place that dominates its children on population, and `county`
counted as a city-like placetype, so a metro could be labelled with its
county's name while the smaller localities under it lost their own cells
(Brockport and Greece, NY answering "Monroe"). The rollup now only hands a
parent cell to a placetype listed in `--dominant-city-placetypes`
(default `locality,localadmin`, env `WOF_DOMINANT_CITY_PLACETYPES`); add
`county` to that list to reproduce earlier builds. Counties still win cells
`county` to restore county eligibility. Counties still win cells
through the normal comparator. Both routes into a parent cell -- winning the
dominant-city competition, and being the only city-like owner in the cell --
share one eligibility gate, so a county cannot take a parent cell through the
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,10 +239,12 @@ Builder notes:
- `--region-max-precision`
- `--region-sparse-max-precision` + `--region-sparse-min-area-km2` for very large sparse regions (for example geohash-3 in Amazon-like interiors)
- `--promote-locality-over-region` (default `true`) prefers locality labels in shared parent cells when there is no competing locality (keeps city labels sticky against region-only outskirts)
- `--home-cell-priority` (default `true`) gives a place the cell that contains its own centroid, ahead of the population tie-break, so a border town is not swallowed by the larger city across the border. Placetype ranking still applies first, and a cell holding two centroids is still decided by population. A centroid coordinate outside the place geometry does not receive this priority; this includes bounding-box midpoint fallbacks that land outside concave, holed, or multipart geometry. Because the index is walked by longest matching prefix, the claim is enforced across nested cells too: a place that owns the coarse cell holding its centroid also keeps the finer cells over that point. The dominant-city rollup keeps a foreign town's home cell for the same reason, whether that cell is the promoted parent or one of its descendants; rollups within one country are unaffected. This is a guarantee of the generated, uncurated database; an explicitly applied [curation overlay](curation/README.md) is the final labeling layer and may deliberately reassign matching cells, including an absorbed place's home cell
- Dominant-city rollup keeps broad city labels sticky in mixed city/suburb cells unless there is competing major-city pressure:
- `--dominant-locality-population` (default `100000`)
- `--dominant-locality-ratio` (default `3`)
- `--dominant-city-placetypes` (default `locality,localadmin`) placetypes eligible to be the dominant city of a parent cell, whether it wins a competition or is the only city-like owner in that cell. A county wins cells like any other place, but naming a whole parent cell after it reads as a mistake, so it is excluded by default; add `county` to reproduce pre-1.1 builds
- `--dominant-city-placetypes` (default `locality,localadmin`) lists placetypes eligible to be the dominant city of a parent cell, whether one wins a competition or is the only city-like owner in that cell. A county still wins cells on its own merits but is excluded from naming a whole parent cell by default; explicitly adding `county` restores the earlier county rollup, including suppression of lower-ranked locality descendants
- Without that explicit county override, a rollup only folds a place into a better- or equally-ranked label, so a county cannot absorb a locality and strip the town of the cell holding its own centre
- Parent-cell takeover guard:
- `--parent-locality-min-share` (default `0.5`) requires locality ownership of at least that child-cell share before replacing a parent cell label
- Excludes neighbourhood-like placetypes from default reverse output
Expand Down Expand Up @@ -281,6 +283,7 @@ Useful WOF build env vars:
- `WOF_REGION_SPARSE_MAX_PRECISION` sparse very-large-region precision (default `3`)
- `WOF_REGION_SPARSE_MIN_AREA_KM2` area threshold for sparse region precision (default `80000`)
- `WOF_PROMOTE_LOCALITY_OVER_REGION=1|0` prefer locality labels over region in shared parent cells (default `1`)
- `WOF_HOME_CELL_PRIORITY=1|0` let a place keep the cell that contains its own centroid (default `1`)
- `WOF_DOMINANT_LOCALITY_POPULATION` major-locality threshold for dominant-city rollup (default `100000`)
- `WOF_DOMINANT_LOCALITY_RATIO` dominant-vs-next locality population ratio (default `3`)
- `WOF_DOMINANT_CITY_PLACETYPES` placetypes eligible to be a parent cell's dominant city (default `locality,localadmin`)
Expand Down
Loading
Loading