Skip to content

Draw large polygon sets as raster tiles (PolygonTiler) - #17

Merged
wf9a5m75 merged 2 commits into
developfrom
feat/polygon-tiling
Nov 9, 2026
Merged

wf9a5m75 merged 2 commits into
developfrom
feat/polygon-tiling

Conversation

@wf9a5m75

@wf9a5m75 wf9a5m75 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

何をするか

多数のポリゴン(既定: 2,000 個以上または頂点 50,000 以上)を、ネイティブの図形ではなくラスタータイルとして描きます(PolygonTilingOptions / PolygonTiler)。web・Android・iOS で同じ設計です。

  • タイルは SDK のタイルサーバー(web はサービスワーカー、ネイティブは LocalTileServer)で描きます。ズームごとに画素格子へ丸めて簡略化し、外周と穴の巻きを逆にそろえて nonzero で塗ります。
  • タップ判定は従来どおり PolygonManager が元の形で行います(InfoBubble などは今までどおり)。
  • タイルにできなくなった変更(geodesic にする、経度幅 180° 以上、3 点未満)が入ったポリゴンは、その場でネイティブ描画へ戻ります。
  • ボストン全域の区画(98,815 件・穴あり)と建物(105,599 件)で確認しています。

このリポジトリで変えたこと

  • PolygonTiler の配線(ポリゴンタイルをラスターレイヤーとして表示)。
  • 衝突なし。帯は develop の rasterKey で決まります。

develop の取り込み

このブランチは push 済みだったので、rebase せず origin/develop を merge commit で取り込みました。

  • ios-sdk-core の xcodebuild test(シミュレータ): 406 件 pass(develop の穴の結合の fixture を含む)。scripts/api-surface.sh check: 変えたモジュールは全部 ok、ベースラインの更新は不要。
  • iPad 実機(overlay-on-added のサンプル、Release)でボストンの区画 98,815 件・建物 105,599 件を MapLibre / Google / Mapbox / MapTiler / Longdo で表示: 約 1 秒で全件が載り、街区(穴)が正しく抜ける。MapLibre / Google でタップ 40 件の判定がデータと一致(穴あり区画を含む)。頂点ドラッグの追従(Polygon ページ、MapLibre / Google)。
  • このプロバイダはビルドのみで、実機では見ていません。

マージの順番

この機能は複数のリポジトリにまたがります。ios-sdk-core → 各 ios-for- → ios-sdk(親)* の順にマージが要ります。

この PR は大きな機能なので、マージするかはレビューのうえで判断してください。

The polygon controller gets ios-sdk-core's PolygonTiler: from 2,000 polygons
or 50,000 vertices they are drawn into raster tiles on the local tile server
and shown as one raster layer (mc-polygon-tiles), upserted into the raster
layer controller so the app's raster layers and the marker tiles are left
alone. Taps still resolve against the original shapes. The content update asks
the tiler to show the tiles again when the tile server has moved.
@wf9a5m75
wf9a5m75 merged commit a843e09 into develop Nov 9, 2026
2 checks passed
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