getCoords_DBHYDRO: Retrieve station coordinates from DBHYDRO

View source: R/getCoordsDBHYDRO.R

getCoords_DBHYDROR Documentation

Retrieve station coordinates from DBHYDRO

Description

Downloads DBHYDRO station coordinate data. Note that these coordinates may be incorrect in DBHYDRO (e.g., LASPALM12 appears right next to LPG1, when in reality it is ~500 meters north).

Usage

getCoords_DBHYDRO(stn = "LASPALM11", spatial = TRUE)

Arguments

stn

character string. Case sensitive.

spatial

logical. If 'TRUE', a spatialPointsDataFrame is returned. If 'FALSE', a dataframe is returned

Value

dataframe/spdf getCoords_DBHYDRO returns a dataframe or spatialPointsDataFrame with lat/long (epsg:4326) and UTM zone 19 coordinates.

Examples

## Not run: 
### example usage as part of a workflow

SMA.keys <- c(
37737, # LPG1
37740, # LPG2
39288, # LASPALM11
39289, # LASPALM12
39290, # LASPALM13
39291, # LASPALM14
39292, # LASPALM15 
"07103", # ANGEL
"05738", # G-3273 
"WN173",  # S357_H
"AM177"  # S357N_H
)
SMAlist    <- lapply(X = SMA.keys, getHydro, startDate = "20200101", 
     endDate = "20200901")
SMADat     <- do.call(rbind, SMAlist)
sma.coords <- do.call(rbind, lapply(X = unique(SMADat$stn), getCoords_DBHYDRO))

plot(sma.coords)

## End(Not run)


troyhill/SFNRC documentation built on Dec. 30, 2024, 4:32 p.m.