Spatial relations between vector layers

In this section, you will learn how to perform operations involving pairs of vector layers. These types of operations are very common in spatial data analysis. We often want to know, for instance:

  • What are the distances of different resorts from the nearest coastline?
  • Which houses are within a radius x of the epicenter of an earthquake?
  • Which parts of the habitat of an endangered species are contained within protected nature reserves?

All of these operations require the overlay of features from two distinct layers, although, as we have seen earlier, the result can be:

  • A numeric value (the distance from a resort to the nearest coastline is 50 meters)
  • A logical value (the house is within a distance of 10 kilometers ...

Get Learning R for Geospatial Analysis now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.