Learn R Programming

treePlotArea (version 3.1.0)

bwi2cartesian: Convert Coordinates of the German National Forest Inventory to Cartesian Coordinates

Description

Coordinates of the German national forest inventory are measured in gon eastward from north at distance in centimeter. We need cartesian coordinates for relational computations.

Usage

bwi2cartesian(azimuth, distance)

Value

Matrix of cartesian coordinates in the unit of distance.

Arguments

azimuth

The azimuths, from north, eastern side, in gon.

distance

The distances from the origin, typically measured in centimeter.

Examples

Run this code
a1 <- c(0, 100)
d1 <- c(100, 200)
print(coords <- bwi2cartesian(a1, d1))
all.equal(coords, matrix(c(0, 100, 200, 0), nrow = 2, byrow = TRUE),
          check.attributes = FALSE)

Run the code above in your browser using DataLab