Proximity Toolset {#proximity-toolset}

From the docs [@esri-gptoolref]:

The Proximity toolset contains tools that are used to determine the proximity of features within one or more feature classes or between two feature classes. These tools can identify features that are closest to one another or calculate the distances between or around them.

# knitr::include_graphics("images/network/Analysis_Proximity.png")

For this chapter, you will need the following R Packages:

library(arc2r)
library(sf)
library(ggplot2)

Buffer {#buffer}

One of the most commonly used operations in ArcGIS pro is the one called Buffer. This operation provides a very convenient way of identifying areas of interest lying in the neighborhood of an existing spatial feature. In R the same action can be performed using the st_buffer function in sf.

Below we introduce a line spatial feature that depicts all the mountain bike routes in Switzerland.

data("mountainBikes_routes") # Dataset depicting the mountain bike routes in Switzerland

data("kantonsgebiet")
plot(st_geometry(kantonsgebiet))
plot(st_geometry(mountainBikes_routes), add = TRUE, col = "red")

We might be interested in identifying all the areas in a radius of 1000 m around these bike routes.

routes_buffer <- st_buffer(mountainBikes_routes,1000)

plot(st_geometry(routes_buffer))
plot(st_geometry(mountainBikes_routes), add = TRUE)

The operation above produces the same outcome as the one depicted in the figure below \@ref(fig:buffer).

knitr::include_graphics("images/buffer.png")


arc2r/book documentation built on March 5, 2021, 2:10 p.m.