Lecture 17: Spatial Data

Brian J. Smith

2026-04-09

Geographic Information Systems (GIS)

Geographic Information Systems (GIS)


  • GIS is a broad term for the data and tools we use to work in geographic space.

Geographic Information Systems (GIS)

GIS is a technology that is used to create, manage, analyze, and map all types of data.

Geographic Information Systems (GIS)

A geographic information system (GIS) consists of integrated computer hardware and software that store, manage, analyze, edit, output, and visualize geographic data.

Geographic Information Systems (GIS)

Today, we just want to scratch the surface on a few core ideas that will help us process and visualize spatial data.

Concepts in GIS


Coordinate Reference Systems

  • Geographic vs. projected
  • Datum
  • Referring to a CRS
    • EPSG Codes

Spatial Data Types

  • Vector
  • Raster
These terms are not merely analogous to the image formats we talked about early in the semester – they are identical.

Coordinate Reference System (CRS)

“A … coordinate reference system (CRS) is a framework used to precisely measure locations on, or relative to, the surface of Earth as coordinates. It is thus the application of the abstract mathematics of coordinate systems and analytic geometry to geographic space.”

Wikipedia

Coordinate Reference System (CRS)


  • Geographic Coordinate Systems
    • Treat the Earth as a spheroid (not flat).
      • Depends on the datum.
    • Expresses locations in units of degrees.
    • Latitude = N/S (y-coordinate).
    • Longitude = E/W (x-coordinate).
Diagram of latitude vs. longitude. Wikipedia.

Coordinate Reference System (CRS)

  • Projected Coordinate Systems
    • Project the round Earth onto a flat plane.
    • Planar coordinates obey properties of flat geometry
      • E.g.,
        • Parallel lines never meet
        • Angles of a triangle sum to 180°
        • \(a^2 + b^2 = c^2\) holds (Pythagorean theorem)
    • Units are linear
      • Usually meters, sometimes feet


Diagram of Mercator projection. Wikipedia.

Coordinate Reference System (CRS)

  • Projected Coordinate Systems
    • Projections can be thought of as shining a light through the globe and tracing the resulting map on a flat surface.
      • Mostly a metaphor, although some simple projections literally work this way.

Coordinate Reference System (CRS)

  • Projected Coordinate Systems
    • Projections all come with tradeoffs, since the surface of the Earth is not truly flat.
      • Something must get distorted.
      • Often illustrated with the orange peel metaphor.

Coordinate Reference System (CRS)

  • Projected Coordinate Systems
    • No projection can preserve all the properties of a map.
      • Area
      • Shape
      • Direction
      • Bearing
      • Distance


Peeled Orange.

Coordinate Reference System (CRS)

Albers Equal Area Conic
Transverse Mercator

Coordinate Reference System (CRS)

  • Universal Transverse Mercator (UTM) projections.
    • Use the transverse Mercator projection, which has minimal distortion along the central meridian.
    • Minimizes distortion by using 60 different central meridians, defining 60 different “zones”.
    • Units are meters.


Transverse Mercator

US UTM Zones.

Coordinate Reference System (CRS)

  • Datums*
    • A datum is a model connecting coordinates to their location on Earth.
      • Horizontal datums measure position on the Earth’s surface.
      • Vertical datums measure height above an origin, such as mean sea level.
      • 3D datums combine both.
    • A datum sets the reference frame from which all measurements are made.

* data is the plural of datum; however, in this context, we’ve come to refer to more than one datum as datums.

Coordinate Reference System (CRS)

  • Datums*
    • The most common datum today is WGS84, which defines both the reference frame and an ellipsoid of the Earth.
      • WGS84 is the standard that GPS relies on.
    • Other older datums are often region specific, e.g.:
      • NAD83
      • NAD27

Coordinate Reference System (CRS)

  • A CRS is defined by many potential parameters. E.g., UTM Zone 12N on the WGS84 datum:
