Skip to contents

Create street block spatial units.

Usage

st_create_streetblocks(
  x,
  boundary,
  merge_threshold = 4050,
  merge_type = "min_centroid_distance",
  contiguity = "rook",
  verbose = T
)

Arguments

x

a sf object with LINESTRING geometries representing a street network.

boundary

an sf object with POLYGON geometries representing the extents of the study area.

merge_threshold

numeric; value represents the smallest acceptable size for a spatial unit. Contiguous units will be iteratively merged until this value is reached. To skip this process, set merge_threshold = NULL. See st_merge_spatialunits() for more details.

merge_type

string; Passed on to st_merge_spatialunits. Criteria with which polygons are merged. Must be one of "min_centroid_distance", "min_shared_boundary", or "max_shared_boundary". Default = "min_centroid_distance". See st_merge_spatialunits() for more details.

contiguity

string; one of "queen" or "rook". Default = "rook".

verbose

logical; if FALSE no status messages will be output.

Value

A sf object with POLYGON geometries representing street block spatial units.

See also

st_merge_spatialunits()

Examples

street_blocks <- st_create_streetblocks(x = bangalore_highways,
boundary = bangalore_boundary, merge_threshold = 1, verbose = FALSE)
#> Warning: The `sf` geometry column was renamed before merging.
#> Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is FALSE
plot(street_blocks)