OGC Web Services
OGC Web Services
Allan Mazimwe
MAKERERE UNIVERSITY
College of Engineering, Design, Art and Technology (CEDAT)
1
School of The Built Environment
P.O Box 7062, Kampala, Uganda
Web Services Interoperability
• transparent provision
2
Web Services
Interoperability – How to gain
• Based on open architectural definitions
• W3C, OGC
• Normalization gained through independence of ;
• Operating system
• Programming languages
• Development environments
3
Definition of Web Services
• Web Service = every piece of software, which utilizes itself over the
internet and is using XML as message transport system
• Standardized XML format facilitate interoperability in information
exchange
• Allow to control which information is presented in which format
(compare. Raw data vs. product)
• Web services can also be used to implement an architecture according to
service-oriented architecture (SOA) concepts,
where the basic unit of communication
is a message, rather than an operation. This is often
referred to as "message-oriented" services.
4
Web Services Architecture
5
OGC Specifications for Web-Services
• WMS (Web Map Service)
• WFS (Web Feature Service)
• GML (Geographic Markup Language)
• SLD (Styled Layer descriptor)
• Filter encoding
• WCS (Web Coverage Service)
• WPS (Web Processing services)
• CSW, SOS, SAS,
6
Web Map Services-WMS
MAKERERE UNIVERSITY
College of Engineering, Design, Art and Technology (CEDAT)
7
School of The Built Environment
P.O Box 7062, Kampala, Uganda
Web Map services--WMS
8
Web Map services (WMS)-Operations
9
GetCapabilities
• GetCapabilities -allows the server to advertise what it can do (available layers, supported output projections
and formats extent of Data) in XML format
• describes the service functionality, the metadata and the layer metadata with XML
ttp://maps.rcmrd.org:8080/geoserver/malawi_vulnerabilitytool/wms?Service=W
MS&Request=GetCapabilities
10
GetMap
• GetMap- renders an image of geographic data based on
• Area of interest, data, etc.
• Result is an image, no features or attributes
using parameters with values
• version: 1.3.0 (version of WMS specification)
• service-type: WMS
• request-type: GetMap
• format: image/png (derived out of Capabilities Information)
http://maps.rcmrd.org:8080/geoserver/malawi_vulnerabilitytool/wms?service=W
MS&version=1.1.0&request=GetMap&layers=malawi_vulnerabilitytool%3Amalawi
_national_exposure&bbox=32.67668701171875%2C-
17.124999999999996%2C35.92668701171875%2C-
9.364999999999997&width=330&height=768&srs=EPSG%3A4326&format=applic
ation/openlayers
11
• Parameters continued
• bbox (spatial area of interest, e.g. minx,miny,maxx,maxy)
• srs (reference system / projection of bounding box coordinates)
• EPSG (http://www.epsg.org/)
• Get supported SRSs from GetCapabilities
• Most widely used SRSs are EPSG:4326, EPSG:900113
• Lat/long geographic (WGS84)
• width (output image width)
• height (output image height)
• layers (geographic information layers)
• extracted out of GetCapabilities info
• comma-separated list –
• e.g. Layers=elevation, roads, railways,…
• – first element is most bottom output layer
12
GetMap parameters
13
GetFeature info
14
GetFeatureInfo
15
Describe layer
16
Classroom activity
• https://maps.rcmrd.org/ArcGIS/rest/services
• https://maps.rcmrd.org/geoserver/web/
• http://apps.rcmrd.org:8081/geoserver/web/
• http://maps.rcmrd.org:8080/geoserver/malawi_vulnerabilitytool/wms?
• Catalogue
• https://data.apps.fao.org/map/catalog/srv/eng/catalog.search#/home
• http://metacatalog.rcmrd.org:8081/geonetwork/srv/eng/catalog.search#/search
17
Web Feature Services (WFS)
MAKERERE UNIVERSITY
College of Engineering, Design, Art and Technology (CEDAT)
18
School of The Built Environment
P.O Box 7062, Kampala, Uganda
Web Feature services (WFS)
• Web Feature Service Interface Standard (WFS) provides an interface
allowing requests for geographical features across the web using platform-
independent calls.
• One can think of geographical features as the "source code“ behind a map,
which end-users can
• query
• edit or
• spatially analyze.
• XML-based GML is used by default for transporting the geographic
features. As base profile the OpenGIS GML Simple Features Profile is used
to increase interoperability between WFS servers and to improve the ease
of implementation of the WFS standard.
19
Web Feature services (WFS)
20
OGC Web Feature Service - WFS
Service for
• Feature level access to spatial data (vectors)
• Rich query interface
• Returns GML
• Transactional capability
• Security considerations for OGC:WFST-T
• Typical call sequence in WFS client requests
(WFTS-T) enable
• Inserting
• Updating
• Deleting
• Locking GML features
21
OGC Web Feature Service - WFS Example
22
OGC Web Feature Service - WFS 1.1
Two classes of WFS
• Basic WFS
• A basic WFS would implement the GetCapabilities, DescribeFeatureType and
GetFeature operations. This would be considered a READ-ONLY web feature service.
• Transaction WFS
• A transaction web feature service would support all the operations of a basic web
feature service and in addition it would implement the Transaction operation.
Optionally, a transaction WFS could implement the LockFeature operation.
23
OGC Web Feature Service - WFS 1.1
Basic WFS
• GetCapabilities
• A web feature service must be able to describe its capabilities. Specifically, it must
indicate which feature types it can service and what operations are supported on
each feature type.
• DescribeFeatureType
• A web feature service must be able, upon request, to describe the structure of any
feature type it can service.
• GetFeature
• A web feature service must be able to service a request to retrieve feature
instances..
24
OGC Web Feature Service - WFS 1.1
Transaction WFS
• Transaction
• A web feature service may be able to service transaction requests. A transaction
request is composed of operations that modify features;that is create, update, and
delete operations on geographic features.
• LockFeature/GetFeatureWithLock
• A web feature service may be able to process a lock request on one or more
instances of a feature type for the duration of a transaction.
25
GetCapabilities
• http://maps.rcmrd.org:8080/geoserver/malawi_vulnerabilitytool/wms?Service=WF
S&Request=GetCapabilities
26
OGC:WFS 1.1 DescribeFeatureType
A web feature service must be able, upon request, to describe the
structure of any feature type it can service
27
DescribeFeatureType
http://maps.rcmrd.org:8080/geoserver/malawi_vulnerabilitytool/wms?service=WFS&version=1.1.0&request=Desc
ribefeaturetype
28
GetFeature
• The GetFeature operation allows retrieval of features from a web feature
service.
• The request contains queries which may unconstrained or constrained by a Filter
• Filter is described in described in the Filter Encoding Specification
• The output format is GML by default but the specification allows other formats
• Parameters
• VERSION
• SERVICE
• REQUEST
• TYPENAME
• FILTER (optional)
• BBOX (can also be done through FILTER)
29
GetFeature
30
Web Coverage Services
MAKERERE UNIVERSITY
College of Engineering, Design, Art and Technology (CEDAT)
31
School of The Built Environment
P.O Box 7062, Kampala, Uganda
Web Coverage Services
32
OGC Web Coverage Service - WCS
GetCapabilities
• The Open Geospatial Consortium, Inc. (OGC) Web Coverage Service (WCS)
provides an open specification for sharing raster datasets on the Web. The
raster datasets made available through WCS services are coverages
• Defines the standardized access on raster data
• Parameter
• VERSION
• SERVICE
• REQUEST
http://maps.rcmrd.org:8080/geoserver/malawi_vulnerabilitytool/wms?Service=WCS
&Request=GetCapabilities
33
GetCapabilities
34
GetCoverage
35
GetCoverage-KVP
36
OGC Web Coverage Service –
WCS GetCoverage Example
37
Supported Formats and interpolation methods
• Supported formats
• GeoTiff
• HDF-EOS
• NITF
Interpolation method Descriptions
• CF-NetCDF
Nearest neighbor (default) These are defined in the ISO 19123
Bilinear (Schema for coverage Geometry and
Functions) Annex B
Bicubic
Lost area
Barycentric
none No interpolation is available-requests
must be for locations that are among the
original domain locations
38
Software implementations
Commercial products
• ArcGIS Server (www.esri.com)
• Intergraph Geomedia Web-Map Professional 6.1 (www.intergraph.com)
• Erdas Appollo Suite (www.erdas.com)
…
Open-Source Solutions
• UMN Mapserver 6.0.x+ (http://mapserver.org/)
• GeoServer 2.1.x+ (http://geoserver.org)
• deegree WMS (http://www.deegree.org/)
• THREDDS Data Server (http://www.unidata.ucar.edu/software/tds/)
39
Web Processing Services-WPS
MAKERERE UNIVERSITY
College of Engineering, Design, Art and Technology (CEDAT)
40
School of The Built Environment
P.O Box 7062, Kampala, Uganda
OGC Web processing Service - WPS
• "The WPS standard defines an interface that facilitates the publishing of geospatial
processes and makes it easier to write software clients that can discover and bind to
those processes.
• Processes include any algorithm, calculation or model that operates on spatially
referenced raster or vector data.
• Publishing means making available machine-readable binding information as well as
human-readable metadata that allows service discovery and use.
• A WPS can be used to define calculations as simple as subtracting one set of spatially
referenced data from another (e.g., determining the difference in influenza cases
between two different seasons), or as complicated as a hydrological model. The data
required by the WPS can be delivered across a network or it can be made available at
the server. This interface specification provides mechanisms to identify the spatially
referenced data required by the calculation, initiate the calculation, and manage the
output from the calculation so that the client can access it.
41
• WPS is a Web Service Interface Specification that standardize a number of
requests/response messages that GIS Client applications can use to
• discover and
• execute processes that are offered by WPS Services.
42
• HTTP based (GET or POST), SOAP
• OGC WPS defines three operations
• GetCapabilities ... service-level metadata
• DescribeProcess describes the process
• Execute responds the result of a process
43
OGC Web Map Service - WPS
44
OGC Web processing Service - WPS
• the OGC Web Processing Service (WPS) Interface Standard provides rules
for standardizing how inputs and outputs (requests and responses) for
invoking geospatial processing services, such as polygon overlay, as a Web
service.
45
Software
• Commercial products
• ArcGIS Server (www.esri.com) beginning 10.1
• Erdas Appollo Suite (www.erdas.com)
• ...
• Open-Source Solutions
• 52°N WPS+ (http://52north.org/communities/geoprocessing/)
• pyQGIS-WPS (https://github.com/3liz/lizmap-wps-web-client-module)
• deegree WPS (http://www.deegree.org/)
• Zoo project WPS http://www.zoo-project.org/)
46