FOSS4G 2022 general tracks

Andreas Jobst

Project Manager at Camptocamp


Sessions

08-26
11:30
30min
Implementation of the Chinese Postman Problem in the Valhalla Routing Engine
Andreas Jobst, Ismail Sunni

The Routing Engine Valhalla has been extended with a solution of the Chinese Postman Problem (CPP). This means that the most efficient route to travel all roads and paths in the area can now be calculated within a defined polygon.
The CPP is a well-known problem from graph theory, where the goal is to visit every edge in a graph while minimizing the distance traveled. In theory, a graph can be either directed, undirected, or mixed.
In this implementation, the CPP has been implemented for directed graphs, as this corresponds to the representation of graphs in Valhalla and the data structure of OpenStreetMap (OSM). The latter forms the data basis for the calculation of the CPP route.
The CPP is solved using the following set of algorithms: the Floyd-Warshall algorithm, the Hungarian method, and the Hierholzer method. After successfully implementing the theoretical code base of the CPP, the main challenge was to make the route calculation executable using real-world road networks (OSM).
A key problem with the implementation of the theoretical CPP is that in real-world graphs, not every edge is always reachable by all other edges. Therefore, various extensions had to be made to allow the computation of a CPP route using OSM data. For example, within a larger area, rarely all road segments are accessible exclusively via the roads located in the area. It is often necessary to leave the area to access these otherwise inaccessible parts of the road network.
Eventually, we were able to create a working prototype of the CPP in Valhalla. In addition to the function of freely selecting the area to be traveled, restricted zones, so called no-go areas, can also be defined. After selecting the vehicle type (car, bicycle, pedestrian, etc.), the CPP route can be calculated, which also includes turn-by-turn navigation.

Use cases & applications
Modulo 0
08-26
10:10
5min
MapFish Print, the classic printing component, a project update
Andreas Jobst, Andreas Jobst

MapFish Print is a mature Java-based open source software (BSD-2 license) for printing maps. Opposed to frontend solutions such as inkmap (https://github.com/camptocamp/inkmap), MapFishPrint runs server side and is integrated in several open source GIS frameworks like GeoMapFish ( for creating geoportal applications) or geOrchestra (spatial data infrastructure).
The classic approach to deploy MapFish Print is using a WAR-file in a Servlet Container (for example Tomcat), while it can also be integrated into cloud environments with prebuilt Docker images. Alternatively, MapFish Print’s core printing library can also be integrated into other projects programmatically.
MapFish Print supports the common data formats and standards (WMS, WFS, WMTS, GeoJSON, etc.) and provides access to rich cartographic features like rotations, grids, north-arrow or legends and multi-page printing. The layout is defined by a JasperReports template and a YAML configuration file. The template allows users to define the layout, include elements for maps, legends, grids and alphanumeric tables. Clients request a concrete print-out with a JSON-Request, providing along information like bounding-box, map layers and other data. The final report will be rendered by MapFish Print either as PDF or as a raster image and returned to the client.
We will present a summary of existing features as well as new (e.g. tiled WMS with buffered tiles for rendering large areas without label conflicts) and planned features of the MapFish Print open source project.

State of software
Modulo 0