Learn R Programming

DSpat (version 0.1.6)

create.lines: Create a systematic sample of parallel lines across a grid

Description

Create a systematic set of lines to sample a rectangular grid. The grid is positioned with a random start on the study area. The systematic grid can be set at any angle and the number of lines is set by the spacing or the spacing is set by width and number of lines. This is a wrapper function for rlinegrid in spatstat.

Usage

create.lines(study.area,nlines=NULL,width,spacing=NULL,angle=0)

Arguments

study.area
owin class defining area
nlines
number of lines
width
full transect width
spacing
spacing distance between centerlines
angle
angle of rotation in degrees anticlockwise from x-axis

Value

and x1,y1 is end of the line

See Also

simCovariates,simPts

Examples

Run this code
study.area=owin(xrange=c(0,100),yrange=c(0,100))
xp=create.lines(study.area,nlines=10,width=5,angle=180)
ls=lines_to_strips(xp,study.area)
plot(ls$lines,lty=2)
plot(owin(poly=ls$transects),add=TRUE)

Run the code above in your browser using DataLab