get_nearest_station: Get the nearest stations to the preferd station.

View source: R/get_nearest_station.R

get_nearest_stationR Documentation

Get the nearest stations to the preferd station.

Description

Get the nearest stations to the preferd station.

Usage

get_nearest_station(id, lonlat = T, dt, ...)

Arguments

id

The ID of the desired station

lonlat

logical. If TRUE, coordinates should be in degrees; else they should represent planar ('Euclidean') space (e.g. units of meters). See pointDistance for details.

dt

A data.table which contains 3 columns (i.e., ID, Lon, Lat).

...

Other parameters which passed to pointDistance

Value

A vector with station IDs sorted by distance.


hxfan1227/cmdcr documentation built on Nov. 1, 2024, 12:40 a.m.