Skip to contents

Centres a zig-zag survey on a desired latitude and longitude

Usage

centreZigZagOnPosition(
  centreLon,
  centreLat,
  proj4string = CRS("+proj=longlat +datum=WGS84"),
  tolerance = 20,
  ...
)

Arguments

centreLon

Desired centre location of survey

centreLat

Desired centre location of survey

proj4string

projection string of class CRS-class

tolerance

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

...

other arguments to be passed into \linkzigzagSurvey

Value

Line transect coordinates as specified in zigzagSurvey

Details

The call of zigzagSurvey has unrotated=FALSE

Examples

if (FALSE) {
coords=centreZigZagOnPosition(centreLon=-33,centreLat=-57,lineLengthkm=60,startBearingdeg=30,
rotationdeg=10,numOfLines=21)
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(-100,-60,col='purple',pch=19,cex=2)
points(geomean(coords),col='red',pch=19,cex=1)
legend('topright',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))
 }