2.1. Introduction to Geospatial Web Services

A possible way for enriching a GIS project is by using Geospatial Web Services and data that are stored on servers connected by means of the internet.

The general concept can be summarised as a distributed GIS and is represented in Fig. 2.1.1. We have geospatial data of every type (maps; aerial, drone, satellite imagery; geolocalized temporal series) stored on distributed servers, we have users who can be equipped with different tools (desktops, laptops, tablets, smartphones, etc). In order to find data we need geospatial catalogues and, if we want also to process data, we may need processing tools, which again stay on distributed servers. The glue of this distributed GIS, which is also called the Geospatial Web, is the internet.

../_images/2.1.1.png

Fig. 2.1.1 – The Geospatial Web

Such a kind of system is based on the concept of Web Service, which is a software system designed to support interoperable machine to machine interaction over a network. As we are dealing with geospatial data, we are interested specifically in Geospatial Web Services, which allow geospatial data and functions to be interoperable.

Interoperability is the capability to communicate, execute programs or transfer data among various systems with different hardware and software platforms, data structures and interfaces in a manner that requires the user to have little or no knowledge of the characteristics of those units and allow the usage of the exchanged information and data without special effort by either system, or without any special manipulation.

In order to obtain interoperability, standards are needed. A distinction can be made between “de facto standards”, which are technical instructions used by a noteworthy number of people and/or organizations and “de jure standards”, which are technical instructions set by national and/or international standardization organizations. In the case of the Geospatial Information, we refer to ISO TC 211 Standards and OGC (Open Geospatial Consortium) Standards.

OGC Web Services expose geographical functionalities to web users through standard web protocols. The use of the XML (eXtensible Markup Language) allows the encoding of data, rules and functions in a format that is both human-readable and machine-readable.

The functioning of OWS (OGC Web Services) can be summarised in four steps:

  • the client contacts the server and queries it about its functionalities;
  • the server sends back to the client an XML document containing the functionalities of the supported service;
  • the client asks the server for data;
  • the server provides the data as requested.

The most important geospatial web services about data are:

WMS/WMTS: Web Map Service/Web Map Tile Service, which serve map images in a bitmap format (e.g. PNG, GIF, JPEG, etc.) and sometimes also in vector graphics (points, lines, curves and text, which can be expressed in formats like SVG). The WMTS is an extension of the WMS which alleviates the CPU intensive on-the-fly rendering problem when transferring massive amounts of data by using pre-rendered map tiles.

The WMS service is composed by three basic operations (beside some others optional):

  • GetCapabilities: provides an XML description of the available data and the parameters related to the requests accepted by the service;
  • GetMap: supplies the requested data;
  • GetFeatureInfo: retrieves the underlying data, including geometry and attribute values, for a pixel location on a map (optional).

The first two operations are shown in Fig. 2.1.2.

../_images/2.1.2.png

Fig. 2.1.2 – GetCapabilities and GetMap operations

As an example of GetCapabilities, https://www.efas.eu/api/wms/?request=getcapabilities , where https://www.efas.eu/api/wms/ are the EFAS (European Flood Awareness System) WMS Services, returns an XML file which describes the characteristics of the WMS Services (Fig. 2.1.3).

../_images/2.1.3.png

Fig. 2.1.3 – The XML file returning after the GetCapabilities request: first rows

Browsing the file, we find the description of the “Landslide Susceptibility” layer (Fig. 2.1.4) which we will see more in detail in the next session.

../_images/2.1.4.png

Fig. 2.1.4 – The XML file returning after the GetCapabilities request: Landslide Susceptibility layer

More information about the WMS can be found in the WMS Reference of Geoserver.

WFS: Web Feature Service, which offers direct access to vector geographic information at the feature and feature property level, where a feature represents a physical entity, e.g. a building, a street, etc. Data is generally transferred in an XML-based GML format, but other formats like shapefiles can also serve for transport.

The WFS service is composed by the basic operations (beside some others optional):

  • GetCapabilities: provides an XML description of the available data and the parameters related to the requests accepted by the service;
  • DescribeFeatureType: requests a list of features and attributes for the given feature type, or list the feature types available;
  • GetFeature: request a selection of features from the data source.

More information about the WFS can be found in the WFS Reference of Geoserver.

WCS - Web Coverage Service, which supports requests for coverage data (gridded and raster data). While a WMS returns only an image, the results of a WCS can be used for modeling and analysis. WCS also allows more complex querying, for instance only the extraction of a portion of the data.

The WCS service is composed by the basic operations (beside some others optional):

  • GetCapabilities: provides an XML description of the available data and the parameters related to the requests accepted by the service;
  • DescribeCoverage: requests information about the coverage. It returns information such as the coordinate reference system, the metadata, the domain, the range and the available formats;
  • GetCoverage: requests the extraction of a subset (based on height, time and range) from the coverage, encodes it in different data formats, and returns the resulting file in different ways.

More information about the WCS can be found in the WCS Reference of Geoserver.