Routes - WFS
Implementing GeoServer WFS
Legend
-
Very Easy
-
Easy
-
Medium
-
Hard
-
Very Hard
Datasets
The map demostrates implementation of a WFS (Web Feature Service) served by GeoServer. Two datasets are provided by the service. Route points and route tracks.
Both datasets were sourced from open API's on morotur.no, manipulated in QGIS, uploaded to PostGIS, and served by GeoServer. The dataset with route pints had to converted from JSON to GeoJSON using a custom Python script before it could be manipulated in QGIS.
Web Feature Service
When the user changes the route type by clicking on the buttons on top of the map, a CQL (Contextual Query Language) filter is applied to limit the results provided by the GeoServer WFS, then the map updates accordingly by clearing the current features, and adding the new ones.
If the route marker is clicked, a popup will appear showing more information about the route, including route name, route type, difficulty grade, and a link to the complete route description on morotur.no.
By hovering over a route marker, the route track will be displayed on the map. This is a track provided by the WFS service where a CQL filter is used to only fetch the route track for that route. This track will stay on the map until the user hovers over another route marker.
Notes
The same geodata presented using WMS from my private GeoServer can be found here.