get.spatial.overlap: get.spatial.overlap

View source: R/spatial-overlap-fcns.R

get.spatial.overlapR Documentation

get.spatial.overlap

Description

Calculates the % overlap between two geographies. Takes two sf objects, a unique/row identifier column for each; returns a row for each combination of rows in the input sfs that intersect with one another with a column for the percent overlap. % overlap can indicate true overlap, or it can be an artifact of differing resolutions between the shapefiles or other artifacts of their representation. Filtering to geometries below a very small % overlap using filter.threshold or otherwise can remove these slivers.

Usage

get.spatial.overlap(
  sf1,
  sf2,
  sf1.identifier,
  sf2.identifier,
  filter.threshold = 0.01,
  return.sf = F,
  crs = 5070
)

Arguments

sf1

First sf object

sf2

Second sf object

sf1.identifier

colname as string for region identifiers for first sf object

sf2.identifier

colname as string for region identifiers for second sf object

filter.threshold

percent overlap between sf1 and sf2, as decimal, below which to trim results before returning.

return.sf

Return sf object with geometries. Slows down operation to do so.

crs

crs to use during spatial overlap calculations. Defaults to EPSG 5070, an equal-area projection.


kmcd39/geox documentation built on Nov. 15, 2024, 2:03 a.m.