View source: R/bwi2cartesian.R

bwi2cartesian | R Documentation |

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.

```
bwi2cartesian(azimuth, distance)
```

`azimuth` |
The azimuths, from north, eastern side, in gon. |

`distance` |
The distances from the origin, typically measured in centimeter. |

Matrix of cartesian coordinates in the unit of `distance`

.

```
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)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.