Twinkle HubTwinkle Hub
Sign in

📌 2026-08-17 added: ⚖️ Taiwan statute time machine — historical article text · revision history · full-text search · citation graph (935 datasets · 35,454+ rows)

View full changelog →

UAV nearby restricted zones

tw_dronegis_nearby

TW-specificMIT

**關鍵字 / Keywords**: 無人機 附近禁航 UAV drone nearby restricted 500 米 民航局 fly-zone

找指定座標 N 公里內的無人機禁航 / 限航 / 緊急管制區.

Server-side bbox prefilter (STRtree) + haversine 距離排序, < 5ms warm.
距離以 polygon centroid 計 (近似, 對小範圍 polygon 足夠精確).

Args:
    lat: 中心緯度 (WGS84)
    lon: 中心經度 (WGS84)
    radius_km: 搜尋半徑 (公里, 預設 2.0, 上限 50.0)
    color_filter: 可選, 限定 `"紅區"` / `"黃區"` / `"綠區"`.
        None=全部 layer (含無顏色的 nfz / emg-area / 國家公園)
    limit: 回傳上限 (預設 50, 超過則 `truncated=true`)

Returns dict:
    center: [lat, lon]
    radius_km: 實際使用半徑
    color_filter: 套用的顏色過濾
    zones: list — 每筆含 dataset_id, 空域名稱, 空域顏色, 主管機關名稱,
        罰則, severity, distance_km (centroid haversine), direction
        (8 方位中文 + 度數, e.g. "東北 23°"), centroid [lat, lon].
        依 distance_km 遞增排序.
    count: len(zones)
    truncated: bool — True 表示超過 limit 已截斷

典型問句:
    「我家附近 2km 內有哪些禁飛區?」「桃機 5km 內紅區?」
    「墾丁 10km 內所有管制區?」

Source / License 同 tw_dronegis_check_point.

Input schema

{
  "properties": {
    "lat": {
      "title": "Lat",
      "type": "number"
    },
    "lon": {
      "title": "Lon",
      "type": "number"
    },
    "radius_km": {
      "default": 2,
      "title": "Radius Km",
      "type": "number"
    },
    "color_filter": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "Color Filter"
    },
    "limit": {
      "default": 50,
      "title": "Limit",
      "type": "integer"
    }
  },
  "required": [
    "lat",
    "lon"
  ],
  "title": "tw_dronegis_nearbyArguments",
  "type": "object"
}

How to call

Once your Twinkle Hub MCP client is configured, your agent will see tw_dronegis_nearby. Just ask it to call — example:

# Ask Claude / any MCP client:
請用 tw_dronegis_nearby 處理 "…"。

# It will call:
tw_dronegis_nearby(input="…")

Haven't set up a client yet?

Claude Desktop in 3 minutes — download the .mcpb and double-click, or see docs for other clients.

See user docs