Dominik Frey
MSc in Computer Science from the University of Bern, Switzerland
6 years of experience as Software Engineer
Since May 2024 I have been working as Software Engineer in the Geospatial Department of Camptocamp SA, Switzerland
Sessions
GeoServer is a well-established and highly popular all-round map server, but reaches some limitations in scalability to meet high loads and high availability requirements. For this purpose, GeoServer Cloud was implemented as a separate open source project built "on top" of GeoServer.
GeoServer Cloud transforms GeoServer into scalable individual components (microservices) for container orchestration environments like Kubernetes.
This talk will give an introduction of GeoServer Cloud and showcase some of the successful usages in production environments.
Summary
In the context of a project for Swisstopo, the Federal Office of Topography of Switzerland, we analyzed the current technological landscape for generating PDF files for print from vector tile-based maps in online map services. One of our main goals was to identify potential technology stacks supporting full backend rendering, full frontend rendering, or hybrid approaches. While testing various options, we developed a universal print backend based on Headless Chrome, Puppeteer and Node, which corresponds to a full backend rendering approach and ultimately became our main focus. We will present our findings about the various options we have identified and elaborate in more detail on the developed print backend by presenting technical details as well as test results regarding performance, stability and quality.
Description
The demand for generating PDF files (e.g., for print) from online map services remains strong. Given the opportunities offered by vector tile-based maps and their resulting widespread adoption, particularly Mapbox Vector Tiles, providing this functionality in the context of web applications presents technical challenges that reveal shortcomings of existing solutions (e.g., mapfish print) and call for new approaches.\
By analyzing and testing well-established technologies, we identified several issues leading to unsatisfactory map renderings and PDF outputs. Some flaws are subtle, such as text cut-offs at tile seams, while others result in entirely unusable outputs, such as difficulties handling transparent layers.
To address these shortcomings, we developed an alternative approach by delegating both map rendering and PDF generation to a Headless Chrome instance controlled by Puppeteer, running inside a dedicated Node.js Docker container. This solution offers significant flexibility in choosing the rendering engine (e.g., MapLibre GL JS or OpenLayers) and defining the print frame (a simple HTML page with a map canvas for displaying raw maps is sufficient but can be extended with custom elements as required). \
Furthermore, by explicitly adding GPU support to the container, which is not available by default, we achieved good performance in map rendering and PDF generation while ensuring the same rendering quality as in the online map display.
Key Points
The primary factors motivating our choice of this setup included:
- Identical map display as online with MapLibre GL (WYSIWYG – What You See Is What You Get)
- Stability of the server even under heavy load
- Scalability on AWS server
- Maximum flexibility for layout design, defined directly in HTML
Optimizations crucial for performance:
- GPU support
- Caching
Comparative analysis of:
- Conventional services (MapFish Print)
- TileServer GL
- Frontend-based solutions (InkMap)