Parse OSM relations in the bake #8
Labels
No labels
animation
audio
blocked
bug report
controversial
documentation
easy
feature request
hard
medium
multiplayer
physics
ui
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
elsie/liuverse#8
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
liuverse-fetch-map/src/osm.rsparses anOsmMapwith onlynodeandwayelements. The campus extract carries 114 relations that are dropped entirely,
because the struct has no
relationfield:Nine of the
multipolygonrelations are buildings -- I-huset, D-huset,Fysikhuset, A-huset, B-huset, C-huset, Angstromhuset, Odalmannens
lantbruksmuseum, Terra -- and their member ways are untagged: no
building=*on any outer ring, so
buildings_of(osm.rs:265) skips them. They are onlypresent today where MazeMap happens to publish the same hall under a different
survey.
This issue is the mechanism only: add
OsmRelation { id, tags, members }toOsmMap(anOsmMembercarryingkind/ref/role, as the XML servesthem), and assemble rings for
type=multipolygon-- outer members minus innerones, selected by
role. Nothing is added toBakedWorldhere.Follow-up issues build the courses, routes, bus lines and boundaries on top of
it.
Related
siterelationThis is the right shape: parser and ring assembly only, no
BakedWorldchanges, multipolygon outers minus inners. It unblocks #29, #30, #35, #41 and #46 without committing to any of them, and the nine building relations are a real correctness fix on their own. Do this before the features that depend on it.The mechanism is in, for the case the shuttle needed.
PR #105 adds
relationto theOsmMapthe bake reads: anOsmRelationwith its tags and its members, each member carrying its type, reference and role, which is what the XML serves. The relation ids are not kept, because nothing needed them yet.What it is used for so far is the campus shuttle's routes (#28, #29):
route=busrelations of the campus's own shuttle network becomeBakedRoutes with the line they drive and their stops.What is still open here is the rest of the list, and the part that matters most for the campus is the buildings: nine of the
multipolygonrelations are halls — I-huset, D-huset, Fysikhuset, A-huset, B-huset, C-huset, Angstromhuset, Odalmannens lantbruksmuseum, Terra — whose member ways carry nobuilding=*tag, sobuildings_ofskips them and they are only present today where MazeMap happens to publish the same hall under a different survey. Assembling rings for them needs outer members minus inner ones, selected byrole, which is what this issue describes.Refs #105
Both halves of this issue mechanism have been implemented, so closing as implemented.
osm.rsparsesOsmRelation { id, tags, members }with the member kind/ref/role that the XML provides (789e48b, PR #105).relation_buildingassembles the footprint of atype=multipolygonrelation carrying abuildingtag:member_ringforouter,member_ringsfor inner holes, selecting by role.buildings_ofbakes it as a shell whose tags come from the relation, so the halls with untagged member ways — I-huset, D-huset, Fysikhuset, A through C-huset, Angstromhuset, Terra and the rest — finally appear even when MazeMap does not publish them (d8606a0).The mechanism is already carrying two features: the shuttles that became
BakedRoute(routes_of), and the relation buildings above. The remaining consumers (#30, #35, #41, #46, #50) are each their own problem.Refs #105