2.1 Introduction

A model is way to represent reality:

  • Vector data model: it uses points, lines and polygons.

  • Raster data model: it divides the surface into cells (pixel) of constant size (aerial photography, remote sensing)

Using one of them depend of use cases, domain of applications. It is not uncommon to use both at the same time.

library("sf")
## Linking to GEOS 3.10.2, GDAL 3.4.1, PROJ 8.2.1; sf_use_s2() is TRUE
library("terra")
## terra 1.7.37
library("spData")
## The legacy packages maptools, rgdal, and rgeos, underpinning the sp package,
## which was just loaded, will retire in October 2023.
## Please refer to R-spatial evolution reports for details, especially
## https://r-spatial.org/r/2023/05/15/evolution4.html.
## It may be desirable to make the sf package available;
## package maintainers should consider adding sf to Suggests:.
## The sp package is now running under evolution status 2
##      (status 2 uses the sf package in place of rgdal)
# install.packages("spDataLarge", repos = "https://nowosad.r-universe.dev")
library("spDataLarge")