GeoMapFish is a Web GIS application which enables the distribution of spatial data in layers grouped by theme. It also offers several generic features by default (search layers, data search, interrogation, card printing). Several interfaces offer more targeted features: main, mobile and routing. You can add professional or specific features to certain uses such as a link to another professional tool. GeoMapFish also offers two APIs (simple and extended) to integrate maps into a CMS, for instance.
Technically, the various services are based on the REST services, including data search, but also the OGC services for WMS, WMTS and WFS (-T) data flow.
QGIS is a desktop GIS application that offers many features for the management and processing of spatial data. Among its many features, QGIS can connect to various OGC services (WMS, WFS and WMTS-T) natively but can also interact with third-party REST services such as GeoMapFish.
Logically, it seemed interesting to us to connect both to disseminate the data centrally and thus provide a cohesive technological ecosystem. This article provides some tips to complete this ecosystem. We will use the GeoMapFish demo portal.
Access to WMS et WMTS services
GeoMapFish provides WMS services and WMTS (cache tiles). A proxy makes sure that the user has sufficient rights to retrieve the list of layers and display them. QGIS can connect very easily to these services and manage authentication.
In QGIS, open theWMS and WMTS service configuration window with the tool “Add a WMS layer” or via the menu “Layer” > “Add a layer” > “Add a WMS layer “ , or via the tool bar .
In your WMS service management window, click the “New” button and add the following new services:
Name: WMS Service of GeoMapFish
Here, the URL consists of the host (geomapfish-demo.camptocamp.net) and of the instance name (1.6), the two parts of the URL that will vary depending on the portal.
HTTPS can also be activated.
In the case of a service protect, you must complete the username and password in “Authentication”.
You can now close this window and click the “Login” button and then choose the layer (s) to display and then close the window. The selected layer(s) will appear.
For the WMS services, it is just as easy. Reopen the WMTS and WMS service configuration window, click “New” and enter the following information:
Name: WMTS Service of GeoMapFish
The method used for this WMS service is the standard REST method. It is distinguished by the presence of the string “WMTSCapabilities.xml”.
Tips: To improve the quality of WMTS in QGIS in a reprojection, we advise you to check the “Smoothed Transformation” that will improve the rendering of the map (including tags), though with a small loss of performance.
The “Login” button displays the tile sets available in the “Tile Game” tab. Choose the one that suits you.
From these two layers in the demo portal GeoMapFish:
Here is the result:
Access to WFS(-T) flow
There are two separate WFS services within GeoMapFish: one based on MapServer and this for several releases, and the other, more recent, based on TinyOWS. The latter enables the complete management of the WFS standard, including transactional mode.
For each service, and this is also the case for the WMS service, the user passes through a proxy to manage the access rights to layers. The proxy for editing data using the WFS service is the following: https://geomapfish-demo.camptocamp.net/1.6/wsgi/tinyows_proxy
The configuration within QGIS of WFS-T services is identical to the other services: Click the “Add WFS Layer“, configure the new WFS service (name, url and login / password), click “Ok” then on “Login” and select the layer.
Finally, you can enter in edit mode in QGIS as any layer.
Access to Search
In GeoMapFish, the search is based on a REST service and data stored in a specific format to perform searches very quickly with closer terms. Integrate portal layers is interesting but interact with it allows to keep a consistent GIS: centralized data, services disseminating to either a light client or to a heavy client.
Access to the portal of the search module has been integrated with the QuickFinder extension. It offers several search engines: local (project files), remote (OpenStreetMap and GeoMapFish).
The development of GeoMapFish is based on MapServer to set up data services. However, other servers have been used successfully. QGIS server is one of them; it procvides the same features as MapServer.
Our goal is to enable excellent integration of QGIS with GeoMapfish. The next steps will focus on the management of the configuration of GeoMapfish via QGIS.