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)
- 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)
- cell
- bands (width, height, x-res, y-res, data type, no-data value, geotrans)
Discrete raster data example: Land Cover (1-water, 2-forest, 3-agricultural)
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)
- topological data structures
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
- Download DEM for southern Italy (GeoTIFF)
- Download CORINE Land Cover for Europe (GeoPackage)
- Get areas above 1000 MASL
- Get LUCAS points (OGC WFS)
- Install "ST_LUCAS Download Manager" plugin
Plugins > Manage and Install Plugins... > LUCAS (Search)
- Download LUCAS points
- Clip LUCAS points by areas above 1000 MASL
Vector > Geoprocessing Tools > Clip...
- Select LUCAS points with class corresponding to water
Select Features using an Expression
- Query copied from downloaded data color definition:
"lc1" LIKE 'G%'
(https://geoforall.fsv.cvut.cz/st_lucas/tables/coding/lc1.html)
- Export the point selection
Right click on the layer > Export > Save selected features as...
- Install "ST_LUCAS Download Manager" plugin
- Never trust only one source - validate data usin CLC water bodies
- Clip CLC by selected DEM polygons
- Select only classes corresponding to water
Select Features using an Expression
"Code_18" > 500
(https://land.copernicus.eu/content/corine-land-cover-nomenclature-guidelines/html/
- Export the CLC selection
- Never trust only one source - validate LUCAS points using CLC water bodies