跳至內容
cwa
API 參考

測站

stations.get

def get(station: str) -> Station
def get(station: Sequence[str]) -> Mapping[str, Station]

依站號查詢一個或多個測站。

client.stations.get(station: str) -> Station
client.stations.get(station: Sequence[str]) -> Mapping[str, Station]
await async_client.stations.get(station: str) -> Station
await async_client.stations.get(station: Sequence[str]) -> Mapping[str, Station]

stations.list

def list(*, county: County | None = None) -> tuple[Station, ...]

列出測站,可指定縣市。

client.stations.list(*, county: County | None = None) -> tuple[Station, ...]
await async_client.stations.list(*, county: County | None = None) -> tuple[Station, ...]

stations.nearest

def nearest(location: PointInput, *, limit: int = 1, max_distance_km: float | None = None) -> tuple[NearbyStation, ...]

查詢距指定鄉鎮或座標最近的測站。

client.stations.nearest(location: PointInput, *, limit: int = 1, max_distance_km: float | None = None) -> tuple[NearbyStation, ...]
await async_client.stations.nearest(location: PointInput, *, limit: int = 1, max_distance_km: float | None = None) -> tuple[NearbyStation, ...]

NearbyStation

station: Station
distance_km: float

測站及其水平距離,單位為公里。

Station

id: str
name: str
coordinates: Coordinates
source: Source
county: County | None
township: Township | None
elevation_m: float | None

氣象署逐時觀測中的測站資料。