xtrSatin: Extract data values from satellite image(s)

Description Usage Arguments Details Value Author(s) Examples

View source: R/xtrSatin.R

Description

Extract data values for selected pixels from an image created with plotSatin.

Usage

1
xtrSatin(satin.obj, points = NULL)

Arguments

satin.obj

a satin object as returned by read.oceancolor

points

a data frame with point longitude and latitude coordinates to extract data values.

Details

If provided, points must have two columns with x and y coordinates. When not specified, points can be selected by clicking on the image.

Value

A data frame with at least 6 columns. The first two (“x” and “y”) represents the points argument, either specified or selected by clicking on the image. Columns 4 and 5 (“longitude” and “latitude”) are the coordinates of pixels closer to points, while column 3 (“d”) represents the distance between them. The remaining column(s) are the parameter values for every image in the satin.obj.

Author(s)

Héctor Villalobos

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# load data, define coordinates and extract values
data(dbsst)
plotSatin(dbsst)
coord <- data.frame(x=seq(-130, -114, 2), y=seq(20, 36, 2))
values <- xtrSatin(dbsst, points = coord)
values

# if no points are given the user can select them by clicking on the image
## Not run: 

plotSatin(dbsst)
values2 <- xtrSatin(dbsst) # *** click on the image ***
values2

## End(Not run)

r-forge/satin documentation built on Feb. 18, 2022, 2:39 a.m.