polygonal.div: polygonal.div

polygonal.divR Documentation

polygonal.div

Description

Given a boundary and corresponding divisions within boundary, finds number of sub-polygons in region. Returns a dataframe with region identifiers and number of polygons. Filter all subpolygons w/ area between 50,000 m^2 (these comprise highway interchanges for example.) Also applies "negative buffer" – i.e., shrinks the area to find polygons. This handles issues where hwy resolution is slightly different from that of CZs or ends slightly earlier at international boundary. It also means that if a hwy ends or changes class a few meters from the cz boundary, it can still count as a division. (Operative difference in Dallas, TX, for example)

Usage

polygonal.div(
  region,
  divs,
  negative.buffer = 100,
  min.size = NULL,
  verbose = F,
  return.sf = F,
  ...
)

Arguments

region

sf object representing neighborhoods to allocate to subdivision

divs

linear sf representing divisions.

negative.buffer

Shrink region by this amount only for calculating polygons. Useful for handling shpfiles w/ different resolutions, especially for regions along an international border. Defaults to 100m.

min.size

Minimum (area) size for population, in meters. Defaults to 5e5, or 1/2 a km^2. Set to NULL to not filter by size.

return.sf

If true, returns an sf object, w/ one row per polygon subdivision, that can easily be mapped or allocated to neighborhoods. If false (default), returns number of polygons.


kmcd39/divM documentation built on Oct. 21, 2023, 11:28 p.m.