st_centroid_coords: Extract centroid coordinates as a matrix of an sf polygon...

Description Usage Arguments Value Examples

View source: R/contiguity.R

Description

Extract centroid coordinates as a matrix of an sf polygon object for plotting a connectivity graph

Usage

1

Arguments

x

sf object

Value

matrix of lon/lat coordinates

Examples

1
2
3
4
5
coords <- st_centroid_coords(ncovr)
ncovr_rook <- st_rook(ncovr)
rook_nb <- st_as_nb(ncovr_rook)

plot(rook_nb, coords, lwd=.2, col="blue", cex = .5)

spatialanalysis/sfExtras documentation built on Nov. 6, 2019, 12:15 a.m.