Skip to contents

Create tessellated spatial units.

Usage

st_create_tessellations(
  x,
  boundary,
  type = "morphological",
  segment_length = 0.5,
  shrink_extent = 0.4,
  merge_threshold = NULL,
  merge_type = "min_centroid_distance",
  contiguity = "rook",
  verbose = T
)

Arguments

x

a sf object with POLYGON geometries representing buildings.

boundary

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

type

string; Type of tessellated spatial unit to create. Default = "morphological". Note: Currently, only "morphological" tessellation is implemented.

segment_length

numeric; Length of segments building polygons are subdivided into. Default = 0.5. See Fleischmann et al., 2020 for details.

shrink_extent

numeric; Extent of inward buffer on building polygons. Default = 0.4. See Fleischmann et al., 2020 for details.

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 tessellated spatial units.

References

Fleischmann, M., Feliciotti, A., Romice, O., & Porta, S. (2020). Morphological tessellation as a way of partitioning space: Improving consistency in urban morphology at the plot scale. Computers, Environment and Urban Systems, 80, 101441.

See also

st_merge_spatialunits, moter::motess()

Examples

tessellations <- st_create_tessellations(x = bangalore_buildings,
boundary = bangalore_boundary, segment_length = 0.5, shrink_extent = 0.4,
merge_threshold = NULL, verbose = FALSE)
#> Error in dplyr::summarise(dplyr::group_by(voronoi_polygons, temp_id),     geometry = sf::st_union(geometry)):  In argument: `geometry = sf::st_union(geometry)`.
#>  In group 1: `temp_id = 1`.
#> Caused by error in `UseMethod()`:
#> ! no applicable method for 'st_union' applied to an object of class "NULL"
plot(tessellations)
#> Error in eval(expr, envir, enclos): object 'tessellations' not found