Obs_poly: Observation block with support

Description Usage Arguments Value Examples

View source: R/AllConstructor.R

Description

This function initialises an object of class Obs_poly which defines a an observation data setand associated spatial supports. IMPORTANT: The vertices need to be in consecutive order.

Usage

1
Obs_poly(pol_df, name = "Obs_poly", alpha0 = NA, av_dist = NA, ...)

Arguments

pol_df

a wide table format data frame identifying support of observation, or the path to a file containing the data. The data should be in wide-table format and hava column denoting the observation id, vertices x1, y1, x2, y2, ... and the time point t if required.

alpha0

sets, if needed, an averaging matrix over observations. If this specified, also a parameter av_dist needs to be specified

av_dist

denotes within which distance observations are considered neighbours.

...

further arguments passed to the parent Obs() constructor for further processing.

Value

Object of class Obs_poly (which inherits from class Obs and is thus also an observation block)

Examples

1
2
3
4
5
6
7
# Create a polygon 'footprint'
pol_df <- data.frame(id=1,x1=0,x2=0,x3=1,x4=1,y1=0,y2=1,y3=1,y4=0,t=0)
pol_df <- rbind(pol_df,data.frame(id=2,x1=-0.5,x2=-0.5,x3=0.5,x4=0.5,y1=-0.5,y2=0.5,y3=0.5,y4=-0.5,t=0))
df <- data.frame(id=1,x=0.5,y=0.5,z=1,std=1,t=0)
df <- rbind(df,data.frame(id=2,x=0,y=0,z=0.2,std=0.2,t=0))
O <- Obs_poly(df=df,pol_df=pol_df)
plot(O,"z")

shazhe/mvst0 documentation built on May 29, 2019, 9:20 p.m.