st_edge_length: Calculate edge length between two geometries

View source: R/st_edge_length.R

st_edge_lengthR Documentation

Calculate edge length between two geometries

Description

This function calculates the edge length between two geometries.

Usage

st_edge_length(
  x,
  y,
  dist.x = 0,
  dist.y = 0,
  geom.boundary = NULL,
  do.preProcessing = TRUE,
  return.geom = FALSE,
  quiet = TRUE
)

Arguments

x

polygon of class sf representing the basis geometry

y

polygon of class sf representing geometry of which the edge length is calculated

dist.x

buffer distance in mapping units around geometry using sf::st_buffer. Default: 0

dist.y

buffer distance in mapping units around geometry using sf::st_buffer. Default: 0

geom.boundary

polygon of class sf representing subregions, e.g. administrative boundaries

do.preProcessing

If TRUE (default), the input of geom.frag is, first, dissolved to single part feature, and second, splitted to multi-parts

return.geom

If set to TRUE, intermediate geometries are returned as well. Default: FALSE

quiet

If set to FALSE, actual state is printed to console. Default: TRUE.

Value

list with edge length, and if return.geom is TRUE also the edge-length-geometry (and eventually buffer results).

Note

If the edge line has incomprehensible gabs(can happen for "complicated" geometries), it can help to use a small buffer distance (< 1, e.g. 1e-04) to get a complete edge line.


raff-k/VLSM documentation built on Oct. 13, 2023, 11:13 a.m.