RandRec: Function to randomly generate points within a given...

Description Usage Arguments Value Note Examples

Description

Function to randomly generate points within a given rectangular shaped distribution

Usage

1
RandRec(RecShape, npts = 100)

Arguments

RecShape

- The outline of a rectangular distribution output from the EqualAreaRectangle() function

npts

- The number of randomly generated points within the rectangular shape

Value

Returns a 2-dimensional array of decimal degree coordinates within a rectangular shape

Note

Function currently does not take acount of the decreasing surface area moving toward the poles so points closer to the poles will be overrepresented relative to the actual surface area they represent

Examples

1
2
3
4
HorseShoeTest<-PtsAlgHorseShoe(z=2000,spacing=1,endAngles=c(-90,90))
HorseShoePts<-RandHorseShoe(center=c(0,0),npts=100,HorseShoeShape=HorseShoeTest)
RecOutline<-EqualAreaRectangle(TargetArea=as.numeric(HorseShoePts$TotalArea_km2),error=0.001)
RandRec(RecShape=RecOutline,npts=100)

GeoRange documentation built on May 1, 2019, 8:03 p.m.

Related to RandRec in GeoRange...