perimeter: A function to compute the spatial units' perimeters

perimeterR Documentation

A function to compute the spatial units' perimeters

Description

The function is based on on sf and lwgeom packages and can be used with a shape file or an R spatial object (class sf, sfc or sfg).

Usage

perimeter(spatobj = NULL, folder = NULL, shape = NULL)

Arguments

spatobj

- a spatial object (class sf, sfc or sfg) containing geographic information

folder

- a character vector with the folder (directory) name indicating where the shapefile with the geographic information is located.

shape

- a character vector with the name of the shapefile (without the .shp extension) which contains the geographic information

Value

A perimeter vector

See Also

Other spatial functions used for segregation indices computation: area, contig, distance, distcenter, boundaries

Examples

 perimeter(segdata)  
foldername <- system.file('extdata', package = 'OasisR')
shapename <- 'segdata'
perimeter(folder = foldername, shape = shapename)

OasisR documentation built on Aug. 30, 2023, 1:09 a.m.

Related to perimeter in OasisR...