Skip to contents

Centres a regular rectangular survey on a desired latitude and longitude

Usage

centreLawnOnPosition(
  centreLon,
  centreLat,
  proj4string = NULL,
  tolerance = 20,
  ...
)

Arguments

centreLon

Desired centre location of survey

centreLat

Desired centre location of survey

proj4string

projection string of class CRS-class. If NULL defaults to "+proj=longlat +datum=WGS84"

tolerance

maximum distance (in metres) between desired survey centre and realised survey centre

...

other arguments to be passed into lawnSurvey

Value

Line transect coordinates (lon, lat) as specified in lawnSurvey

Examples

if (FALSE) {
coords=centreLawnOnPosition(centreLon=-170,centreLat=-60,lineLengthkm=2,lineSpacingkm=0.5,
startBearingdeg=30,numOfLines=5)
plot(0,0,xlim=range(coords[,1]),ylim=range(coords[,2]),type='n',
xlab='Longitude, deg',ylab='Latitude, deg')
arrows(x0=coords[1:(nrow(coords)-1),1], y0=coords[1:(nrow(coords)-1),2], 
      x1 = coords[2:nrow(coords),1], y1 = coords[2:nrow(coords),2])
text(coords,row.names(coords),cex=0.6)
points(coords[1,1],coords[1,2],col='blue',pch=17,cex=2)
points(coords[nrow(coords),1],coords[nrow(coords),2],col='blue',pch=15,cex=2)
points(-170,-60,col='purple',pch=19,cex=2)
points(geomean(coords),col='red',pch=19,cex=1)
legend('bottomright',c('Beginning','End','Desired centre','Actual centre'),
 col=c('blue','blue','purple','red'),pch=c(17,15,19,19),pt.cex=c(1,1,2,1))
}