Practical experiences with OGC services By Michal Sredl, Karel Charvat, Jachym Cepicky, Czech centre for Science and Society INSPIRE Conference, Istanbul, June
CCSS role To build URM enviroGRIDS portal To support partners with deployment of services
CCSS role
System overview Web Client HSLayers (JavaScript) - OpenLayers - Ext Server proxy Proxy4ows (Python) - Mapserver / MapScript - Gdal / Ogr - OwsLib OWS Servers MapServer GeoServer InterGraph ArcGis WMS++ WMS WMS-T WFS, FES WCS... Technology behind the CCSS Geoportal
Mission Challanges & Results Display huge WFS data in web client Proxy4ows Filter Encoding (FES) OpenLayers, OwsLib, MapServer patches WFS Axis order issue MapServer, OwsLib patches some issues still remain
Proxy4ows Transforms WFS and WCS to WMS For WMS, it transforms the coordinate systems Is presented in a standalone presentation – Tuesday 14:20
Filter Encoding OpenLayers – not parsed Part of a WFS GetCapabilities response
Filter Encoding OpenLayers – not parsed Desired result Patch proposed - Comparison filters & related stuff - WFS and 1.1.0
"wfs_filter" ' STUPEN 3 ' MapServer – Filter produced as invalid XML Filter Encoding FILTER= STUPEN 3 Mapfile Mapserver code Outgoing filter
"wfs_filter" ' STUPEN 3 ' MapServer – Filter produced as invalid XML Filter Encoding FILTER= STUPEN 3 Mapfile One-char patch Outgoing filter
WFS Axis Order WFS Axis order clearly defined in standard (East, North) causes confusion sometimes WFS As widely accepted, axis order should follow the definition of the particular CRS However, not a strict requirement in the standard Implementations of standards differ, heaps of confusion Axis order depends not only on the CRS, but also on the notation used
WFS Axis Order Axis order depends on the SRS used Check for definitions BBOX url parameter Sometimes you need to negotiate with the service providers to follow the definition, as otherwise no data may be returned Data themselves MapServer did not understand, that the axis order depends on the SRS used, data was rotated by 90° MapServer patch provided WFS 1.1.0
WFS Axis Order Axis order depends on the notation of the SRS as well: EPSG:EPSG_code WFS style – fixed East, North urn:EPSG:geographicCRC:epsg_code Follow-up the definition We don't know WFS 1.1.0
WFS Axis Order More details here: MapServer as WFS Client
Patches available OpenLayers – not parsed (Patch proposed) MapServer – Filter produced as invalid XML (Expected in 6.2) MapServer – WFS Axis order (Expected in 6.2) OwsLib patches already deployed
FES - Filter Encoding Specification Filtering WFS Layers in enviroGRIDS Geoportal Filter Encoding Standard enables you to create XML filter expressions and is incorporated in the WFS standard. In Geoportal the FES is used with the help of Proxy4ows to filter the WFS layers.
How to use it - Add a WFS Layer - In the layer switcher, right-click on the layer name and select Filter
How to use it
- Filter window appears with comparison filter - Select the property name, comparison operator and type in the desired value - Apply the filter
How to use it
How does it work
WFS layers are displayed as WMS in the HSLayers Web Client (see Proxy4ows for details). 1. WFS GetCapabilities request is sent directly to the WFS server. Capabilities document is parsed and filter capabilities are saved. 2. WFS DescribeFeatureTypes request is sent directly to the WFS server. Reply is parsed and properties of the feature type are saved. 3. User creates the filter in the GUI, saved information from steps 1-2. is used.
How does it work 4. User-created filter is written to FES and new WMS request is sent to Proxy4ows, accompanied with the filter in an additional parameter. 5. Proxy4ows takes the filter, creates new WFS request involving the filter, and sends it to the WFS server. Server replies with filtered layer. 6. Proxy4ows transforms the returned WFS layer to WMS and sends it to the client.
Next Steps In terms of standards, FES and FES is supported. In the future, FES can be added. In terms of filter types, only the Comparison filter is currently supported. In the future, more filters types can be added. That means the logical filter enabling to combine various expressions, spatial filter, expression editor, filtering based on feature ids, support for server- side functions.