PROJCRS["WGS 84 / UTM zone 12N",
    BASEGEOGCRS["WGS 84",
        ENSEMBLE["World Geodetic System 1984 ensemble",
            MEMBER["World Geodetic System 1984 (Transit)"],
            MEMBER["World Geodetic System 1984 (G730)"],
            MEMBER["World Geodetic System 1984 (G873)"],
            MEMBER["World Geodetic System 1984 (G1150)"],
            MEMBER["World Geodetic System 1984 (G1674)"],
            MEMBER["World Geodetic System 1984 (G1762)"],
            MEMBER["World Geodetic System 1984 (G2139)"],
            MEMBER["World Geodetic System 1984 (G2296)"],
            ELLIPSOID["WGS 84",6378137,298.257223563,
                LENGTHUNIT["metre",1]],
            ENSEMBLEACCURACY[2.0]],
        PRIMEM["Greenwich",0,
            ANGLEUNIT["degree",0.0174532925199433]],
        ID["EPSG",4326]],
    CONVERSION["UTM zone 12N",
        METHOD["Transverse Mercator",
            ID["EPSG",9807]],
        PARAMETER["Latitude of natural origin",0,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8801]],
        PARAMETER["Longitude of natural origin",-111,
            ANGLEUNIT["degree",0.0174532925199433],
            ID["EPSG",8802]],
        PARAMETER["Scale factor at natural origin",0.9996,
            SCALEUNIT["unity",1],
            ID["EPSG",8805]],
        PARAMETER["False easting",500000,
            LENGTHUNIT["metre",1],
            ID["EPSG",8806]],
        PARAMETER["False northing",0,
            LENGTHUNIT["metre",1],
            ID["EPSG",8807]]],
    CS[Cartesian,2],
        AXIS["(E)",east,
            ORDER[1],
            LENGTHUNIT["metre",1]],
        AXIS["(N)",north,
            ORDER[2],
            LENGTHUNIT["metre",1]],
    USAGE[
        SCOPE["Navigation and medium accuracy spatial referencing."],
        AREA["Between 114°W and 108°W, northern hemisphere between equator and 84°N, onshore and offshore. Canada - Alberta; Northwest Territories (NWT); Nunavut; Saskatchewan. Mexico. United States (USA)."],
        BBOX[0,-114,84,-108]],
    ID["EPSG",32612]]

(this format for information about a CRS is called “well-known text” (WKT).)

Coordinate Reference System (CRS)

  • All of that can be shortened to a single code. E.g., UTM Zone 12N on the WGS84 datum:
EPSG:32612
  • EPSG codes were developed by the “European Petroleum Specialist Group” to make sharing CRS information easier.
  • The EPSG registry was made public in 1993 and has been used widely since.
  • The EPSG is no longer a standalone organization, but the name has remained to avoid confusion.

Coordinate Reference System (CRS)

  • Some useful EPSG codes:
Description Code
Lat/long, WGS84 4326
UTM Zone 10, WGS84 32610
UTM Zone 11, WGS84 32611
UTM Zone 10, NAD83 26910
UTM Zone 11, NAD83 26911
US UTM Zones.

Data Types

Data Types

  • Vector
    • Point, line, or polygon.
    • (Other less common classes exist).
    • Store coordinates of vertices and their attributes.

Data Types

  • Raster
    • Gridded data.
      • Most often square; sometimes rectangular or hexagonal.
    • Often represent continuous values in discrete space.
    • Store coordinates of origin, cell dimensions, and values.

Raster. From QGIS.

GIS in R

GIS in R

  • sf
    • “Simple features”.
    • Primary R package for working with vector spatial data.
    • Replaced sp (same core developers).
sf Hex Sticker
  • terra
    • Primary R package for working with raster spatial data.
    • Replaced raster (same core developers).
terra Hex Sticker

More GIS Resources

Questions?



BCB5200 Home