Areal Data: Vectors
Content for Wednesday, September 13, 2023
Now that you have started working with the various components of coordinates and coordinate reference systems, it’s time to start learning the fundamental aspects of working with vector data in sf
and R
. The syntax is a little confusing at first, but once you’ve gotten a sense for the logic behind it you should be able to start piecing together the functions necessary to implement the pseudocode you write for an analysis. We’ll spend more time on vector manipulation in the coming weeks so you’ll get plenty of practice with the ideas we introduce today.
Readings
Same as last class really, but hopefully you’ll begin to understand them better…
The introductory vignette for the
sf
package has a lot of useful info onsf
objects and conventions.Section 2.2 on Vector Data and Sections 5.1-5.3 on Geographic Operations in Lovelace et al. (Lovelace et al. 2019) - for more details about vectors and geometric operations on vectors.
Chapter 2, Sections 1-3 and Chapter 3, Section 1 of Spatial Data Science by Edzer Pebesma and Roger Bivand (of the
sf
,sp
,rgeos
, andrgdal
packages)
Objectives
By the end of today, you should be able to:
Implement approaches for checking and reparing geometries in R
Understand
predicates
andmeasures
in the context of spatial operations in sfUse st_*
to evaluate attributes of geometries and calculate measurements
Slides
The slides for today’s lesson are available online as an HTML file. Use the buttons below to open the slides either as an interactive website or as a static PDF (for printing or storing for later). You can also click in the slides below and navigate through them with your left and right arrow keys.