Skip to content

中庭のある建物 (type=multipolygon) をクライアントで 1 棟として扱う - #46

Merged
nyampire merged 21 commits into
mainfrom
feature/plateau-multipolygon-conflation
Aug 11, 2026
Merged

中庭のある建物 (type=multipolygon) をクライアントで 1 棟として扱う#46
nyampire merged 21 commits into
mainfrom
feature/plateau-multipolygon-conflation

Conversation

@nyampire

Copy link
Copy Markdown
Owner

なぜ必要か

API が中庭のある建物を type=multipolygon の relation で返すようになった (rapid_plateau_api #47、2026-08-11 本番反映)。

クライアントが特別扱いしているのは type=building だけで、multipolygon は素通りしていた。
メンバー way はタグを持たないため、個別に判定すると穴が単独の建物として扱われる

変更

  • conflation で type=multipolygon を 1 単位として扱う (外形の役割は outer、穴が inner)
  • accept の cascade を multipolygon relation にも通す
  • インスペクタで中庭建物を 1 棟として表示し、relation 自身の datum も受け付ける
  • 穴を持つ形状を穴ごと描画する
  • 高さ転記の対象に中庭建物を含める

設計と実装計画は docs/ に各機能ぶん置いてある。

test

unit 1209 passed、browser 751 completed / 5 skipped。

nyampire added 21 commits August 5, 2026 09:38
utilBuildingRelationInfo does not guarantee a multipolygon+building
relation has an inner member. If one arrived with zero, the info
line would read "a building with 0 courtyards".

Hide the line in that case instead of printing the nonsense count.
isCourtyard still only depends on relationType, not partCount, so
the "Add Only This Feature" suppression (the safety-critical part,
since multipolygon member ways carry no tags) is unaffected.
…guard

The test gave member ways no tags, matching real data, but that also made
osmWay#isArea() reject them as non-area regardless of the memberWayIDs
exclusion in _plateauRenderables. The assertion passed even with the guard
deleted. Tag the member ways in this one fixture so the guard is genuinely
under test; every other fixture in the file stays untagged.

Also correct the spec's description of the pre-fix symptom: reading the
pre-change PixiLayerRapid.js shows the Plateau branch only ever assigned
data.polygons, and untagged outer/inner ways never reached it (geometry()
returns 'line', not 'area'), so a courtyard building was not drawn at all
rather than appearing as "a building inside a building". Also note in the
spec that the member-way exclusion is kept as an explicit invariant, not
because member ways happen to be untagged today.
@nyampire
nyampire merged commit 48e92d8 into main Aug 11, 2026
3 checks passed
nyampire added a commit that referenced this pull request Aug 11, 2026
PR #46 でマージしたコードが参照する 3 キーが core.en.json に無く、
中庭の建物を選ぶと "Missing translation" が出る状態だった。

- rapid_inspector.option_accept_entire_courtyard_building
- rapid_inspector.courtyard_building_info
- rapid_inspector.courtyard_building_selected_info
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