Skip to content

Record which building a point-only place sits inside - #10

Merged
hawkrives merged 1 commit into
mainfrom
poi-parent-building
Sep 8, 2026
Merged

hawkrives merged 1 commit into
mainfrom
poi-parent-building

Conversation

@hawkrives

Copy link
Copy Markdown
Member

St. Olaf publishes its dining rooms, its bookstore, its visitor desk and its admissions office in the points-of-interest layer as bare points — they are rooms and counters within a building, not buildings. A consumer asked to frame or highlight one has no area to draw, and zooming to a zero-area bounding box yields a blank tile at maximum zoom.

This adds a parent property naming the building each sits inside, emitted on every place in both map.json and map.geojson (null where it does not apply, matching the file's existing promise that a consumer never tests for a missing key).

What is set

place parent
The Cage, The Lion's Pause, Stav Hall, The Kings' Dining Room, Visitor Information Desk, St. Olaf College Bookstore bc (Buntrock Commons)
Admissions Office toh (Tomson Hall)

The Windmill, the Wind Chime Memorial and the Electric Vehicle Charger are the other three points in that layer. They are in no building and get no parent.

Why hand-written

The same argument the ids section already makes. The source layer names the building in its own label for five of the seven — "Buntrock Commons - Dining" — but turning that into bc is string matching against a mutable field, which is how the Skoglund Athletic Center once ended up in a car park. Point-in-polygon agrees with every one it can resolve and contradicts none, but it cannot see the Admissions Office, whose point falls inside no footprint at all, and it would pick arbitrarily between two buildings if footprints ever overlapped.

Verification

verify.py gains three checks on each parent: it must name a place that exists, must not be the place itself, and must name a place that has a footprint — a parent that is itself a point leaves a consumer exactly where it started. Each was confirmed to fire by feeding it a deliberately wrong value before the real ones were written:

4 check(s) failed:
  - overrides.yaml: thecage has parent 'nosuchbuilding', which is not a place
  - overrides.yaml: stavhall is its own parent
  - overrides.yaml: stavhall has parent 'stavhall', which has no footprint of its own -- it cannot stand in for one
  - overrides.yaml: thelionspause has parent 'thekingsdiningroom', which has no footprint of its own -- it cannot stand in for one

With the real values, build.py and verify.py both pass and the only change to the built output is the new key — 128 of 128 features carry it, 7 non-null.

Consumer

StoDevX/AAO-React-Native shows a map cutout on a building-hours detail sheet. Six St. Olaf venues key to point-only places and currently draw a blank tan tile; this is what lets that cutout fall back to the enclosing building.

St. Olaf publishes its dining rooms, its bookstore, its visitor desk and its
admissions office as points in the points-of-interest layer rather than as
footprints. A consumer asked to frame or highlight one has no area to draw, and
zooming to a zero-area bounding box gives it a blank tile at maximum zoom.

`parent` gives it a building to fall back to. It is written by hand rather than
derived: the source layer names the building in its own label for five of the
seven, but matching "Buntrock Commons - Dining" to `bc` is string matching
against a mutable field, and point-in-polygon cannot see the Admissions Office,
whose point falls inside no footprint at all.

verify.py rejects a parent that names no place, names the place itself, or names
a place with no footprint to lend.
@hawkrives
hawkrives merged commit 4f79ae8 into main Sep 8, 2026
7 checks passed
@hawkrives
hawkrives deleted the poi-parent-building branch September 8, 2026 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant