generateSites: Simulate observed and/or predicted points on an empty...

Description Usage Arguments Details Value Examples

View source: R/generateSites.R

Description

This function takes an empty SpatialStreamNetwork and creates a set of proposed design points on the stream network.

Usage

1
2
generateSites(ssn, obsDesign, predDesign = SSN:::noPoints,
  o.write = FALSE)

Arguments

ssn

an object of class SpatialStreamNetwork

obsDesign

a design function from the package SSN.

predDesign

a design function from the package SSN. By default, no prediction points are generated using the function noPoints.

o.write

a logical indicating whether any existing observed and/or predicted sites in ssn@path should be overwritten. Defaults to FALSE.

Details

This function works in a similar fashion to createSSN from the package SSN. This function uses one of the design functions provided in SSN to generate a set of sites on an empty SpatialStreamNetwork. The differences with this function are that (1) this function assumes the stream network already exists and concentrates only on generating the site locations and associated data, and (2) locates the sites in physical space with physical coordinates. The function createSSN only locates sites on an abstract network which is not associated with a coordinate reference system, hence limiting its applications to real data.

The new observed and/or predicted sites will appear as shapefiles in ssn@path.

Value

An object of class SpatialStreamNetwork

Examples

1
2
3
4
5
6
# SSN with small random design
s <- createSSN(100, binomialDesign(20), 
path = tempPath("example02.ssn"), importToR = TRUE)

# Overwrite design with a systematic design
s2 <- generateSites(s, systematicDesign(0.5), o.write = TRUE) 

apear9/SSNdesign documentation built on Feb. 19, 2020, 4:29 a.m.