gnu: emacs-consult: Fix grammar.
[jackhill/guix/guix.git] / gnu / packages / geo.scm
index 79b6c04..c4bdb6a 100644 (file)
@@ -2,16 +2,19 @@
 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2017, 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
-;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
 ;;; Copyright © 2018, 2019, 2020 Julien Lepiller <julien@lepiller.eu>
-;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
-;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
+;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
 ;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2020 Christopher Baines <mail@cbaines.net>
+;;; Copyright © 2020, 2021 Felix Gruber <felgru@posteo.net>
+;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -59,6 +62,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages databases)
   #:use-module (gnu packages datastructures)
+  #:use-module (gnu packages docbook)
   #:use-module (gnu packages documentation)
   #:use-module (gnu packages elf)
   #:use-module (gnu packages flex)
@@ -86,6 +90,7 @@
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-web)
   #:use-module (gnu packages python-xyz)
   #:use-module (gnu packages qt)
   #:use-module (gnu packages xml)
   #:use-module (gnu packages xorg))
 
+(define-public memphis
+  (package
+    (name "memphis")
+    (version "0.2.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri
+        (git-reference
+         (url "https://github.com/jiuka/memphis")
+         (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "068c3943pgbpfjq44pmvn5fmkh005ak5aa67vvrq3fn487c6w54q"))))
+    (build-system glib-or-gtk-build-system)
+    (outputs '("out" "doc"))
+    (arguments
+     `(#:configure-flags
+       (list
+        "--disable-static"
+        "--enable-gtk-doc"
+        "--enable-vala"
+        (string-append "--with-html-dir="
+                       (assoc-ref %outputs "doc")
+                       "/share/gtk-doc/html"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-autogen
+           (lambda _
+             (substitute* "autogen.sh"
+               (("\\./configure \"\\$@\"")
+                ""))
+             #t))
+         (add-after 'patch-autogen 'patch-docbook-xml
+           (lambda* (#:key inputs #:allow-other-keys)
+             (with-directory-excursion "docs/reference"
+               (substitute* "libmemphis-docs.sgml"
+                 (("http://www.oasis-open.org/docbook/xml/4.3/")
+                  (string-append (assoc-ref inputs "docbook-xml")
+                                 "/xml/dtd/docbook/"))))
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("docbook-xml" ,docbook-xml-4.3)
+       ("gobject-introspection" ,gobject-introspection)
+       ("gtk-doc" ,gtk-doc/stable)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)
+       ("python" ,python-wrapper)
+       ("seed" ,seed)
+       ("vala" ,vala)))
+    (inputs
+     `(("expat" ,expat)
+       ("glib" ,glib)))
+    (propagated-inputs
+     `(("cairo" ,cairo)))
+    (synopsis "Map-rendering for OpenSteetMap")
+    (description "Memphis is a map-rendering application and a library for
+OpenStreetMap written in C using eXpat, Cairo and GLib.")
+    (home-page "http://trac.openstreetmap.ch/trac/memphis/")
+    (license license:lgpl2.1+)))
+
 (define-public geos
   (package
     (name "geos")
-    (version "3.8.0")
+    (version "3.8.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "http://download.osgeo.org/geos/geos-"
                                   ".tar.bz2"))
               (sha256
                (base32
-                "1mb2v9fy1gnbjhcgv0xny11ggfb17vkzsajdyibigwsxr4ylq4cr"))))
+                "1xqpmr10xi0n9sj47fbwc89qb0yr9imh4ybk0jsxpffy111syn22"))))
     (build-system gnu-build-system)
     (arguments `(#:phases
                  (modify-phases %standard-phases
@@ -160,6 +228,12 @@ topology functions.")
              (substitute* "meson_post_install.py"
                (("gtk-update-icon-cache") "true"))
              #t))
+         (add-after 'unpack 'patch-dbus-service
+           (lambda* (#:key outputs #:allow-other-keys)
+             (substitute* "data/org.gnome.Maps.service.in"
+               (("@pkgdatadir@/org.gnome.Maps")
+                (string-append  (assoc-ref outputs "out") "/bin/gnome-maps")))
+             #t))
          (add-after 'install 'wrap
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out"))
@@ -220,36 +294,6 @@ and driving.")
     (home-page "https://wiki.gnome.org/Apps/Maps")
     (license license:gpl2+)))
 
-(define-public libgaiagraphics
-  (package
-    (name "libgaiagraphics")
-    (version "0.5")
-    (source
-     (origin
-       (method url-fetch)
-       (uri (string-append "https://www.gaia-gis.it/gaia-sins/libgaiagraphics-"
-                           version ".tar.gz"))
-       (sha256
-        (base32
-         "076afqv417ag3hfvnif0qc7qscmnq1dsf6y431yygwgf34rjkayc"))))
-    (build-system gnu-build-system)
-    (native-inputs
-     `(("pkg-config" ,pkg-config)))
-    (inputs
-     `(("cairo" ,cairo)
-       ("libpng" ,libpng)
-       ("libjpeg-turbo" ,libjpeg-turbo)
-       ("libtiff" ,libtiff)
-       ("libgeotiff" ,libgeotiff)
-       ("proj.4" ,proj.4)
-       ("libxml2" ,libxml2)
-       ("zlib" ,zlib)))
-     (synopsis "Gaia common graphics support")
-     (description "libgaiagraphics is a library supporting
- common-utility raster handling methods.")
-    (home-page "https://www.gaia-gis.it/fossil/libgaiagraphics/index")
-    (license license:lgpl3+)))
-
 (define-public libgeotiff
   (package
     (name "libgeotiff")
@@ -299,10 +343,115 @@ writing GeoTIFF information tags.")
                    (license:non-copyleft "file://LICENSE"
                                          "See LICENSE in the distribution.")))))
 
+(define-public librasterlite2
+  (package
+    (name "librasterlite2")
+    (version "1.1.0-beta1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://www.gaia-gis.it/gaia-sins/librasterlite2-sources/"
+             "librasterlite2-" version ".tar.gz"))
+       (sha256
+        (base32
+         "1x24gqp4hsq97c31ncwxblab0x0863q8v1z42jil7lvsq3glqa7p"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("cairo" ,cairo)
+       ("curl" ,curl)
+       ("freetype" ,freetype)
+       ("freexl" ,freexl)
+       ("giflib" ,giflib)
+       ("libgeotiff" ,libgeotiff)
+       ("libjpeg-turbo" ,libjpeg-turbo)
+       ("libpng" ,libpng)
+       ("librttopo" ,librttopo)
+       ("libspatialite" ,libspatialite)
+       ("libtiff" ,libtiff)
+       ("libwebp" ,libwebp)
+       ("libxml2" ,libxml2)
+       ("lz4" ,lz4)
+       ("minizip" ,minizip)
+       ("openjpeg" ,openjpeg)
+       ("proj" ,proj)
+       ("sqlite" ,sqlite)
+       ("zstd" ,zstd "lib")))
+    (synopsis "Library to work with huge raster coverages using a SpatiaLite")
+    (description
+     "librasterlite2 is a library that stores and retrieves huge raster
+coverages using a SpatiaLite DBMS.")
+    (home-page "https://www.gaia-gis.it/fossil/librasterlite2/index")
+    ;; For the genuine librasterlite-sources holds:
+    ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+  may be picked.
+    ;; Files under src/control_points are from GRASS
+    ;; and are licensed under GPL2+ only.
+    ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak.
+    ;; The tools supporting the library (both rl2tool and wmslite) are
+    ;; licensed under the GPL v3 (or any subsequent version) terms.
+    ;; The test/*.svg files are placed in the public domain, except for
+    ;; test/Car_Yellow.svg which is licensed under the Free Art License 1.3.
+    (license (list license:gpl2+
+                   license:gpl3+
+                   license:lal1.3
+                   license:lgpl2.1+
+                   license:mpl1.1
+                   license:public-domain))))
+
+(define-public librttopo
+  (package
+    (name "librttopo")
+    (version "1.1.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://git.osgeo.org/gitea/rttopo/librttopo")
+             (commit (string-append "librttopo-" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0h7lzlkn9g4xky6h81ndy0aa6dxz8wb6rnl8v3987jy1i6pr072p"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-autogen
+           (lambda _
+             (let ((autoconf (which "autoconf"))
+                   (autoheader (which "autoheader"))
+                   (aclocal (which "aclocal"))
+                   (automake (which "automake"))
+                   (libtoolize (which "libtoolize")))
+               (substitute* "autogen.sh"
+                            (("`which autoconf 2>/dev/null`") autoconf)
+                            (("`which autoheader 2>/dev/null`") autoheader)
+                            (("ACLOCAL=.*$")
+                             (string-append "ACLOCAL=" aclocal "\n"))
+                            (("AUTOMAKE=.*$")
+                             (string-append "AUTOMAKE=" automake "\n"))
+                            (("LIBTOOLIZE=.*$")
+                             (string-append "LIBTOOLIZE=" libtoolize "\n"))))
+             #t)))))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (inputs
+     `(("geos" ,geos)))
+    (synopsis "Library to handle SQL/MM topologies")
+    (description
+     "The RT Topology Library exposes an API to create and manage standard
+(ISO 13249 aka SQL/MM) topologies using user-provided data stores.")
+    (home-page "https://git.osgeo.org/gitea/rttopo/librttopo")
+    (license license:gpl2+)))
+
 (define-public libspatialite
   (package
     (name "libspatialite")
-    (version "4.3.0a")
+    (version "5.0.1")
     (source
      (origin
        (method url-fetch)
@@ -310,25 +459,28 @@ writing GeoTIFF information tags.")
                            version ".tar.gz"))
        (sha256
         (base32
-         "16d4lpl7xrm9zy4gphy6nwanpjp8wn9g4wq2i2kh8abnlhq01448"))))
+         "164y82rw2lrp5glfc0rkn7n6xvx5dvlgmh7bb7815067251wkjzf"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
      `(("freexl" ,freexl)
        ("geos" ,geos)
+       ("librttopo" ,librttopo)
        ("libxml2" ,libxml2)
-       ("proj.4" ,proj.4)
-       ("sqlite" ,sqlite)
-       ("zlib" ,zlib)))
+       ("minizip" ,minizip)
+       ("proj" ,proj)
+       ("sqlite" ,sqlite)))
     (arguments
-     `(#:phases
+     `(#:configure-flags
+       '("--enable-rttopo=yes")
+       #:phases
        (modify-phases %standard-phases
          ;; 3 tests are failing, ignore them:
          (add-after 'unpack 'ignore-broken-tests
            (lambda _
              (substitute* '("test/Makefile.in")
-               (("\tcheck_sql_stm.*" all) "\tcheck_multithread$(EXEEXT) \\\n")
+               (("\tcheck_sql_stmt.* (check_sql_.*)" all tiny) (string-append "\t" tiny))
                (("(\tch.*) check_v.*ble2.*$" all vt1) (string-append vt1 " \\\n"))
                (("\tch.* (check_v.*ble4.*)$" all vt4) (string-append "\t" vt4)))
              #t)))))
@@ -560,29 +712,39 @@ development.")
 (define-public spatialite-gui
   (package
     (name "spatialite-gui")
-    (version "1.7.1")
+    (version "2.1.0-beta1")
     (source
      (origin
        (method url-fetch)
-       (uri (string-append "https://www.gaia-gis.it/gaia-sins/spatialite_gui-"
-                           version ".tar.gz"))
+       (uri (string-append
+             "https://www.gaia-gis.it/gaia-sins/spatialite-gui-sources/"
+             "spatialite_gui-" version ".tar.gz"))
        (sha256
-        (base32
-         "1r05dz9pyc8vsd2wbqxcsracpfbaamz470rcyp2myfpqwznv376b"))))
+        (base32 "0cyv4cycl073p9lnnnglcb72qn71g8h9g5zn4gzw7swcy5nxjj5s"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
     (inputs
-     `(("freexl" ,freexl)
+     `(("curl" ,curl)
+       ("freexl" ,freexl)
        ("geos" ,geos)
-       ("libgaiagraphics" ,libgaiagraphics)
+       ("giflib" ,giflib)
        ("libjpeg-turbo" ,libjpeg-turbo)
+       ("librasterlite2" ,librasterlite2)
+       ("librttopo" ,librttopo)
        ("libspatialite" ,libspatialite)
+       ("libwebp" ,libwebp)
+       ("libxlsxwriter" ,libxlsxwriter)
        ("libxml2" ,libxml2)
-       ("proj.4" ,proj.4)
+       ("lz4" ,lz4)
+       ("minizip" ,minizip)
+       ("openjpeg" ,openjpeg)
+       ("postgresql" ,postgresql)
+       ("proj" ,proj)
        ("sqlite" ,sqlite)
-       ("wxwidgets" ,wxwidgets-2)
-       ("zlib" ,zlib)))
+       ("virtualpg" ,virtualpg)
+       ("wxwidgets" ,wxwidgets)
+       ("zstd" ,zstd "lib")))
     (arguments
      `(#:phases (modify-phases %standard-phases
                   (add-after 'unpack 'fix-gui
@@ -722,14 +884,14 @@ utilities for data translation and processing.")
 (define-public postgis
   (package
     (name "postgis")
-    (version "3.0.0")
+    (version "3.1.1")
     (source (origin
               (method url-fetch)
               (uri (string-append "https://download.osgeo.org/postgis/source/postgis-"
                                   version ".tar.gz"))
               (sha256
                (base32
-                "15557fbk0xkngihwhqsbdyz2ng49blisf5zydw81j0gabk6x4vy0"))))
+                "0z9a39243fv37mansbbjq5mmxpnhr7xzn8pv92fr7dkdb3psz5hf"))))
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f
@@ -754,6 +916,7 @@ utilities for data translation and processing.")
        ("libxml2" ,libxml2)
        ("pcre" ,pcre)
        ("postgresql" ,postgresql)
+       ("protobuf-c" ,protobuf-c)
        ("proj" ,proj)))
     (native-inputs
      `(("perl" ,perl)
@@ -857,7 +1020,7 @@ to create databases that are optimized for rendering/tile/map-services.")
 (define-public libosmium
   (package
     (name "libosmium")
-    (version "2.15.4")
+    (version "2.15.6")
     (source
      (origin
        (method git-fetch)
@@ -866,7 +1029,7 @@ to create databases that are optimized for rendering/tile/map-services.")
              (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0mlcvqrhp40bzj5r5j9nfc5vbis8hmzcq9xi8jylkciyydaynhz4"))))
+        (base32 "0rqy18bbakp41f44y5id9ixh0ar2dby46z17p4115z8k1vv9znq2"))))
     (build-system cmake-build-system)
     (propagated-inputs
      `(("boost" ,boost)
@@ -890,7 +1053,7 @@ OpenStreetMap data.")
 (define-public osm2pgsql
   (package
     (name "osm2pgsql")
-    (version "1.2.1")
+    (version "1.2.2")
     (source
      (origin
        (method git-fetch)
@@ -899,7 +1062,7 @@ OpenStreetMap data.")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1ysan01lpqzjxlq3y2kdminfjs5d9zksicpf9vvzpdk3fzq51fc9"))
+        (base32 "1j35aa8qinhavliqi5pdm0viyi7lm5xyk402rliaxxs1r2hbsafn"))
        (modules '((guix build utils)))
        (snippet
         '(begin
@@ -939,7 +1102,7 @@ map, geocoding with Nominatim, or general analysis.")
 (define-public tippecanoe
   (package
     (name "tippecanoe")
-    (version "1.31.5")
+    (version "1.36.0")
     (source
      (origin
        (method git-fetch)
@@ -948,14 +1111,14 @@ map, geocoding with Nominatim, or general analysis.")
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1m0x931a945sr7axyhcvpwh798m58hx1zxh6ikgf9gsgqhdhmszz"))))
+        (base32 "0lbmhly4ivnqc6qk1k3sdqvsg6x3nfd8gnjx846bhqj4wag3f88m"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases (delete 'configure))
        #:test-target "test"
        #:make-flags
-       (list "CC=gcc"
+       (list (string-append "CC=" ,(cc-for-target))
              (string-append "PREFIX=" (assoc-ref %outputs "out")))))
     (inputs
      `(("perl" ,perl)
@@ -1011,7 +1174,7 @@ OpenStreetMap data files.")
     (build-system gnu-build-system)
     (native-inputs
      `(("gnome-common" ,gnome-common)
-       ("gtk-doc" ,gtk-doc)
+       ("gtk-doc" ,gtk-doc/stable)
        ("pkg-config" ,pkg-config)))
     (inputs
      `(("cairo" ,cairo)
@@ -1043,7 +1206,13 @@ map display.  Downloads map data from a number of websites, including
                 "0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia"))
               (modules '((guix build utils)))
               (snippet
-               '(begin (delete-file-recursively "data/fonts") #t))))
+               '(begin
+                  (delete-file-recursively "data/fonts")
+                  ;; Fixes compilation, can be removed with the next release.
+                  ;; Upstream link: https://github.com/opengribs/XyGrib/pull/255
+                  (substitute* "src/SkewT.h"
+                    (("QMessageBox>") "QMessageBox>\n#include <QPainterPath>"))
+                  #t))))
     (build-system cmake-build-system)
     (arguments
      `(#:phases
@@ -1211,7 +1380,7 @@ to the OSM opening hours specification.")
 (define-public josm
   (package
     (name "josm")
-    (version "16731")
+    (version "17329")
     (source (origin
               (method svn-fetch)
               (uri (svn-reference
@@ -1220,12 +1389,12 @@ to the OSM opening hours specification.")
                      (recursive? #f)))
               (sha256
                (base32
-                "036kdb1ckhym5f7lj5ydzblli7f1i1pl8z00hxvagf2rczdf5fi3"))
+                "0bq6mirdsi0kmhjfzfp3innxi5a4395d7mas7ikxaz0cziljrz1i"))
               (file-name (string-append name "-" version "-checkout"))
               (modules '((guix build utils)))
             (snippet
              '(begin
-               (for-each delete-file (find-files "." ".*.jar$"))
+                (for-each delete-file (find-files "." ".*.jar$"))
                 #t))))
     (build-system ant-build-system)
     (native-inputs
@@ -1274,7 +1443,8 @@ to the OSM opening hours specification.")
                        (filter
                          (lambda (s)
                            (let ((source (assoc-ref inputs "source")))
-                             (not (equal? (substring s 0 (string-length source)) source))))
+                             (not (equal? (substring s 0 (string-length source))
+                                          source))))
                          (string-split (getenv "CLASSPATH") #\:))
                        ":"))
              #t))
@@ -1321,6 +1491,19 @@ to the OSM opening hours specification.")
                                   "Is-Local-Build: true\n"
                                   "Build-Date: 1970-01-01 00:00:00 +0000\n"))))
              #t))
+         (add-after 'install 'install-share-directories
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out               (assoc-ref outputs "out"))
+                   (share-directories '("applications" "icons" "man" "menu"
+                                        "metainfo" "mime" "pixmaps")))
+               (for-each (lambda (directory)
+                           (copy-recursively (string-append
+                                              "native/linux/tested/usr/share/"
+                                              directory)
+                                             (string-append
+                                              out "/share/" directory)))
+                         share-directories))
+             #t))
          (add-after 'install 'install-bin
            (lambda* (#:key outputs inputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))
@@ -1347,7 +1530,7 @@ ways, and relations) and their metadata tags.")
 (define-public libmaxminddb
   (package
     (name "libmaxminddb")
-    (version "1.4.2")
+    (version "1.4.3")
     (source
      (origin
        (method url-fetch)
@@ -1355,14 +1538,11 @@ ways, and relations) and their metadata tags.")
                            "/releases/download/" version "/"
                            "/libmaxminddb-" version ".tar.gz"))
        (sha256
-        (base32 "0mnimbaxnnarlw7g1rh8lpxsyf7xnmzwcczcc3lxw8xyf6ljln6x"))))
+        (base32 "0fd4a4sxiiwzbd5h74wl1ijnb7xybjyybb7q41vdq3w8nk3zdzd5"))))
     (build-system gnu-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-before 'configure 'set-cc-to-gcc
-           (lambda _
-             (setenv "CC" "gcc"))))))
+     `(#:make-flags
+       (list ,(string-append "CC=" (cc-for-target)))))
     (native-inputs
      `(("perl" ,perl)))
     (home-page "https://maxmind.github.io/libmaxminddb/")
@@ -1423,15 +1603,14 @@ The API also works with MaxMind’s free GeoLite2 databases.")
 (define-public routino
   (package
    (name "routino")
-   (version "3.3.2")
+   (version "3.3.3")
    (source
     (origin
      (method url-fetch)
      (uri (string-append "http://www.routino.org/download/routino-"
                          version ".tgz"))
      (sha256
-      (base32
-       "1ccx3s99j8syxc1gqkzsaqkmyf44l7h3adildnc5iq2md7bp8wab"))))
+      (base32 "1xa7l2bjn832nk6bc7b481nv8hd2gj41jwhg0d2qy10lqdvjpn5b"))))
    (build-system gnu-build-system)
    (native-inputs
     `(("perl" ,perl)))
@@ -1466,7 +1645,7 @@ using the dataset of topographical information collected by
 (define-public qmapshack
   (package
     (name "qmapshack")
-    (version "1.14.0")
+    (version "1.15.2")
     (source
      (origin
        (method git-fetch)
@@ -1475,8 +1654,7 @@ using the dataset of topographical information collected by
              (commit (string-append "V_" version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32
-         "07c2hrq9sn456w7l3gdr599rmjfv2k6mh159zza7p1py8r7ywksa"))))
+        (base32 "1l1j2axf94pdqwirwwhwy3y6k8v1aix78ifqbv6j8sv131h2j7y7"))))
     (build-system qt-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -1537,14 +1715,14 @@ QLandkarte GT application.")
 (define-public readosm
   (package
     (name "readosm")
-    (version "1.1.0")
+    (version "1.1.0a")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
                            "readosm-" version ".tar.gz"))
        (sha256
-        (base32 "1v20pnda67imjd70fn0zw30aar525xicy3d3v49md5cvqklws265"))))
+        (base32 "0igif2bxf4dr82glxz9gyx5mmni0r2dsnx9p9k6pxv3c4lfhaz6v"))))
     (build-system gnu-build-system)
     (inputs
      `(("expat" ,expat)
@@ -1558,17 +1736,43 @@ input file (in @code{.osm} or @code{.osm.pbf} format).")
                    license:lgpl2.1+
                    license:mpl1.1))))
 
+(define-public shapelib
+  (package
+    (name "shapelib")
+    (version "1.5.0")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/OSGeo/shapelib")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1lzch0jf6yqhw391phhafzw4ghmiz98zkf698h4fmq109fa2vhqd"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)))
+    (home-page "http://shapelib.maptools.org/")
+    (synopsis "Provides C library to write and update ESRI Shapefiles")
+    (description
+     "The Shapefile C Library provides the ability to write simple C programs
+for reading, writing and updating (to a limited extent) ESRI Shapefiles, and the
+associated attribute file (@file{.dbf}).")
+    (license license:gpl2+)))
+
 (define-public spatialite-tools
   (package
     (name "spatialite-tools")
-    (version "4.3.0")
+    (version "5.0.1")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
                            "spatialite-tools-" version ".tar.gz"))
        (sha256
-        (base32 "12fggjhi8cgwvw8f6nk76f83b8lqkc07abxyj5ap6f2gq2dqafgp"))))
+        (base32 "070p6pg541wvwb28wkn7k0z1qdyirik2qc2jpj4pf0vzx02w414n"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)))
@@ -1576,12 +1780,13 @@ input file (in @code{.osm} or @code{.osm.pbf} format).")
      `(("expat" ,expat)
        ("freexl" ,freexl)
        ("geos" ,geos)
+       ("librttopo" ,librttopo)
        ("libspatialite" ,libspatialite)
        ("libxml2" ,libxml2)
-       ("proj.4" ,proj.4)
+       ("minizip" ,minizip)
+       ("proj" ,proj)
        ("readosm" ,readosm)
-       ("sqlite" ,sqlite)
-       ("zlib" ,zlib)))
+       ("sqlite" ,sqlite)))
     (synopsis "Collection of command line tools for SpatiaLite")
     (description
      "@code{spatialite-tools} is a collection of Command Line Interface (CLI)
@@ -1592,14 +1797,14 @@ tools supporting SpatiaLite.")
 (define-public virtualpg
   (package
     (name "virtualpg")
-    (version "1.0.2")
+    (version "2.0.1")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
                            "virtualpg-" version ".tar.gz"))
        (sha256
-        (base32 "0kjipcd08vvn188xmwbs7sw41xcs06x47n2hbqshpjcr51mxbarp"))))
+        (base32 "12z0l7368r4116ljzg7nljy5hf425r11vxc540w79wlzikmynamy"))))
     (build-system gnu-build-system)
     (inputs
      `(("postgresql" ,postgresql)
@@ -1684,7 +1889,7 @@ track your position right from your laptop.")
                    license:zlib))))
 
 (define-public grass
-  (let* ((version "7.8.2")
+  (let* ((version "7.8.5")
          (majorminor (string-join (list-head (string-split version #\.) 2) ""))
          (grassxx (string-append "grass" majorminor)))
     (package
@@ -1696,10 +1901,10 @@ track your position right from your laptop.")
          (uri (string-append "https://grass.osgeo.org/" grassxx
                              "/source/grass-" version ".tar.gz"))
          (sha256
-          (base32 "1fwsm99kz0bxvjk7442qq1h45ikrmhba8bqclafb61gqg1q6ymrk"))))
+          (base32 "0dzzhgcsrszzinvjir50nvzq873b8gsp0p9k8fvcrv14amkbnnd3"))))
       (build-system gnu-build-system)
       (inputs
-       `(("bzip2"bzip2)
+       `(("bzip2" ,bzip2)
          ("cairo" ,cairo)
          ("fftw" ,fftw)
          ("freetype" ,freetype)
@@ -1788,8 +1993,14 @@ track your position right from your laptop.")
                  (symlink (string-append dir "/lib")
                           (string-append out "/lib")))
                #t))
-           (add-after 'install-links 'wrap-python
-             (assoc-ref python:%standard-phases 'wrap)))))
+           (add-after 'install-links 'python:wrap
+             (assoc-ref python:%standard-phases 'wrap))
+           (add-after 'python:wrap 'wrap-with-python-interpreter
+             (lambda* (#:key outputs #:allow-other-keys)
+               (let ((out (assoc-ref outputs "out")))
+                 (wrap-program (string-append out "/bin/" ,grassxx)
+                   `("GRASS_PYTHON" = (,(which "python3"))))
+                 #t))))))
       (synopsis "GRASS Geographic Information System")
       (description
        "GRASS (Geographic Resources Analysis Support System), is a Geographic
@@ -1802,7 +2013,7 @@ visualization.")
 (define-public saga
   (package
     (name "saga")
-    (version "7.6.2")
+    (version "7.9.0")
     (source
      (origin
        (method url-fetch)
@@ -1810,7 +2021,7 @@ visualization.")
                            (version-major version) "/SAGA%20-%20" version
                            "/saga-" version ".tar.gz"))
        (sha256
-        (base32 "09j5magmayq2y620kqa490mfd1kpdp3lng2ifcgbrmssc079ybm0"))))
+        (base32 "1n051yxxkylly0k9rlkx2ih3j2lf9d4csg00sm7161r7nhjvggd1"))))
     (build-system gnu-build-system)
     (native-inputs
      `(("pkg-config" ,pkg-config)
@@ -1825,7 +2036,7 @@ visualization.")
        ("libtiff" ,libtiff)
        ("opencv" ,opencv)
        ("postgresql" ,postgresql)
-       ("proj.4" ,proj.4)
+       ("proj" ,proj)
        ("python" ,python)
        ("qhull" ,qhull)
        ("unixodbc" ,unixodbc)
@@ -1845,14 +2056,14 @@ growing set of geoscientific methods.")
 (define-public qgis
   (package
     (name "qgis")
-    (version "3.12.1")
+    (version "3.16.3")
     (source
      (origin
        (method url-fetch)
        (uri (string-append "https://qgis.org/downloads/qgis-"
                            version ".tar.bz2"))
        (sha256
-        (base32 "1a41525y8ac44gzcfaffjx0lyrm49hgnr83jrq40r5mqd3vpmp57"))))
+        (base32 "012dv8dcg7w4lf6k37i41wialwhi0kpkxw2dnq19yqqk35632mzx"))))
     (build-system cmake-build-system)
     (arguments
      `(#:modules ((guix build cmake-build-system)
@@ -1867,23 +2078,40 @@ growing set of geoscientific methods.")
          ;; Configure correct path to PyQt5 SIP directory
          (add-after 'unpack 'configure-pyqt5-sip-path
            (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "cmake/FindPyQt5.cmake"
-               (("\"\\\\\\\\1\" PYQT5_SIP_DIR")
-                (string-append "\"" (assoc-ref inputs "python-pyqt+qscintilla")
-                               "/share/sip\" PYQT5_SIP_DIR")))
-             (substitute* (list "scripts/prepare-commit.sh"
-                                "scripts/runtests-local-travis-config.sh"
+             (substitute* "cmake/FindPyQt5.py"
+               (("sip_dir = cfg.default_sip_dir")
+                (string-append "sip_dir = \""
+                               (assoc-ref inputs "python-pyqt+qscintilla")
+                               "/share/sip\""))
+               ;; Fix building with python-sip@5.
+               ;;
+               ;; The reason for this is that python-sip@5 introduces some
+               ;; changes such as a new build system 'sip-build' as well as the
+               ;; use of the path "/lib/pythonX.X/site-packages/*/bindings/"
+               ;; instead of "/share/sip/" for .sip files. However, we do not
+               ;; actually use that those yet. QGIS detects SIP5 and assumes we
+               ;; are, messing up the build. The long term solution is to fully
+               ;; upgrade SIP, use sip-build and fix all failing packages, but
+               ;; for now I just want to get the build working.
+               ((".pyqt_sip_dir...os.path.join.*,")
+                (string-append "'pyqt_sip_dir': \""
+                               (assoc-ref inputs "python-pyqt+qscintilla")
+                               "/share/sip"  "\",")))
+             (substitute* (list "scripts/prepare_commit.sh"
+                                "scripts/qstringfixup.sh"
+                                "scripts/release.pl"
+                                "scripts/runtests_local_travis_config.sh"
                                 "scripts/sip_include.sh"
                                 "scripts/sipdiff"
                                 "scripts/sipify_all.sh"
                                 "scripts/spell_check/check_spelling.sh"
                                 "scripts/spell_check/spell_test.sh"
-                                "scripts/verify-indentation.sh"
+                                "scripts/verify_indentation.sh"
                                 "tests/code_layout/test_banned_keywords.sh"
                                 "tests/code_layout/test_licenses.sh"
                                 "tests/code_layout/test_shellcheck.sh"
                                 "tests/code_layout/test_sip_include.sh"
-                                "tests/code_layout/test_sipfiles_uptodate.sh"
+                                "tests/code_layout/test_sipfiles.sh"
                                 "tests/code_layout/test_sipify.sh")
                (("\\$\\(git rev-parse --show-toplevel\\)")
                 (getcwd)))
@@ -1903,77 +2131,95 @@ growing set of geoscientific methods.")
                            '(;; Disable tests that require network access
                              "qgis_filedownloader"
                              ;; TODO: Find why the following tests fail
-                             "ProcessingQgisAlgorithmsTestPt1"
-                             "ProcessingQgisAlgorithmsTestPt2"
-                             "ProcessingQgisAlgorithmsTestPt3"
-                             "ProcessingQgisAlgorithmsTestPt4"
                              "ProcessingGdalAlgorithmsRasterTest"
                              "ProcessingGdalAlgorithmsVectorTest"
                              "ProcessingGrass7AlgorithmsImageryTest"
                              "ProcessingGrass7AlgorithmsRasterTest"
                              "ProcessingGrass7AlgorithmsVectorTest"
                              "ProcessingOtbAlgorithmsTest"
-                             "qgis_authmanagertest"
-                             "qgis_compositionconvertertest"
-                             "qgis_coordinatereferencesystemtest"
-                             "qgis_geometrytest"
-                             "qgis_layouthtmltest"
-                             "qgis_layoutmaptest"
-                             "qgis_layoutmapgridtest"
-                             "qgis_painteffecttest"
-                             "qgis_pallabelingtest"
-                             "qgis_svgmarkertest"
-                             "qgis_taskmanagertest"
-                             "qgis_ziplayertest"
-                             "qgis_processingtest"
-                             "qgis_wcsprovidertest"
-                             "qgis_arcgisrestutilstest"
-                             "qgis_grassprovidertest7"
-                             "qgis_gpsinformationwidget"
+                             "ProcessingQgisAlgorithmsTestPt1"
+                             "ProcessingQgisAlgorithmsTestPt2"
+                             "ProcessingQgisAlgorithmsTestPt3"
+                             "ProcessingQgisAlgorithmsTestPt4"
                              "PyCoreAdittions"
-                             "PyQgsPythonProvider"
                              "PyQgsAnnotation"
+                             "PyQgsAppStartup"
                              "PyQgsAuthenticationSystem"
-                             "PyQgsProject"
+                             "PyQgsAuxiliaryStorage"
+                             "PyQgsDBManagerGpkg"
+                             "PyQgsDBManagerSpatialite"
+                             "PyQgsDataItem"
+                             "PyQgsFieldValidator"
                              "PyQgsFileUtils"
                              "PyQgsGeometryTest"
                              "PyQgsImageCache"
+                             "PyQgsImportIntoPostGIS"
+                             "PyQgsLayerDependencies"
                              "PyQgsLayerMetadata"
                              "PyQgsLayout"
-                             "PyQgsLayoutHtml"
-                             "PyQgsLayoutMapGrid"
-                             "PyQgsMetadataBase"
                              "PyQgsLayoutExporter"
+                             "PyQgsLayoutHtml"
                              "PyQgsLayoutLegend"
+                             "PyQgsLayoutMapGrid"
                              "PyQgsMapLayer"
+                             "PyQgsMetadataBase"
+                             "PyQgsOGRProvider"
                              "PyQgsOGRProviderGpkg"
+                             "PyQgsOapifProvider"
                              "PyQgsPalLabelingLayout"
-                             "PyQgsImportIntoPostGIS"
-                             "PyQgsProviderConnectionPostgres"
+                             "PyQgsProject"
                              "PyQgsProviderConnectionGpkg"
+                             "PyQgsProviderConnectionPostgres"
+                             "PyQgsProviderConnectionSpatialite"
+                             "PyQgsPythonProvider"
+                             "PyQgsRasterLayer"
+                             "PyQgsRulebasedRenderer"
+                             "PyQgsSelectiveMasking"
+                             "PyQgsSettings"
                              "PyQgsShapefileProvider"
+                             "PyQgsSpatialiteProvider"
                              "PyQgsSvgCache"
+                             "PyQgsSymbolExpressionVariables"
                              "PyQgsTextRenderer"
-                             "PyQgsOGRProvider"
-                             "PyQgsSpatialiteProvider"
                              "PyQgsVectorFileWriter"
                              "PyQgsVectorLayer"
                              "PyQgsVectorLayerUtils"
                              "PyQgsVirtualLayerProvider"
                              "PyQgsWFSProvider"
-                             "PyQgsOapifProvider"
-                             "PyQgsLayerDependencies"
-                             "PyQgsDBManagerGpkg"
-                             "PyQgsDBManagerSpatialite"
-                             "PyQgsSettings"
-                             "PyQgsAuxiliaryStorage"
-                             "PyQgsSelectiveMasking"
-                             "PyQgsAppStartup"
+                             "qgis_arcgisrestutilstest"
+                             "qgis_authmanagertest"
+                             "qgis_compositionconvertertest"
+                             "qgis_coordinatereferencesystemtest"
+                             "qgis_expressiontest"
+                             "qgis_fontmarkertest"
                              "qgis_geometrycheckstest"
+                             "qgis_geometrytest"
+                             "qgis_gpsinformationwidget"
+                             "qgis_grassprovidertest7"
+                             "qgis_imagecachetest"
+                             "qgis_labelingenginetest"
+                             "qgis_layouthtmltest"
+                             "qgis_layoutmanualtabletest"
+                             "qgis_layoutmapgridtest"
+                             "qgis_layoutmaptest"
+                             "qgis_layoutpicturetest"
+                             "qgis_layouttabletest"
+                             "qgis_mapdevicepixelratiotest"
+                             "qgis_maprendererjobtest"
+                             "qgis_ogrproviderguitest"
+                             "qgis_painteffecttest"
+                             "qgis_pallabelingtest"
+                             "qgis_processingtest"
+                             "qgis_rasterlayertest"
                              "qgis_shellcheck"
-                             "qgis_sipify"
                              "qgis_sip_include"
-                             "qgis_sip_uptodate")
+                             "qgis_sip_uptodate"
+                             "qgis_sipify"
+                             "qgis_styletest"
+                             "qgis_svgmarkertest"
+                             "qgis_taskmanagertest"
+                             "qgis_wcsprovidertest"
+                             "qgis_ziplayertest")
                            "|"))))
          (add-after 'install 'wrap-python
            (assoc-ref python:%standard-phases 'wrap))
@@ -1983,8 +2229,11 @@ growing set of geoscientific methods.")
              #t))
          (add-after 'wrap-qt 'wrap-gis
            (lambda* (#:key inputs outputs #:allow-other-keys)
+             ;; TODO: Find if there is a way to get SAGA to work.
+             ;; Currently QGIS says "version of SAGA not supported".
+             ;; Disable it for now.
              (let* ((out (assoc-ref outputs "out"))
-                    (saga (string-append (assoc-ref inputs "saga") "/bin"))
+                    ;;(saga (string-append (assoc-ref inputs "saga") "/bin"))
                     (grass-version ,(package-version grass))
                     (grass-majorminor (string-join
                                        (list-head
@@ -1993,7 +2242,7 @@ growing set of geoscientific methods.")
                     (grass (string-append (assoc-ref inputs "grass")
                                           "/grass" grass-majorminor)))
                (wrap-program (string-append out "/bin/qgis")
-                 `("PATH" ":" prefix (,saga))
+                 ;;`("PATH" ":" prefix (,saga))
                  `("QGIS_PREFIX_PATH" = (,out))
                  `("GISBASE" = (,grass))))
              #t)))))
@@ -2013,9 +2262,11 @@ growing set of geoscientific methods.")
        ("netcdf" ,netcdf)
        ("postgresql" ,postgresql)
        ("proj" ,proj)
+       ("protobuf" ,protobuf)
        ("python" ,python)
        ("python-chardet" ,python-chardet)
        ("python-dateutil" ,python-dateutil)
+       ("python-future" ,python-future)
        ("python-gdal" ,python-gdal)
        ("python-jinja2" ,python-jinja2)
        ("python-numpy" ,python-numpy)
@@ -2039,7 +2290,7 @@ growing set of geoscientific methods.")
        ("qtsvg" ,qtsvg)
        ("qtwebkit" ,qtwebkit)
        ("qwt" ,qwt)
-       ("saga" ,saga)
+       ;;("saga" ,saga)
        ("sqlite" ,sqlite)))
     (native-inputs
      `(("bison" ,bison)
@@ -2096,3 +2347,52 @@ architecture.")
       license:opl1.0+
       license:public-domain
       license:qwt1.0))))
+
+(define-public python-geographiclib
+  (package
+    (name "python-geographiclib")
+    (version "1.50")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "geographiclib" version))
+        (sha256
+         (base32
+          "0cn6ap5fkh3mkfa57l5b44z3gvz7j6lpmc9rl4g2jny2gvp4dg8j"))))
+    (build-system python-build-system)
+    (home-page "https://geographiclib.sourceforge.io/1.50/python/")
+    (synopsis "Python geodesic routines from GeographicLib")
+    (description
+     "This is a python implementation of the geodesic routines in GeographicLib.")
+    (license license:expat)))
+
+(define-public python-geopy
+  (package
+    (name "python-geopy")
+    (version "2.0.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "geopy" version))
+        (sha256
+         (base32
+          "0fx0cv0kgbvynpmjgsvq2fpsyngd5idiscdn8pd5201f1ngii3mq"))))
+    (build-system python-build-system)
+    (propagated-inputs
+     `(("python-geographiclib" ,python-geographiclib)))
+    (native-inputs
+     `(("python-async-generator" ,python-async-generator)
+       ("python-coverage" ,python-coverage)
+       ("python-flake8" ,python-flake8)
+       ("python-isort" ,python-isort)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-aiohttp" ,python-pytest-aiohttp)
+       ("python-readme-renderer" ,python-readme-renderer)
+       ("python-pytz" ,python-pytz)))
+    (home-page "https://github.com/geopy/geopy")
+    (synopsis "Geocoding library for Python")
+    (description "@code{geopy} is a Python client for several popular geocoding
+web services.  @code{geopy} makes it easy for Python developers to locate the
+coordinates of addresses, cities, countries, and landmarks across the globe
+using third-party geocoders and other data sources.")
+    (license license:expat)))