regionalize: Estimate Regions by Geographic Features

View source: R/regionalize.R

regionalizeR Documentation

Estimate Regions by Geographic Features

Description

This offers a basic method for dividing a shape into separate pieces

Usage

regionalize(shp, lines, adj = adjacency(shp), epsg = 3857)

Arguments

shp

sf tibble to estimate regions for

lines

sf tibble which divides shp into regions

adj

adjacency graph

epsg

numeric EPSG code to planarize to. Default is 3857.

Value

integer vector of regions with nrow(shp) entries

Examples

data(towns)
# make some weird roadlike feature passing through the towns
lines <- sf::st_sfc(sf::st_linestring(sf::st_coordinates(sf::st_centroid(towns))),
  crs = sf::st_crs(towns)
)
regionalize(towns, lines)

christopherkenny/geomander documentation built on Feb. 18, 2024, 7:58 p.m.