Twinkle HubTwinkle Hub

座標查行政區代碼

tw_lookup_district_by_coord

検証ツール · 20 件🇹🇼 台湾読み取り専用

座標 → 行政區代碼 (縣市/鄉鎮市區/村里).

Args: lng / lat: WGS84. unit: 'county' / 'town' / 'village' (default). Returns: {found, result: [{countyid, countycode, countyname, townid, towncode, townname, villcode, villname}]}

關鍵: 之前 hub geo_basemap join_keys「行政區代碼」95.9% phantom, 本 tool 補完: 點位 dataset (lat/long) → 行政區代碼 → 跨 dataset join.

パラメータ

名前説明
lng *number
lat *number
unit"county" | "town" | "village"
生の JSON schema
{
  "properties": {
    "lng": {
      "title": "Lng",
      "type": "number"
    },
    "lat": {
      "title": "Lat",
      "type": "number"
    },
    "unit": {
      "default": "village",
      "enum": [
        "county",
        "town",
        "village"
      ],
      "title": "Unit",
      "type": "string"
    }
  },
  "required": [
    "lng",
    "lat"
  ],
  "title": "lookup_district_by_coordArguments",
  "type": "object"
}

呼び出し方

スターター——パラメータは​上表参照
tw_lookup_district_by_coord({ lng: 10 })