get_neighbor: Get neighbor in the geometry

Description Usage Arguments Value Examples

View source: R/get_neighbor.R

Description

get_neighbor() get neighbors from an spatial object with class sfc_MULTIPOLYGON and returns a list object with class equal to "vizi".

Usage

1
get_neighbor(shapefile, tipo = "Queen")

Arguments

shapefile

A spatial object of class sfc_MULTIPOLYGON

tipo

type of neighbor.

Value

An object vizi

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# Import
nc <- sf::read_sf(system.file("gpkg/nc.gpkg", package = "sf"))

# Get the neighbor
l_nb <- get_neighbor(nc, "Queen")

# Visualize
view_connections(l_nb)

view_neighbor(l_nb)


## End(Not run)

denis-or/neighbor documentation built on Dec. 19, 2021, 10:11 p.m.