Skip to content

Draw large polygon sets as raster tiles, with the Boston sample - #17

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

wf9a5m75 merged 4 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 件)で確認しています。

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

  • 親の feat/polygon-tiling: ボストンの建物のサンプル(Polygons で 10 万件)。gitlink を ios-sdk-core / 各プロバイダの新しい先頭に向けました(develop は取り込み済み)。

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 は大きな機能なので、マージするかはレビューのうえで判断してください。

先にマージが要る submodule の PR

Same data and behaviour as the React and Android samples:

- Downtown: the bundled Overture extract, three nested areas.
- City buildings / city parcels: the whole city, about 100,000 polygons and
  1.4 million vertices each, read from the app's Documents folder (too large
  for the bundle; copy them there with devicectl, see BostonData.swift).
  Parcels are coloured by land use, with a legend.
- A loading overlay with progress, an InfoBubble at the tap (parcel id and land
  use, or building name, height and id, and the vertex count), and a tap on the
  map elsewhere closes it. The tapped polygon is highlighted in place.

The launch environment opens a given dataset and camera
(MAPCONDUCTOR_SAMPLE_BOSTON_DATA / _AREA / MAPCONDUCTOR_SAMPLE_INIT_CAMERA), and
MAPCONDUCTOR_SAMPLE_BOSTON_PROBE / MAPCONDUCTOR_SAMPLE_AUTOPAN print frame
rates and drive pans for measurement. The tap label carries seq|id|lat|lng as
its accessibility value, for UI tests.
…lop merged in

Each submodule's feat/polygon-tiling now has its develop merged (overlay stacking, clear order, geodesic fill, hole union). Polygon tiles take the polygon band through OverlayStacking.rasterKey; the core's holesAreDisjoint uses the hole union's EdgeGrid.
# Conflicts:
#	ios-for-arcgis
#	ios-for-googlemaps
#	ios-for-here
#	ios-for-longdo
#	ios-for-mapbox
#	ios-for-mapkit
#	ios-for-maplibre
#	ios-for-mappls
#	ios-for-maptiler
#	ios-for-openmobilemaps
#	ios-for-tomtom
#	ios-sdk-core
@wf9a5m75
wf9a5m75 merged commit 9602db0 into develop Nov 9, 2026
1 check 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