A bit of Friday talk into development infrastructure of Mergin Maps. Ready? 

Mergin Maps is QGIS running on your phone with a simplified UI for touch screens, but how difficult is it to build it?

To build (or "compile") Mergin Maps to run on your phone, you need (more technically "link" it to) a whole bunch of open-source GIS libraries, such as QGIS, GDAL, Proj as well other libraries like Qt. Do you know how many C++ libraries Mergin Maps uses? around 126! Some libraries are required for CRS transformation, some for reading your GeoPackages, and some even to show you the correct font on your map.

Historically, I was kind-of responsible for maintenance of the whole build setup, since I was involved in packaging of QGIS for macOS. Later we builded first iOS version of Mergin Maps - the very first time QGIS was run on an iPhone! The build system started as a fork of opengisch/OSGeo4A that was intended for Android, so we extended it for iOS builds. It was based on a lot of bash scripts and quite difficult to maintain in the long term. Building for iOS was quite a difficult exercise which also required modification of QGIS code to allow static providers (iOS requires fully static builds) - so it was a joyful “hurray” moment when I seen first time Mergin Maps (at that time still called Input App) running on my iPhone.

Last year we started to experiment with the vcpkg system and partially migrated to it (Vcpkg is a C/C++ dependency manager from Microsoft). Vcpkg for GIS dependencies started to shine with the great work of OpenGIS guys and the rest of the QGIS community - big thanks! Now it looks like the future for QGIS packaging. Vcpkg is a great way to share the burden of maintenance of all the dependencies required for QGIS, Mergin Maps, QField and other open-source GIS software around and really nicely promote community work. Everyone can easily report issues and create pull requests in microsoft/vcpkg GitHub repository to maintain 100+ libraries needed for our work for QGIS and Mergin Maps.

I am happy today since I just merged a pull request that finished the full migration of the Mergin Maps build system to vcpkg (119 commits with 177 changed files!). We have been working on it with Matej Bagar and others from the team since early April as a “background” job. I am excited, because vcpkg based builds for C++ projects are a great way for community developers to experiment with Mergin Maps and create their own builds. 

Haven’t heard about Vcpkg yet? If you are C++ developer I would really recommend you to try it!

Mergin Maps is a product developed by Lutra Consulting.

You might also want to read these

Let's make the QGIS work for you

Lutra Consulting is a QGIS-focused expert provider of geospatial software development, consulting, training, and support services.

Get in touch
By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Cookie Policy for more information. Deny cookies here.