Skip to content

2. Geospatial data and web services

Coordinate reference systems, map projections

  • spatial reference system (SRS) or coordinate reference system (CRS)
  • measure locations (on the Earth) as coordinates
  • defined by:
    • ellipsoid (WGS-84 for global use, Bessel, ...)
    • horizontal (geodetic) datum to measure location in coordinates (WGS-84 for global use)
    • map projection (except of geographic coordinate system)
      • distortion - surface cannot be represented on a plane without any distorsion Mercator (conformal) projection Mercator projection (source: Wikipedia.org)
      • azimuthal, conformal, equivalent, equidistant
    • origin point
    • units
  • types:

    • geographic (latitude, longitude)
    • geocentric (x, y, z)
    • projected (x, y)
  • EPSG Geodetic Parameter Dataset https://epsg.io

    • WGS-84: 4326 (global, geographic coordinates)
    • UTM zones, eg: 32N: 32632 (global)
    • ETRS-89: 3035 (European)
    • Pseudo-Mercator: 3857 (global, web) - don't use for computation
    • S-JTSK: 5514 (national, CZ+SK)
    • ...

Question

Which CRS is used on the national level in your country?

Raster data

  • continuous representation of phenomena (space defined as an array)
    • missing information represented by no-data value
  • dataset (number of bands, CRS)
    • bands (width, height, x-res, y-res, data type, no-data value, geotrans)
      • cell
        • smallest unit of information, usually square (rectangle, hexagon)
        • cell size is defined by spatial resolution (x-res, y-res)

Discrete raster data example: Land Cover (1-water, 2-forest, 3-agricultural) Raster data

Other examples:

  • EU-DEM (one band, float32, ETRS)
  • Sentinel2 (15 bands, byte/uint16, UTM)
  • Orthophoto (3 bands - RGB, byte)

Formats

Plenty of formats, see GDAL library for (still incomplete) overview.

  • file-based:
    • GeoTIFF, COG
    • JPEG2000
    • ASCII
    • ...
  • DB-based:
    • PostGIS Raster
    • Oracle GeoRaster
    • TileDB
    • ...
  • web services:
    • OGC OWS (Web Map Service, Web Coverage Service)
    • OGC API (Maps, Coverages)
    • Esri services (Map, Image)
    • ...

Vector data

  • discrete representation of phenomena
  • simple features (OGC specification)
    • point, linestring, polygon, ... Simple features
    • multi-features
  • topological data structures
    • complex compared to simple features
    • primitives: node, edge, face
    • spatial relationships included Topological data

Formats

Plenty of formats, see GDAL library for (still incomplete) overview.

  • file-based:
    • Esri Shapefile
    • GeoJSON
    • CSV
    • ...
  • DB-based:
    • OGC GeoPackage
    • Esri FileGDB
    • PostGIS
    • ...
  • web services:
    • OGC OWS (Web Feature Service)
    • OGC API Features
    • Esri Feature service
    • ...

Sample computation - Get LUCAS points in possibly freezing waters in southern Italy and validate them with CLC

Note

Different data sources:

  • file-based GeoTIFF
  • DB-based OGC GeoPackage
  • web service OGC WFS
  1. Download DEM for southern Italy (GeoTIFF)
  2. Download CORINE Land Cover for Europe (GeoPackage)
  3. Get areas above 1000 MASL
    1. Get DEM areas above 1000 MASL
      • Raster > Raster Calculator... DEM above 1000 MSL
    2. Polygonize these areas
      • Raster > Conversion > Polygonize (Raster to Vector)... Polygonize DEM
    3. Select DEM polygons with value 1
      • Select Features using an Expression DEM above 1000 MSL
      • Possible exercise extension: Only on northern slopes
  4. Get LUCAS points (OGC WFS)
    1. Install "ST_LUCAS Download Manager" plugin
      • Plugins > Manage and Install Plugins... > LUCAS (Search)
    2. Download LUCAS points Download points
    3. Clip LUCAS points by areas above 1000 MASL
      • Vector > Geoprocessing Tools > Clip...
    4. Select LUCAS points with class corresponding to water
    5. Export the point selection
      • Right click on the layer > Export > Save selected features as...
  5. Never trust only one source - validate data usin CLC water bodies
    1. Clip CLC by selected DEM polygons
      • Vector > Geoprocessing Tools > Clip... Clip CLC by DEM
    2. Select only classes corresponding to water
    3. Export the CLC selection
      • Right click on the layer > Export > Save selected features as... Export water selection
  6. Never trust only one source - validate LUCAS points using CLC water bodies
    1. Let's be generous - Make 100m buffer around clipped waters from CLC
      • Vector > Geoprocessing Tools > Buffer... Buffer CLC
    2. Get LUCAS points intersecting with the buffered CLC waters
      • Select by Location Intersect CLC and LUCAS