viring: cross visibility map with concentric rings.

Description Usage Arguments Details Value Author(s) Examples

View source: R/virings.R

Description

The virings function will create a new layer resulting from crossing the mapped visibility with concentric-and-non-overpaping rings for each mapped area around turbines. Centroids are obtained from the visibility map. Visibility map can be built from buffer areas resulting from sf::st_buffer function.

Usage

1
viring(x, d)

Arguments

x

a shapefile describing the visibility mapped for each turbine.

d

a vector of distances to build concentric rings aroung each mapped area.

Details

Ensure that d is a vector with distances, single, regularly spaced or not. Your visibility layer must have at least two columns: ag and visib. Check and remember to use a single projection for all layers in your project. Do not use geographic coordinate system.

Value

a sf object.

Author(s)

Paulo E. Cardoso

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
# Distaces for rings
dist = c(10, 20, 30, 40, 50, 100)
# crossing visibility map with rings
rings <- viring(x = visib, d = dist)
# Add some randomly displaced carcasses
logs <- st_sample(st_buffer(ags, 50), 10, type = "random",
                  exact = TRUE) %>%
 st_sf(.)
logs$idu <- 1:5
# Plot it
ggplot() +
  geom_sf(aes(fill = as.numeric(area), colour = factor(ag)),
          size = .5,
          data = rings) +
  geom_sf(data = logs)

dfdwp <- dwp(vr = rings, pt = logs)

## End(Not run)

PauloEduardoCardoso/genestdwp documentation built on April 9, 2020, 3:40 p.m.