Create a systematic sample of parallel lines across a grid

Share:

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

1
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

lines dataframe with label,x0,y0,x1,y1,width where x0,y0 is beginning and x1,y1 is end of the line

Author(s)

Jeff Laake

See Also

simCovariates,simPts

Examples

1
2
3
4
5
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)

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.