This lecture was based on materials from Dr. George Vellidis, Geocomputation with R e-book and Intro to spatial data programmin with R e-book
Geospatial data like vector and raster layers require a CRS to be correctly placed in space.
A CRS defines how the spatial elements of the data relate to the surface of the Earth (or other bodies)
CRSs are either geographic or projected
CRSs rely on a datum
Contains information on what ellipsoid to use and the precise relationship between the coordinates and location on the Earth’s surface
Two types of datum: geocentric and local
Normally uses a geocentric datum
Uses angular measurement units (e.g., degrees of longitude and latitude) to locate something in space
Longitude: location in the East-West direction
Latitude: location in the North-South direction
Popular example: WGS84
Normally uses a local datum
Convert the three-dimensional surface of the Earth into Easting and Northing (x and y)
Uses linear measurement units, as for ex., meters
Popular example: Universal Transverse Mercator (UTM)
Divides the Earth into 60 zones, each 6° of longitude in width.
Each zone uses a transverse Mercator projection that maps a region of large north-south extent with low distortion.
Each partition has a numerical code followed by the N-S hemisphere
- Can you spot the difference(s)? Which is which?
- What about now?
CRSs can be described in many ways, including:
Simple and ambiguous statements like “it’s in lon/lat coordinates”
Formalized yet now outdated ‘proj4 strings’ (also known as ‘proj-string’) such as +proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
With an identifying ‘authority:code’ text string such as EPSG:4326 (preferable)
With a WKT description (most thorough, though long)
When working with multiple geospatial layers, it is important to have them on the same CRS so layering operations can work properly.
Knowing which CRS your data is in, and whether it is in geographic (lon/lat) or projected (typically meters), is important and has consequences for how R handles spatial and geometry operations
R has become better to project on-the-fly geographic CRSs for distance-based operations like buffering, clipping, etc.
However, still not fool proof:
Need to have geospatial layers within a project containing the same CRS
If CRS is absent, need to set the original CRS of that object
If CRS is present but different, need to transform it to a common one
If conducting distance-based operations, preferable to have layers in a projected CRS
Geographic: WGS84 is EPSG:4326
Projected: UTM Zone 17N is EPSG:32617