delineate_settlements() lays a grid over building points, marks the
cells holding at least one building as settled, and joins settled
cells that touch into settlement patches. The patches feed the zones of
build_blocks() and the patch of unit_graph(), which keeps a
village in one group when it fits under the caps.
Arguments
- points
Buildings, as an
sforsfcobject of points or of footprint polygons (their centroids are used). The grid is laid in their CRS, so points in longitude and latitude withcell = 3 / 3600give the 3 arc-second grid of the WorldPop rasters. Transform the patches to the projected CRS of the blocks afterwards.- cell
The side of a grid cell, in CRS units. The default
100suits a metric CRS and matches the 100 m size of the WorldPop rasters.- link
How far apart, in cells, two settled cells may be and still belong to one settlement. The default
1joins cells that touch at a side or a corner.2also joins cells with one empty cell between them, which merges hamlets that are one field apart.
Value
An sf object with one row per patch, holding settlement (its
id), buildings and cells. The cell size is kept in the attribute
"cell", which build_blocks() uses to space the points of its zones.
See also
Other input functions:
assign_points(),
assign_units(),
build_blocks(),
measure_units()
Examples
set.seed(1)
village <- cbind(rnorm(80, 300, 60), rnorm(80, 300, 60))
hamlet <- cbind(rnorm(15, 900, 30), rnorm(15, 700, 30))
houses <- sf::st_sfc(
lapply(seq_len(95), function(i) {
sf::st_point(rbind(village, hamlet)[i, ])
}),
crs = 32630
)
delineate_settlements(houses, cell = 100)
#> Simple feature collection with 2 features and 3 fields
#> Geometry type: MULTIPOLYGON
#> Dimension: XY
#> Bounding box: xmin: 100 ymin: 100 xmax: 1000 ymax: 800
#> Projected CRS: WGS 84 / UTM zone 30N
#> settlement buildings cells geometry
#> 1 1 80 10 MULTIPOLYGON (((200 200, 20...
#> 2 2 15 4 MULTIPOLYGON (((1000 600, 9...
delineate_settlements(houses, cell = 100, link = 3)
#> Simple feature collection with 2 features and 3 fields
#> Geometry type: MULTIPOLYGON
#> Dimension: XY
#> Bounding box: xmin: 100 ymin: 100 xmax: 1000 ymax: 800
#> Projected CRS: WGS 84 / UTM zone 30N
#> settlement buildings cells geometry
#> 1 1 80 10 MULTIPOLYGON (((200 200, 20...
#> 2 2 15 4 MULTIPOLYGON (((1000 600, 9...