TCProfilePts {TCHazaRds} | R Documentation |
Transect points from a origin through a point or with a bearing and to the opposite side.
Description
Transect points from a origin through a point or with a bearing and to the opposite side.
Usage
TCProfilePts(
TC_line,
Through_point = NULL,
bear = NULL,
length = 200,
step = 2
)
Arguments
TC_line |
origin of the transect |
Through_point |
a point to pass through |
bear |
the bearing |
length |
the length of the transect in Km |
step |
the spacing of the transect in Km |
Value
spatial vector of transect profile points with distances in Km (negative for left hand side)
Examples
require(terra)
TCi <- vect(cbind(c(154.1,154),c(-26.1,-26)),"lines",crs="epsg:4283") #track line segment
TCi$PRES <- 950
TCi$RMW <- 40
TCi$ISO_TIME <- "2022-10-04 20:00:00"
TCi$LON <- geom(TCi)[1,3]
TCi$LAT <- geom(TCi)[1,4]
TCi$STORM_SPD <- perim(TCi)/(3*3600) #m/s
TCi$thetaFm <- 90-returnBearing(TCi)
#Through_point <- isd[isd$OID==isdsi]
pp <- TCProfilePts(TC_line = TCi,Through_point=NULL,bear=TCi$thetaFm+90,length =100,step=10)
plot(pp,"radialdist",type="continuous")
lines(TCi,col=2)
[Package TCHazaRds version 1.0 Index]