Compiling the GeoDMS

This page describes how to compile GeoDmsRun.exe from source on Windows. The process is bound to change through an ongoing effort to make the source code more accessible to the open source community. Compilation is performed using Microsoft Visual Studio (2022) which can be downloaded here. Make sure to also install the latest versions of additional components: C++ MFC and C++ ATL. This document is written as a chronological guide.

Clone GeoDMS from Github

Clone GeoDMS from the Github repository.

setting up external dependencies

vcpkg: boost, cgal, gdal, geos, openssl and pybind11

Dependencies can be installed using the open-source package manager vcpkg. For Visual Studio 2022 and newer vcpkg can be installed using Visual Studio Installer, which installs vcpkg in C:\Program Files\Microsoft Visual Studio\2022\Community\VC\vcpkg. Geodms makes use of manifest mode, using vcpkg.json in the root directory of the repo. When compiling geodms using the next steps vcpkg.exe should be used as package manager for missing dependencies.

In case of missing dependencies it may be so that vcpkg is not properly integrated on the system. Open a commandprompt in the install location of vcpkg and issue the command: vcpkg.exe integrate install. This should now make vcpkg available and dependencies should begin to download when starting compilation.

Intel IPP

Download the Intel® oneAPI Base Toolkit here. From setup select the latest Integrated Performance Primitives (IPP) library. Open the Microsoft Visual Studio (2022) project file located in /geo/dll/GeoDLL.vcxproj and set the IPP paths on lines 49, 55 and 59.

GeoDMSGui

Download and install latest stable release stable release of Qt, version 6.6.x, using the Qt installer. Make sure to install MSVC compiler support and QtWebEngine component. In Visual Studio (2022) install the Qt VS Tools extension. Then make sure to add the installed Qt version using Qt VS Tools»Qt Versions, via the folder browser navigate to qmake.exe: ie C:\Qt\6.6.2\msvc2019_64\bin\qmake.exe. Also for the project properties make sure Qt version is set to the installed version: image

building the GeoDMS DLLs

Open the solution file “geodms/trunk/all22.sln” in Microsoft Visual Studio (2022). You see that GeoDMS consists of various projects from which we will create .dll files. There are four build configurations: a Release and Debug version in both x64 and Win32. Use ctrl-shift-b to build the whole solution, or alternatively follow these steps as roadmap to build GeoDmsRun.exe:

  1. Rtc (Runtime Core Library)
  2. Sym (configuration syntax parser and producer of an internal representation of a model and its calculation rules.)
  3. Tic (Tree Item Classes, Data Items and Units and related services.)
  4. Stx (configuration syntax parser and producer of an internal representation of a model and its calculation rules.)
  5. Stg (Storage Managers, providing a generic interface to GDAL, Proj, and native Storage Implementations including .shp and .dbf the TIFF lib, and ODBC connections.)
  6. Clc (implementation of common operators)
  7. Geo (implementation of geometric and network operators, such as Dijkstra functions, raster convolution, polygon and arc operations)
  8. Shv (Viewer Components (TableViewer, MapViewer) and related Carets, and Graphic Components.)
  9. And finally: GeoDmsRun.exe, and GeoDmsGuiQt.exe

All build products will be placed in the bin folder depending on the chosen build configuration, for instance the “GeoDmsRun.exe” file may reside in the: geodms/bin/Release/x64 folder.

Python bindings (work in progress)

Python bindings are being developed in the main development git branch (currently: v14). The GeoDmsPython project produces the required Python3 bindings using pybin11. First make sure python 3.10 or above is installed on your system, which can be downloaded here. Next make sure pybind11 is installed, using command:

vcpkg install python3 --triplet x64-windows
vcpkg install pybind11 --triplet x64-windows

Then in the GeoDmsPython project properties make sure that the include path refers correctly to your vcpkg python locations

  • C/C++ -> Additional Include Directories: image

If all is setup, GeoDmsPython project can be build without errors, the output will be named geodms.pyd in the output folder (python dynamic module).

Now open a terminal in the build folder where geodms.pyd is located and type “python” which will start up python in command line mode. To test the geodms module import the version function:

from geodms import version

And evaluate:

version()

Which should return a proper version string, which depends on the build time and type: image

Additionally, you can run LoadConfigFromPython.py, located in the LoadConfigFromPython project folder.

Native Linux compilation (work in progress)

Native Linux compilation is being prepared in the linux_gcc branch.

Steps that i did to get somewhere are:

  • Install WSL (Ubuntu) and set ssh on port 23
    sudo apt update
    sudo apt upgrade
    sudo apt install net-tools
    cd /etc/ssh/sshd_config
    vi sshd_config ;
    sudo service ssh restart
    
  • install gcc and vcpkg
sudo apt install g++ gdb make ninja-build rsync zip
sudo apt install vcpkg
cd /mnt/c/vcpkg/scripts/buildsystems
./bootstrap-vcpkg.sh
vcpkg install boost --triplet x64-linux
vcpkg integrate install