polar2Projected | R Documentation |
Computes projected coordinates (Easting, Northing, Altitude) from polar coordinates (Azimuth, Slope, Distance) and center position (Easting, Northing, Altitude). Magnetic declination and meridian convergence are optional parameters. In case distance is measured to the border of objects (e.g. trees), the diameter can be added to compute the coordinates of object center.
polar2Projected(
x,
y,
z = 0,
azimuth,
dist,
slope = 0,
declination = 0,
convergence = 0,
diameter = 0
)
x |
vector. easting coordinates of centers in meter |
y |
vector. northing coordinates of centers in meter |
z |
vector. altitudes of centers in meters |
azimuth |
vector. azimuth values from centers in radian |
dist |
vector. distances between centers and objects in meter |
slope |
vector. slope values from centers in radian |
declination |
vector. magnetic declination values in radian |
convergence |
vector. meridian convergence values in radian |
diameter |
vector. diameters in meter (e.g. in case a radius should be added to the distance) |
A data.frame with easting, northing and altitude coordinates, and horizontal distance from centers to objects centers
plot_tree_inventory
for tree inventory display
# create data.frame of trees with polar coordinates and diameters
trees <- data.frame(
x = rep(c(0, 10), each = 2),
y = rep(c(0, 10), each = 2),
z = rep(c(0, 2), each = 2),
azimuth = rep(c(0, pi / 3)),
dist = rep(c(2, 4)),
slope = rep(c(0, pi / 6)),
diameter.cm = c(15, 20, 25, 30)
)
trees
# compute projected coordinates
polar2Projected(trees$x, trees$y, trees$z, trees$azimuth, trees$dist,
trees$slope,
declination = 0.03, convergence = 0.02, trees$diameter.cm / 100
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.