Marie-HĂ©lĂ¨ne Burle

April 26, 2021

Discrete objects

Contain: â€‚- geometry:â€‚ shape & location of the objects

â€ƒâ€ƒâ€ƒâ€ƒ- attributes:â€‚ additional variables (e.g.Â name, year, type)

Common file format:â€‚ GeoJSON, shapefile

Examples: countries, roads, rivers, towns

Continuous phenomena or spatial fields

Common file formats:â€‚ TIFF, GeoTIFF, NetCDF, Esri grid

Examples: temperature, air quality, elevation, water depth

**point**:â€ƒâ€ƒâ€ƒâ€ƒâ€‚Â single set of coordinates**multi-point**:â€ƒâ€ƒ multiple sets of coordinates**polyline**:â€ƒâ€ƒâ€ƒâ€‚Â multiple sets for which the order matters**multi-polyline**:â€ƒ multiple of the above**polygon**:â€ƒâ€ƒâ€ƒâ€‚Â same as polyline but first & last sets are the same**multi-polygon**:â€ƒ multiple of the above

**Grid** of equally sized rectangular cells containing values for some variables

Size of cells = resolution

For computing efficiency, rasters do not have coordinates of each cell, but the bounding box & the number of rows & columns

A location on Earthâ€™s surface can be identified by its **coordinates** & some **reference system** called CRS

The coordinates (`x`

, `y`

) are called longitude & latitude

There can be a 3^{rd} coordinate (`z`

) for elevation or other measurementâ€”usually a vertical one

And a 4^{th} (`m`

) for some other data attributeâ€”usually a horizontal measurement

In 3D, longitude & latitude are expressed in angular units (e.g.Â degrees) & the reference system needed is an angular CRS or geographic coordinate system (GCS)

In 2D, they are expressed in linear units (e.g.Â meters) & the reference system needed is a planar CRS or projected coordinate system (PCS)

Since the Earth is not a perfect sphere, we use spheroidal models to represent its surface. Those are called **geodetic datums**

Some datums are global, others local (more accurate in a particular area of the globe, but only useful there)

*Examples of commonly used global datums:*

- WGS84 (World Geodesic System 1984)
- NAD83 (North American Datum of 1983)

An angular CRS contains a datum, an angular unit & references such as a prime meridian (e.g.Â the Royal Observatory, Greenwich, England)

In an angular CRS or GCS:

Longitude (\(\lambda\)) represents the angle between the prime meridian & the meridian that passes through that location

Latitude (\(\phi\)) represents the angle between the line that passes through the center of the Earth & that location & its projection on the equatorial plane

Longitude & latitude are thus angular coordinates

To create a two-dimensional map, you need to project this 3D angular CRS into a 2D one

Various projections offer different characteristics. For instance:

- some respect areas (equal-area)
- some respect the shape of geographic features (conformal)
- some
*almost*respect both for small areas

It is important to choose one with sensible properties for your goals

Examples of projections:

- Mercator
- UTM
- Robinson

A planar CRS is defined by a datum, a projection & a set of parameters such as a linear unit & the origins

Common planar CRS have been assigned a unique ID called EPSG code which is much more convenient to use

In a planar CRS, coordinates will not be in degrees anymore but in meters (or other length unit)

You can change the projection of your data

Vector data wonâ€™t suffer any loss of precision, but raster data will

â†’Â best to try to avoid reprojecting rasters: if you want to combine various datasets which have different projections, reproject vector data instead

Free GIS Data: list of free GIS datasets

Geocomputation with R by Robin Lovelace, Jakub Nowosad & Jannes Muenchow

Spatial Data Science by Edzer Pebesma & Roger Bivand

Spatial Data Science with R by Robert J. Hijmans

Using Spatial Data with R by Claudia A. Engel

An Introduction to Spatial Data Analysis and Visualisation in R by the CDRC

r-spatial by Edzer Pebesma, Marius Appel & Daniel NĂ¼st

R Special Interest Group on using Geographical data and Mapping