Description Usage Arguments Value Details Examples
xtractogon
uses the ERD ERDDAP data web service to extact
environmental data inside a polygon defined by vectors of
latitudes and longitudes
1 | xtractogon(dtype, xpos, ypos, tpos = NA, verbose = FALSE)
|
dtype |
- number or string identifying the ERDDAP parameter to extract |
xpos |
- array giving longitudes (in decimal degrees East, either 0-360 or -180 to 180) of polygon |
ypos |
- array giving latitudes (in decimal degrees N; -90 to 90)of polygon |
tpos |
- 2-element array giving min and max time (specify both minimum and maximum dates). For the last available time, use "last". Default NA. |
verbose |
- logical for verbose download out, default FALSE |
structure with data and dimensions
extract$data - the masked data array dimensions (lon,lat,time)
extract$varname - the name of the parameter extracted
extract$datasetname - ERDDAP dataset name
extract$longitude - the longitudes on some scale as request
extract$latitude - the latitudes always going south to north
extract$time - the times of the extracts
xtractogon extracts the data from the smallest bounding box that contains the polygon, and then uses the function "point.in.polygon" from the "sp" package to mask out the areas outside of the polygon.
1 2 3 4 | tpos <- c("2014-09-01", "2014-10-01")
xpos <- mbnms$Longitude
ypos <- mbnms$Latitude
sanctchl <- xtractogon('erdVH3chlamday', xpos, ypos, tpos = tpos )
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.