1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
3 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
4 ;;; Copyright © 2017, 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
5 ;;; Copyright © 2018–2021 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
8 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
9 ;;; Copyright © 2018, 2019, 2020 Julien Lepiller <julien@lepiller.eu>
10 ;;; Copyright © 2019, 2020, 2021 Guillaume Le Vaillant <glv@posteo.net>
11 ;;; Copyright © 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
12 ;;; Copyright © 2019, 2021 Wiktor Żelazny <wzelazny@vurv.cz>
13 ;;; Copyright © 2019, 2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
14 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
15 ;;; Copyright © 2020 Christopher Baines <mail@cbaines.net>
16 ;;; Copyright © 2020, 2021 Felix Gruber <felgru@posteo.net>
17 ;;; Copyright © 2021 Sharlatan Hellseher <sharlatanus@gmail.com>
18 ;;; Copyright © 2021 Vinicius Monego <monego@posteo.net>
19 ;;; Copyright © 2021 Clément Lassieur <clement@lassieur.org>
21 ;;; This file is part of GNU Guix.
23 ;;; GNU Guix is free software; you can redistribute it and/or modify it
24 ;;; under the terms of the GNU General Public License as published by
25 ;;; the Free Software Foundation; either version 3 of the License, or (at
26 ;;; your option) any later version.
28 ;;; GNU Guix is distributed in the hope that it will be useful, but
29 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
30 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
31 ;;; GNU General Public License for more details.
33 ;;; You should have received a copy of the GNU General Public License
34 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
36 (define-module (gnu packages geo)
37 #:use-module (guix build-system ant)
38 #:use-module (guix build-system cmake)
39 #:use-module (guix build-system glib-or-gtk)
40 #:use-module (guix build-system gnu)
41 #:use-module (guix build-system go)
42 #:use-module (guix build-system meson)
43 #:use-module (guix build-system python)
44 #:use-module (guix build-system qt)
45 #:use-module (guix build-system scons)
46 #:use-module (guix build-system r)
47 #:use-module (guix download)
48 #:use-module (guix git-download)
49 #:use-module (guix svn-download)
50 #:use-module ((guix licenses) #:prefix license:)
51 #:use-module (guix packages)
52 #:use-module (guix utils)
53 #:use-module (gnu packages)
54 #:use-module (gnu packages algebra)
55 #:use-module (gnu packages astronomy)
56 #:use-module (gnu packages audio)
57 #:use-module (gnu packages autotools)
58 #:use-module (gnu packages backup)
59 #:use-module (gnu packages bash)
60 #:use-module (gnu packages bison)
61 #:use-module (gnu packages boost)
62 #:use-module (gnu packages check)
63 #:use-module (gnu packages compression)
64 #:use-module (gnu packages curl)
65 #:use-module (gnu packages databases)
66 #:use-module (gnu packages datastructures)
67 #:use-module (gnu packages docbook)
68 #:use-module (gnu packages documentation)
69 #:use-module (gnu packages elf)
70 #:use-module (gnu packages flex)
71 #:use-module (gnu packages fonts)
72 #:use-module (gnu packages fontutils)
73 #:use-module (gnu packages gettext)
74 #:use-module (gnu packages gl)
75 #:use-module (gnu packages glib)
76 #:use-module (gnu packages gnome)
77 #:use-module (gnu packages gps)
78 #:use-module (gnu packages gtk)
79 #:use-module (gnu packages haskell-apps)
80 #:use-module (gnu packages image)
81 #:use-module (gnu packages image-processing)
82 #:use-module (gnu packages icu4c)
83 #:use-module (gnu packages java)
84 #:use-module (gnu packages kde)
85 #:use-module (gnu packages lua)
86 #:use-module (gnu packages maths)
87 #:use-module (gnu packages pcre)
88 #:use-module (gnu packages pdf)
89 #:use-module (gnu packages perl)
90 #:use-module (gnu packages photo)
91 #:use-module (gnu packages pkg-config)
92 #:use-module (gnu packages protobuf)
93 #:use-module (gnu packages pulseaudio)
94 #:use-module (gnu packages python)
95 #:use-module (gnu packages python-check)
96 #:use-module (gnu packages python-crypto)
97 #:use-module (gnu packages python-science)
98 #:use-module (gnu packages python-web)
99 #:use-module (gnu packages python-xyz)
100 #:use-module (gnu packages qt)
101 #:use-module (gnu packages readline)
102 #:use-module (gnu packages swig)
103 #:use-module (gnu packages sqlite)
104 #:use-module (gnu packages textutils)
105 #:use-module (gnu packages time)
106 #:use-module (gnu packages web)
107 #:use-module (gnu packages webkit)
108 #:use-module (gnu packages wxwidgets)
109 #:use-module (gnu packages xml)
110 #:use-module (gnu packages xorg))
112 (define-public memphis
121 (url "https://github.com/jiuka/memphis")
123 (file-name (git-file-name name version))
125 (base32 "068c3943pgbpfjq44pmvn5fmkh005ak5aa67vvrq3fn487c6w54q"))))
126 (build-system glib-or-gtk-build-system)
127 (outputs '("out" "doc"))
134 (string-append "--with-html-dir="
135 (assoc-ref %outputs "doc")
136 "/share/gtk-doc/html"))
138 (modify-phases %standard-phases
139 (add-after 'unpack 'patch-autogen
141 (substitute* "autogen.sh"
142 (("\\./configure \"\\$@\"")
145 (add-after 'patch-autogen 'patch-docbook-xml
146 (lambda* (#:key inputs #:allow-other-keys)
147 (with-directory-excursion "docs/reference"
148 (substitute* "libmemphis-docs.sgml"
149 (("http://www.oasis-open.org/docbook/xml/4.3/")
150 (string-append (assoc-ref inputs "docbook-xml")
151 "/xml/dtd/docbook/"))))
154 `(("autoconf" ,autoconf)
155 ("automake" ,automake)
156 ("docbook-xml" ,docbook-xml-4.3)
157 ("gobject-introspection" ,gobject-introspection)
158 ("gtk-doc" ,gtk-doc/stable)
160 ("pkg-config" ,pkg-config)
161 ("python" ,python-wrapper)
169 (synopsis "Map-rendering for OpenSteetMap")
170 (description "Memphis is a map-rendering application and a library for
171 OpenStreetMap written in C using eXpat, Cairo and GLib.")
172 (home-page "http://trac.openstreetmap.ch/trac/memphis/")
173 (license license:lgpl2.1+)))
181 (uri (string-append "http://download.osgeo.org/geos/geos-"
186 "1xqpmr10xi0n9sj47fbwc89qb0yr9imh4ybk0jsxpffy111syn22"))))
187 (build-system gnu-build-system)
188 (arguments `(#:phases
189 (modify-phases %standard-phases
191 'unpack 'patch-test-shebangs
193 (substitute* '("tests/xmltester/testrunner.sh"
194 "tests/geostest/testrunner.sh")
195 (("/bin/sh") (which "sh")))
199 (home-page "https://geos.osgeo.org/")
200 (synopsis "Geometry Engine for Geographic Information Systems")
202 "GEOS provides a spatial object model and fundamental geometric
203 functions. It is a C++ port of the Java Topology Suite (JTS). As such,
204 it aims to contain the complete functionality of JTS in C++. This
205 includes all the OpenGIS Simple Features for SQL spatial predicate
206 functions and spatial operators, as well as specific JTS enhanced
207 topology functions.")
208 (license (list license:lgpl2.1+ ; Main distribution.
209 license:zlib ; tests/xmltester/tinyxml/*
210 license:public-domain)))) ; include/geos/timeval.h
212 (define-public gnome-maps
218 (uri (string-append "mirror://gnome/sources/" name "/"
219 (version-major version) "/"
220 name "-" version ".tar.xz"))
223 "02bdkmb3wyzfrbq726634v4g1hyh9za70cc2ivlbp7zc2n1jgp5c"))))
224 (build-system meson-build-system)
228 (modify-phases %standard-phases
229 (add-after 'unpack 'skip-gtk-update-icon-cache
230 ;; Don't create 'icon-theme.cache'.
232 (substitute* "meson_post_install.py"
233 (("gtk-update-icon-cache") "true"))))
234 (add-after 'unpack 'patch-dbus-service
235 (lambda* (#:key outputs #:allow-other-keys)
236 (substitute* "data/org.gnome.Maps.service.in"
237 (("@pkgdatadir@/org.gnome.Maps")
238 (string-append (assoc-ref outputs "out")
239 "/bin/gnome-maps")))))
240 (add-after 'install 'wrap
241 (lambda* (#:key inputs outputs #:allow-other-keys)
242 (let ((out (assoc-ref outputs "out"))
243 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
244 (geocode-glib-path (string-append
245 (assoc-ref inputs "geocode-glib")
247 (goa-path (string-append
248 (assoc-ref inputs "gnome-online-accounts:lib")
250 (gdk-pixbuf-path (string-append
251 (assoc-ref inputs "gdk-pixbuf")
253 (webkitgtk-path (string-append
254 (assoc-ref inputs "webkitgtk")
256 (wrap-program (string-append out "/bin/gnome-maps")
257 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
259 ;; There seems to be no way to embed the path of
260 ;; libgoa-1.0.so.0, libwebkit2gtk-4.0.so.37,
261 ;; libgdk_pixbuf-2.0.so, libjavascriptcoregtk-4.0.so.18, and
262 ;; libgeocode-glib.so.0
263 `("LD_LIBRARY_PATH" ":" prefix (,goa-path
266 ,geocode-glib-path)))
269 `(("gettext" ,gettext-minimal)
270 ("gobject-introspection" ,gobject-introspection)
271 ("pkg-config" ,pkg-config)))
273 `(("evolution-data-server" ,evolution-data-server)
275 ("libchamplain" ,libchamplain)
277 ("libhandy" ,libhandy)
278 ("libsecret" ,libsecret)
280 ("libgweather" ,libgweather)
282 ("gdk-pixbuf" ,gdk-pixbuf+svg)
283 ("glib-networking" ,glib-networking)
285 ("geocode-glib" ,geocode-glib)
286 ("gfbgraph" ,gfbgraph)
289 ("gnome-online-accounts:lib" ,gnome-online-accounts "lib")
290 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
293 ("webkitgtk" ,webkitgtk)))
294 (synopsis "Graphical map viewer and wayfinding program")
295 (description "GNOME Maps is a graphical map viewer. It uses map data from
296 the OpenStreetMap project. It can provide directions for walking, bicycling,
298 (home-page "https://wiki.gnome.org/Apps/Maps")
299 (license license:gpl2+)))
301 (define-public libgeotiff
308 (uri (string-append "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-"
310 (patches (search-patches
311 ;; See libgeotiff 1.5.1 issue
312 ;; https://github.com/OSGeo/libgeotiff/issues/22
313 "libgeotiff-adapt-test-script-for-proj-6.2.patch"))
315 (base32 "0b31mlzcv5b1y7jdvb7p0pa3xradrg3x5g32ym911lbhq4rrgsgr"))
316 (modules '((guix build utils)))
319 ;; Remove .csv files, distributed from EPSG under a restricted
320 ;; license. See LICENSE for full license text.
321 (for-each delete-file (find-files "." "\\.csv$"))
323 (build-system gnu-build-system)
325 `(("libjpeg-turbo" ,libjpeg-turbo)
329 `(;; libgeotiff headers include proj headers, so ensure those are available.
333 (list "--disable-static"
334 "--with-zlib" "--with-jpeg"
335 (string-append "--with-libtiff=" (assoc-ref %build-inputs "libtiff")))))
336 (synopsis "Library for handling GeoTIFF (geographic enabled TIFF)")
337 (description "libgeotiff is a library on top of libtiff for reading and
338 writing GeoTIFF information tags.")
339 (home-page "https://trac.osgeo.org/geotiff/")
340 ;; This is a mixture of various contributions under different licenses.
341 ;; Note that the EPSG database is NOT "free to use" as the LICENSE file
342 ;; states, as its commercial redistribution is restricted. Hence, we have
343 ;; removed it from the package.
344 (license (list license:public-domain
347 (license:non-copyleft "file://LICENSE"
348 "See LICENSE in the distribution.")))))
350 (define-public librasterlite2
352 (name "librasterlite2")
353 (version "1.1.0-beta1")
358 "https://www.gaia-gis.it/gaia-sins/librasterlite2-sources/"
359 "librasterlite2-" version ".tar.gz"))
362 "1x24gqp4hsq97c31ncwxblab0x0863q8v1z42jil7lvsq3glqa7p"))))
363 (build-system gnu-build-system)
365 `(("pkg-config" ,pkg-config)))
369 ("freetype" ,freetype)
372 ("libgeotiff" ,libgeotiff)
373 ("libjpeg-turbo" ,libjpeg-turbo)
375 ("librttopo" ,librttopo)
376 ("libspatialite" ,libspatialite)
382 ("openjpeg" ,openjpeg)
385 ("zstd" ,zstd "lib")))
386 (synopsis "Library to work with huge raster coverages using a SpatiaLite")
388 "librasterlite2 is a library that stores and retrieves huge raster
389 coverages using a SpatiaLite DBMS.")
390 (home-page "https://www.gaia-gis.it/fossil/librasterlite2/index")
391 ;; For the genuine librasterlite-sources holds:
392 ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked.
393 ;; Files under src/control_points are from GRASS
394 ;; and are licensed under GPL2+ only.
395 ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak.
396 ;; The tools supporting the library (both rl2tool and wmslite) are
397 ;; licensed under the GPL v3 (or any subsequent version) terms.
398 ;; The test/*.svg files are placed in the public domain, except for
399 ;; test/Car_Yellow.svg which is licensed under the Free Art License 1.3.
400 (license (list license:gpl2+
405 license:public-domain))))
407 (define-public librttopo
415 (url "https://git.osgeo.org/gitea/rttopo/librttopo")
416 (commit (string-append "librttopo-" version))))
417 (file-name (git-file-name name version))
419 (base32 "0h7lzlkn9g4xky6h81ndy0aa6dxz8wb6rnl8v3987jy1i6pr072p"))))
420 (build-system gnu-build-system)
423 (modify-phases %standard-phases
424 (add-after 'unpack 'patch-autogen
426 (let ((autoconf (which "autoconf"))
427 (autoheader (which "autoheader"))
428 (aclocal (which "aclocal"))
429 (automake (which "automake"))
430 (libtoolize (which "libtoolize")))
431 (substitute* "autogen.sh"
432 (("`which autoconf 2>/dev/null`") autoconf)
433 (("`which autoheader 2>/dev/null`") autoheader)
435 (string-append "ACLOCAL=" aclocal "\n"))
437 (string-append "AUTOMAKE=" automake "\n"))
439 (string-append "LIBTOOLIZE=" libtoolize "\n"))))
442 `(("autoconf" ,autoconf)
443 ("automake" ,automake)
445 ("pkg-config" ,pkg-config)))
448 (synopsis "Library to handle SQL/MM topologies")
450 "The RT Topology Library exposes an API to create and manage standard
451 (ISO 13249 aka SQL/MM) topologies using user-provided data stores.")
452 (home-page "https://git.osgeo.org/gitea/rttopo/librttopo")
453 (license license:gpl2+)))
455 (define-public libspatialite
457 (name "libspatialite")
462 (uri (string-append "https://www.gaia-gis.it/gaia-sins/libspatialite-"
466 "164y82rw2lrp5glfc0rkn7n6xvx5dvlgmh7bb7815067251wkjzf"))))
467 (build-system gnu-build-system)
469 `(("pkg-config" ,pkg-config)))
473 ("librttopo" ,librttopo)
480 '("--enable-rttopo=yes")
482 (modify-phases %standard-phases
483 ;; 1 test is failing, ignore it:
484 (add-after 'unpack 'ignore-broken-tests
486 (substitute* '("test/Makefile.in")
487 (("check_wms\\$\\(EXEEXT\\) check_drop_rename\\$\\(EXEEXT\\) ")
488 "check_wms$(EXEEXT) ")))))))
489 (synopsis "Extend SQLite to support Spatial SQL capabilities")
491 "SpatiaLite is a library intended to extend the SQLite core to support
492 fully fledged Spatial SQL capabilities.")
493 (home-page "https://www.gaia-gis.it/fossil/libspatialite/index")
494 ;; For the genuine libspatialite-sources holds:
495 ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked.
496 ;; Files under src/control_points are from GRASS
497 ;; and are licensed under GPL2+ only.
498 ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak.
499 (license (list license:gpl2+
502 license:public-domain))))
511 (uri (string-append "http://download.osgeo.org/proj/proj-"
515 "050apzdn0isxpsblys1shrl9ccli5vd32kgswlgx1imrbwpg915k"))))
516 (build-system cmake-build-system)
518 `(#:configure-flags '("-DUSE_EXTERNAL_GTEST=ON")))
521 ("libjpeg-turbo" ,libjpeg-turbo)
525 `(("googletest" ,googletest)
526 ("pkg-config" ,pkg-config)))
527 (home-page "https://proj.org/")
528 (synopsis "Coordinate transformation software")
530 "Proj is a generic coordinate transformation software that transforms
531 geospatial coordinates from one @acronym{CRS, coordinate reference system}
532 to another. This includes cartographic projections as well as geodetic
533 transformations. Proj includes command line applications for easy
534 conversion of coordinates from text files or directly from user input.
535 In addition, Proj also exposes an application programming interface that
536 lets developers use the functionality of Proj in their own software.")
537 (license (list license:expat
538 ;; src/projections/patterson.cpp
540 ;; src/geodesic.*, src/tests/geodtest.cpp
543 (define-public proj.4
549 (uri (string-append "http://download.osgeo.org/proj/proj-"
553 "1xw5f427xk9p2nbsj04j6m5zyjlyd66sbvl2bkg8hd1kx8pm9139"))))
554 (build-system gnu-build-system)
557 (modify-phases %standard-phases
558 (add-after 'unpack 'patch-test-paths
560 (substitute* '("nad/test27"
566 (("/bin/rm") (which "rm")))
568 ;; Precision problems on i686 and other platforms. See:
569 ;; https://web.archive.org/web/20151006134301/http://trac.osgeo.org/proj/ticket/255
570 ;; Disable failing test.
571 (add-after 'patch-test-paths 'ignore-failing-tests
573 (substitute* '("nad/Makefile.in")
574 (("\tPROJ_LIB.*" all) (string-append "#" all)))
578 (home-page "https://proj.org/")
579 (synopsis "Cartographic Projections Library")
581 "Proj.4 is a library for converting coordinates between cartographic
583 (license (list license:expat
584 ;; src/PJ_patterson.c
588 ;; Embedded EPSG database.
589 (license:non-copyleft "http://www.epsg.org/TermsOfUse")
593 (define-public python-pyproj
595 (name "python-pyproj")
600 (uri (pypi-uri "pyproj" version))
603 "0xrqpy708qlyd7nqjra0dl7nvkqzaj9w0v7wq4j5pxazha9n14sa"))))
604 (build-system python-build-system)
607 (modify-phases %standard-phases
608 (add-after 'unpack 'set-proj-path
609 (lambda* (#:key inputs #:allow-other-keys)
610 (let ((proj (assoc-ref inputs "proj")))
611 (setenv "PROJ_DIR" proj)
612 (substitute* "pyproj/datadir.py"
613 (("(internal_datadir = ).*$" all var)
614 (string-append var "Path(\"" proj "/share/proj\")\n")))))))))
618 `(("python-certifi" ,python-certifi)))
620 `(("python-cython" ,python-cython)
621 ("python-numpy" ,python-numpy)
622 ("python-pandas" ,python-pandas)
623 ("python-pytest" ,python-pytest)
624 ("python-xarray" ,python-xarray)))
625 (home-page "https://github.com/pyproj4/pyproj")
627 "Python interface to PROJ")
629 "This package provides a Python interface to PROJ, a cartographic
630 projections and coordinate transformations library.")
631 (license license:expat)))
633 (define-public python-fiona
635 (name "python-fiona")
640 (uri (pypi-uri "Fiona" version))
643 "0fql7i7dg1xpbadmk8d26dwp91v7faixxc4wq14zg0kvhp9041d7"))))
644 (build-system python-build-system)
647 (modify-phases %standard-phases
648 (add-before 'check 'remove-local-fiona
650 ; This would otherwise interfere with finding the installed
651 ; fiona when running tests.
652 (delete-file-recursively "fiona")))
654 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
655 (add-installed-pythonpath inputs outputs)
657 (invoke "pytest" "-m" "not network and not wheel")))))))
661 `(("python-attrs" ,python-attrs)
662 ("python-certifi" ,python-certifi)
663 ("python-click" ,python-click)
664 ("python-click-plugins" ,python-click-plugins)
665 ("python-cligj" ,python-cligj)
666 ("python-munch" ,python-munch)
667 ("python-setuptools" ,python-setuptools)
668 ("python-six" ,python-six)
669 ("python-pytz" ,python-pytz)))
671 `(("gdal" ,gdal) ; for gdal-config
672 ("python-boto3" ,python-boto3)
673 ("python-cython" ,python-cython)
674 ("python-pytest" ,python-pytest)
675 ("python-pytest-cov" ,python-pytest-cov)))
676 (home-page "https://github.com/Toblerity/Fiona")
678 "Fiona reads and writes spatial data files")
680 "Fiona is GDAL’s neat and nimble vector API for Python programmers.
681 Fiona is designed to be simple and dependable. It focuses on reading
682 and writing data in standard Python IO style and relies upon familiar
683 Python types and protocols such as files, dictionaries, mappings, and
684 iterators instead of classes specific to OGR. Fiona can read and write
685 real-world data using multi-layered GIS formats and zipped virtual file
686 systems and integrates readily with other Python GIS packages such as
687 pyproj, Rtree, and Shapely.")
688 (license license:bsd-3)))
690 (define-public python-geopandas
692 (name "python-geopandas")
697 (uri (pypi-uri "geopandas" version))
700 "02k389zyyjv51gd09c92vlr83sv46awdq0066jgh5i24vjs2m5v3"))))
701 (build-system python-build-system)
704 (modify-phases %standard-phases
706 (lambda* (#:key tests? #:allow-other-keys)
709 ; Disable test that fails with
710 ; NotImplementedError in pandas.
711 "-k" "not test_fillna_no_op_returns_copy"
712 ; Disable tests that require internet access.
713 "-m" "not web")))))))
715 `(("python-fiona" ,python-fiona)
716 ("python-pandas" ,python-pandas)
717 ("python-pyproj" ,python-pyproj)
718 ("python-shapely" ,python-shapely)))
720 `(("python-pytest" ,python-pytest)))
721 (home-page "http://geopandas.org")
722 (synopsis "Geographic pandas extensions")
723 (description "The goal of GeoPandas is to make working with
724 geospatial data in Python easier. It combines the capabilities of
725 Pandas and Shapely, providing geospatial operations in Pandas and a
726 high-level interface to multiple geometries to Shapely. GeoPandas
727 enables you to easily do operations in Python that would otherwise
728 require a spatial database such as PostGIS.")
729 (license license:bsd-3)))
731 (define-public mapnik
738 (uri (string-append "https://github.com/mapnik/mapnik/releases/download/v"
739 version "/mapnik-v" version ".tar.bz2"))
742 "06frcikaj2mgz3abfk5h0z4j3hbksi0zikwjngbjv4p5f3pwxf8q"))))
743 (build-system scons-build-system)
747 ("freetype" ,freetype)
748 ("harfbuzz" ,harfbuzz)
750 ("libjpeg-turbo" ,libjpeg-turbo)
759 `(("pkg-config" ,pkg-config)))
761 `(#:scons ,scons-python2
764 (string-append "PREFIX=" %output)
765 (string-append "CUSTOM_LDFLAGS=-Wl,-rpath=" %output "/lib"))))
766 (home-page "https://mapnik.org/")
767 (synopsis "Toolkit for developing mapping applications")
768 (description "Mapnik is a toolkit for developing mapping applications. It
769 is basically a collection of geographic objects like maps, layers,
770 datasources, features, and geometries. At its core is a C++ shared library
771 providing algorithms and patterns for spatial data access and visualization.
772 The library does not rely on any specific windowing system and can be deployed
773 to any server environment. It is intended to play fair in a multi-threaded
774 environment and is aimed primarily, but not exclusively, at web-based
776 (license (list license:lgpl2.1+
777 ;; demo/viewer, demo/python/rundemo.py
779 ;; deps/boost, deps/mapbox, deps/agg/include/agg_conv_offset.h
781 ;; deps/mapnik/sparsehash
784 (license:non-copyleft "file://deps/agg/copying")))))
786 (define-public spatialite-gui
788 (name "spatialite-gui")
789 (version "2.1.0-beta1")
794 "https://www.gaia-gis.it/gaia-sins/spatialite-gui-sources/"
795 "spatialite_gui-" version ".tar.gz"))
797 (base32 "0cyv4cycl073p9lnnnglcb72qn71g8h9g5zn4gzw7swcy5nxjj5s"))))
798 (build-system gnu-build-system)
800 `(("pkg-config" ,pkg-config)))
806 ("libjpeg-turbo" ,libjpeg-turbo)
807 ("librasterlite2" ,librasterlite2)
808 ("librttopo" ,librttopo)
809 ("libspatialite" ,libspatialite)
811 ("libxlsxwriter" ,libxlsxwriter)
815 ("openjpeg" ,openjpeg)
816 ("postgresql" ,postgresql)
819 ("virtualpg" ,virtualpg)
820 ("wxwidgets" ,wxwidgets)
821 ("zstd" ,zstd "lib")))
823 `(#:phases (modify-phases %standard-phases
824 (add-after 'unpack 'fix-gui
826 ;; Fix for the GUI not showing up.
827 (substitute* "Main.cpp"
828 (("Hide\\(\\);") ""))
830 (synopsis "Graphical user interface for SpatiaLite")
831 (description "Spatialite-gui provides a visual interface for viewing and
832 maintaining a spatialite database. You can easily see the structure of the
833 tables and data contents using point and click functions, many of which
834 construct common SQL queries, or craft your own SQL queries.")
835 (home-page "https://www.gaia-gis.it/fossil/spatialite_gui/index")
836 (license license:gpl3+)))
845 "http://download.osgeo.org/gdal/" version "/gdal-"
849 "1p6nmlsr8wbyq350pa6c22vrp98dcsa7yjnqsbhdbp74yj53nw9r"))
850 (modules '((guix build utils)))
853 ;; TODO: frmts contains a lot more bundled code.
854 (for-each delete-file-recursively
859 "frmts/jpeg/libjpeg12"
860 "frmts/gtiff/libtiff"
861 "frmts/gtiff/libgeotiff"
863 "ogr/ogrsf_frmts/geojson/libjson"))))))
864 (build-system gnu-build-system)
868 (let-syntax ((with (syntax-rules ()
870 (string-append option "="
871 (assoc-ref %build-inputs input))))))
873 ;; TODO: --with-pcidsk, --with-pcraster
874 (with "--with-freexl" "freexl")
875 (with "--with-libjson-c" "json-c")
876 (with "--with-png" "libpng")
877 (with "--with-webp" "libwebp")
878 (with "--with-gif" "giflib")
879 (with "--with-jpeg" "libjpeg-turbo")
880 (with "--with-libtiff" "libtiff")
881 (with "--with-geotiff" "libgeotiff")
882 (with "--with-libz" "zlib")
883 (with "--with-expat" "expat")
884 (with "--with-sqlite3" "sqlite")
887 (modify-phases %standard-phases
888 (add-before 'build 'fix-path
890 (substitute* "frmts/mrf/mrf_band.cpp"
891 (("\"../zlib/zlib.h\"") "<zlib.h>")))))))
898 ("libgeotiff" ,libgeotiff)
899 ("libjpeg-turbo" ,libjpeg-turbo)
905 ("postgresql" ,postgresql) ; libpq
910 `(("pkg-config" ,pkg-config)))
911 (home-page "https://gdal.org/")
912 (synopsis "Raster and vector geospatial data format library")
913 (description "GDAL is a translator library for raster and vector geospatial
914 data formats. As a library, it presents a single raster abstract data model
915 and single vector abstract data model to the calling application for all
916 supported formats. It also comes with a variety of useful command line
917 utilities for data translation and processing.")
921 ;; frmts/gtiff/tif_float.c, frmts/pcraster/libcsf,
922 ;; ogr/ogrsf_frmts/dxf/intronurbs.cpp, frmts/pdf/pdfdataset.cpp
925 ;; frmts/hdf4/hdf-eos/*
926 ;; similar to the expat license, but without guarantee exclusion
927 (license:non-copyleft "file://frmts/hdf4/hdf-eos/README")
928 ;; frmts/grib/degrib/
929 license:public-domain ; with guarantee exclusion
931 ;; Some bsd-inspired license
932 (license:non-copyleft "file://port/LICENCE_minizip")
933 ;; alg/internal_libqhull
934 ;; Some 5-clause license
935 (license:non-copyleft "file://alg/internal_libqhull/COPYING.txt")
939 (define-public python-gdal
940 (package (inherit gdal)
942 (build-system python-build-system)
944 '(#:tests? #f ; no tests
946 (modify-phases %standard-phases
947 (add-before 'build 'chdir
949 (chdir "swig/python")
953 `(("python-numpy" ,python-numpy)))
956 (synopsis "GDAL (Geospatial Data Abstraction Library) python bindings")))
958 (define-public python-pyshp
960 (name "python-pyshp")
966 (url "https://github.com/GeospatialPython/pyshp")
968 (file-name (git-file-name name version))
970 (base32 "0jsraqzq82pw19wvx84x7w5cs8agr44a9b5y0jjw540wim4xa73r"))))
971 (build-system python-build-system)
974 (modify-phases %standard-phases
976 (lambda* (#:key tests? #:allow-other-keys)
978 ;; This is the only test file.
979 (invoke "python" "-m" "pytest" "test_shapefile.py")))))))
981 `(("python-pytest" ,python-pytest)
982 ("python-pytest-runner" ,python-pytest-runner)))
983 (home-page "https://github.com/GeospatialPython/pyshp")
984 (synopsis "Read/write support for ESRI Shapefile format")
986 "The Python Shapefile Library (PyShp) reads and writes ESRI Shapefiles.")
987 (license license:expat)))
989 (define-public python-cartopy
991 (name "python-cartopy")
992 ;; This is a post-release fix that adds build_ext to setup.py.
993 (version "0.19.0.post1")
997 (uri (pypi-uri "Cartopy" version))
999 (base32 "0xnm8z3as3hriivdfd26s6vn5b63gb46x6vxw6gh1mwfm5rlg2sb"))))
1000 (build-system python-build-system)
1003 (modify-phases %standard-phases
1005 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1007 (add-installed-pythonpath inputs outputs)
1008 (invoke "python" "-m" "pytest" "--pyargs" "cartopy"
1009 ;; These tests require online data.
1010 "-m" "not natural_earth and not network"
1011 ;; This one too but it's not marked as such.
1012 "-k" "not test_gridliner_labels_bbox_style")))))))
1014 `(("python-matplotlib" ,python-matplotlib)
1015 ("python-numpy" ,python-numpy)
1016 ("python-pykdtree" ,python-pykdtree)
1017 ("python-pyshp" ,python-pyshp)
1018 ("python-scipy" ,python-scipy)
1019 ("python-shapely" ,python-shapely)))
1024 `(("python-cython" ,python-cython)
1025 ("python-flufl-lock" ,python-flufl-lock)
1026 ("python-pytest" ,python-pytest)))
1027 (home-page "https://scitools.org.uk/cartopy/docs/latest/")
1028 (synopsis "Cartographic library for visualisation")
1030 "Cartopy is a Python package designed to make drawing maps for data
1031 analysis and visualisation easy.
1036 @item object oriented projection definitions
1037 @item point, line, polygon and image transformations between projections
1038 @item integration to expose advanced mapping in Matplotlib with a simple and
1040 @item powerful vector data handling by integrating shapefile reading with
1041 Shapely capabilities
1043 (license license:lgpl3+)))
1045 (define-public postgis
1051 (uri (string-append "https://download.osgeo.org/postgis/source/postgis-"
1055 "0ch7gry8a1i9114mlhklxryn7ja3flsz6pxj9r5p09k92xh3gp9c"))))
1056 (build-system gnu-build-system)
1060 (list (string-append "datadir=" (assoc-ref %outputs "out") "/share")
1061 (string-append "docdir="(assoc-ref %outputs "out") "/share/doc")
1062 (string-append "pkglibdir="(assoc-ref %outputs "out") "/lib")
1063 (string-append "bindir=" (assoc-ref %outputs "out") "/bin"))
1065 (modify-phases %standard-phases
1066 (add-before 'build 'fix-install-path
1067 (lambda* (#:key outputs #:allow-other-keys)
1068 (substitute* '("raster/loader/Makefile" "raster/scripts/python/Makefile")
1069 (("\\$\\(DESTDIR\\)\\$\\(PGSQL_BINDIR\\)")
1070 (string-append (assoc-ref outputs "out") "/bin"))))))))
1076 ("libjpeg" ,libjpeg-turbo)
1077 ("libxml2" ,libxml2)
1079 ("postgresql" ,postgresql)
1080 ("protobuf-c" ,protobuf-c)
1084 ("pkg-config" ,pkg-config)))
1085 (home-page "https://postgis.net")
1086 (synopsis "Spatial database extender for PostgreSQL")
1087 (description "PostGIS is a spatial database extender for PostgreSQL
1088 object-relational database. It adds support for geographic objects allowing
1089 location queries to be run in SQL. This package provides a PostgreSQL
1094 ;; loader/dbfopen, safileio.*, shapefil.h, shpopen.c
1097 license:public-domain
1099 license:bsd-3 ; files only say "BSD"
1101 license:cc-by-sa3.0))))
1103 (define-public tegola
1110 "https://github.com/go-spatial/tegola/archive/v"
1112 (file-name (string-append name "-" version ".tar.gz"))
1115 "09vnzxfn0r70kmd776kcdfqxhzdj11syxa0b27z4ci1k367v7viw"))))
1116 (build-system go-build-system)
1118 `(#:import-path "github.com/go-spatial/tegola/cmd/tegola"
1119 #:unpack-path "github.com/go-spatial/tegola"
1121 (modify-phases %standard-phases
1122 (add-before 'build 'set-version
1124 (with-directory-excursion "src/github.com/go-spatial/tegola"
1125 (substitute* '("cmd/tegola/cmd/root.go"
1126 "cmd/tegola_lambda/main.go")
1127 (("version not set") ,version)))
1129 (home-page "https://tegola.io")
1130 (synopsis "Vector tile server for maps")
1131 (description "Tegola is a free vector tile server written in Go. Tegola
1132 takes geospatial data and slices it into vector tiles that can be efficiently
1133 delivered to any client.")
1136 ;; Some packages in vendor have other licenses
1142 (define-public imposm3
1145 (version "0.6.0-alpha.4")
1149 (uri (string-append "https://github.com/omniscale/imposm3/archive/v"
1151 (file-name (string-append name "-" version ".tar.gz"))
1154 "06f0kwmv52yd5m9jlckqxqmkf0cnqy3hamakrvg9lspplyqrds80"))))
1155 (build-system go-build-system)
1157 `(#:import-path "github.com/omniscale/imposm3/cmd/imposm"
1158 #:unpack-path "github.com/omniscale/imposm3"
1160 (modify-phases %standard-phases
1161 (add-before 'build 'set-version
1163 (substitute* "src/github.com/omniscale/imposm3/version.go"
1164 (("0.0.0-dev") ,version))
1168 ("leveldb" ,leveldb)))
1169 (home-page "https://imposm.org/")
1170 (synopsis "OpenStreetMap importer for PostGIS")
1171 (description "Imposm is an importer for OpenStreetMap data. It reads PBF
1172 files and imports the data into PostgreSQL/PostGIS databases. It is designed
1173 to create databases that are optimized for rendering/tile/map-services.")
1176 ;; Some dependencies in vendor have different licenses
1181 (define-public libosmium
1189 (url "https://github.com/osmcode/libosmium")
1190 (commit (string-append "v" version))))
1191 (file-name (git-file-name name version))
1193 (base32 "0rqy18bbakp41f44y5id9ixh0ar2dby46z17p4115z8k1vv9znq2"))))
1194 (build-system cmake-build-system)
1202 ("protozero" ,protozero)
1203 ("sparsehash" ,sparsehash)
1207 `(("doxygen" ,doxygen)))
1208 (home-page "https://osmcode.org/libosmium/")
1209 (synopsis "C++ library for working with OpenStreetMap data")
1210 (description "Libosmium is a fast and flexible C++ library for working with
1211 OpenStreetMap data.")
1212 (license license:boost1.0)))
1214 (define-public osm2pgsql
1222 (url "https://github.com/openstreetmap/osm2pgsql")
1224 (file-name (git-file-name name version))
1226 (base32 "1j35aa8qinhavliqi5pdm0viyi7lm5xyk402rliaxxs1r2hbsafn"))
1227 (modules '((guix build utils)))
1230 (delete-file-recursively "contrib/protozero")
1231 (delete-file-recursively "contrib/libosmium")
1233 (build-system cmake-build-system)
1235 `(#:tests? #f; tests fail because we need to setup a database
1237 (list (string-append "-DOSMIUM_INCLUDE_DIR="
1238 (assoc-ref %build-inputs "libosmium")
1240 (string-append "-DPROTOZERO_INCLUDE_DIR="
1241 (assoc-ref %build-inputs "protozero")
1247 ("libosmium" ,libosmium)
1249 ("postgresql" ,postgresql)
1251 ("protozero" ,protozero)
1254 `(("python" ,python)
1255 ("python-psycopg2" ,python-psycopg2)))
1256 (home-page "https://github.com/openstreetmap/osm2pgsql")
1257 (synopsis "OSM data importer to postgresql")
1258 (description "Osm2pgsql is a tool for loading OpenStreetMap data into a
1259 PostgreSQL / PostGIS database suitable for applications like rendering into a
1260 map, geocoding with Nominatim, or general analysis.")
1261 (license license:gpl2+)))
1263 (define-public tippecanoe
1271 (url "https://github.com/mapbox/tippecanoe")
1273 (file-name (git-file-name name version))
1275 (base32 "0lbmhly4ivnqc6qk1k3sdqvsg6x3nfd8gnjx846bhqj4wag3f88m"))))
1276 (build-system gnu-build-system)
1279 (modify-phases %standard-phases (delete 'configure))
1280 #:test-target "test"
1282 (list (string-append "CC=" ,(cc-for-target))
1283 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1288 (home-page "https://github.com/mapbox/tippecanoe")
1289 (synopsis "Vector tile server for maps")
1290 (description "Tippecanoe creates scale-independent view of data, so that
1291 the texture and density of features is visible at every zoom level, instead of
1292 dropping features at lower levels.")
1293 (license license:bsd-2)))
1295 (define-public osmctools
1303 (url "https://gitlab.com/osm-c-tools/osmctools")
1305 (file-name (git-file-name name version))
1308 "1m8d3r1q1v05pkr8k9czrmb4xjszw6hvgsf3kn9pf0v14gpn4r8f"))))
1309 (build-system gnu-build-system)
1311 `(("autoconf" ,autoconf)
1312 ("automake" ,automake)))
1315 (home-page "https://gitlab.com/osm-c-tools/osmctools")
1316 (synopsis "Tools to convert, filter and update OpenStreetMap data files")
1317 (description "This project contains a few tools which are used in the
1318 OpenStreetMap project. They can be used to convert, filter and update
1319 OpenStreetMap data files.")
1320 (license license:agpl3)))
1322 (define-public osm-gps-map
1324 (name "osm-gps-map")
1330 "https://github.com/nzjrs/osm-gps-map/releases/download/"
1331 version "/osm-gps-map-" version ".tar.gz"))
1334 "11imsf4cz1dpxdjh178k2s29axmq86rkfg1pqmn7incyxmjzhbwg"))))
1335 (build-system gnu-build-system)
1337 `(("gnome-common" ,gnome-common)
1338 ("gtk-doc" ,gtk-doc/stable)
1339 ("pkg-config" ,pkg-config)))
1343 ("gobject-introspection" ,gobject-introspection)
1345 ("libsoup" ,libsoup)))
1346 (home-page "https://nzjrs.github.io/osm-gps-map/")
1347 (synopsis "GTK+ widget for displaying OpenStreetMap tiles")
1349 "This package provides a GTK+ widget (and Python bindings) that when
1350 given GPS coordinates,draws a GPS track, and points of interest on a moving
1351 map display. Downloads map data from a number of websites, including
1352 @url{https://www.openstreetmap.org}.")
1353 (license license:gpl2+)))
1355 (define-public xygrib
1362 (url "https://github.com/opengribs/XyGrib")
1363 (commit (string-append "v" version))))
1364 (file-name (git-file-name name version))
1365 (patches (search-patches "xygrib-fix-finding-data.patch"))
1368 "0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia"))
1369 (modules '((guix build utils)))
1372 (delete-file-recursively "data/fonts")
1373 ;; Fixes compilation, can be removed with the next release.
1374 ;; Upstream link: https://github.com/opengribs/XyGrib/pull/255
1375 (substitute* "src/SkewT.h"
1376 (("QMessageBox>") "QMessageBox>\n#include <QPainterPath>"))
1378 (build-system cmake-build-system)
1380 `(#:configure-flags (list "-DGNU_PACKAGE=ON")
1383 (modify-phases %standard-phases
1384 (add-after 'unpack 'patch-directories
1385 (lambda* (#:key inputs #:allow-other-keys)
1386 (let ((jpeg (assoc-ref inputs "openjpeg"))
1387 (font (assoc-ref inputs "font-liberation")))
1388 (substitute* "CMakeLists.txt"
1389 ;; Skip looking for the static library.
1390 (("\"libnova.a\"") ""))
1391 ;; Don't use the bundled font-liberation.
1392 (substitute* "src/util/Font.cpp"
1393 (("Util::pathFonts\\(\\)\\+\"liberation-fonts/\"")
1394 (string-append "\"" font "/share/fonts/truetype/\"")))
1395 (substitute* "src/util/Util.h"
1396 (("pathData\\(\\)\\+\"data/fonts/\"")
1397 (string-append "\"" font "/share/fonts/\"")))))))
1398 #:tests? #f)) ; no tests
1400 `(("qttools" ,qttools)))
1403 ("font-liberation" ,font-liberation)
1404 ("libnova" ,libnova)
1406 ("openjpeg" ,openjpeg)
1408 ("qtbase" ,qtbase-5)
1410 (native-search-paths
1411 (list (search-path-specification
1412 (variable "XDG_DATA_DIRS")
1413 (files '("share")))))
1414 (synopsis "Weather Forecast Visualization")
1416 "XyGrib is a Grib file reader and visualizes meteorological data providing
1417 an off-line capability to analyse weather forecasts or hindcasts. It is
1418 intended to be used as a capable weather work station for anyone with a serious
1419 interest in examining weather. This would include members of the sailing
1420 community, private and sport aviators, farmers, weather buffs and many more.
1421 XyGrib is the continuation of the zyGrib software package with a new team of
1423 (home-page "https://opengribs.org")
1424 (license license:gpl3+)))
1426 (define-public libspatialindex
1428 (name "libspatialindex")
1433 (uri (string-append "https://github.com/libspatialindex/libspatialindex/"
1434 "releases/download/" version "/spatialindex-src-"
1435 version ".tar.bz2"))
1438 "02n5vjcyk04w0djidyp21hfbxfpbbara8ifd9nml6158rwqr8lja"))))
1439 (build-system cmake-build-system)
1440 (home-page "https://libspatialindex.org")
1441 (synopsis "Spatial indexing library")
1442 (description "The purpose of this library is to provide:
1445 @item An extensible framework that will support robust spatial indexing
1447 @item Support for sophisticated spatial queries. Range, point location,
1448 nearest neighbor and k-nearest neighbor as well as parametric queries (defined
1449 by spatial constraints) should be easy to deploy and run.
1450 @item Easy to use interfaces for inserting, deleting and updating information.
1451 @item Wide variety of customization capabilities. Basic index and storage
1452 characteristics like the page size, node capacity, minimum fan-out, splitting
1453 algorithm, etc. should be easy to customize.
1454 @item Index persistence. Internal memory and external memory structures
1455 should be supported. Clustered and non-clustered indices should be easy to be
1459 (license license:expat)))
1461 (define-public java-jmapviewer
1463 (name "java-jmapviewer")
1467 (uri (string-append "https://svn.openstreetmap.org/applications/"
1468 "viewer/jmapviewer/releases/" version
1469 "/JMapViewer-" version "-Source.zip"))
1472 "0sy6r5fkbb9bclw0is6gwnbzz627m7pjfnsqydxz58pbndakkhrv"))))
1473 (build-system ant-build-system)
1475 `(("unzip" ,unzip)))
1477 `(#:build-target "pack"
1478 #:tests? #f; No tests
1480 (modify-phases %standard-phases
1481 (add-before 'build 'clean
1483 (invoke "ant" "clean")))
1485 (lambda* (#:key outputs #:allow-other-keys)
1486 (let ((dir (string-append (assoc-ref outputs "out") "/share/java/")))
1488 (copy-file "JMapViewer.jar" (string-append dir "JMapViewer.jar"))
1490 (home-page "https://wiki.openstreetmap.org/wiki/JMapViewer")
1491 (synopsis "OSM map integration in Java")
1492 (description "JMapViewer is a Java component which easily
1493 integrates an OSM map view into your Java application. It is maintained as
1494 an independent project by the JOSM team.")
1495 (license license:gpl2)))
1497 (define-public java-opening-hours-parser
1499 (name "java-opening-hours-parser")
1504 (url "https://github.com/simonpoole/OpeningHoursParser")
1506 (file-name (git-file-name name version))
1509 "0yhbd2ix6h506aljh0jkrnp28m4xcqdcdpnqm30fn08kawdgxgsh"))))
1510 (build-system ant-build-system)
1512 `(#:jar-name "java-opening-hours-parser.jar"
1513 #:source-dir "src/main/java"
1515 (modify-phases %standard-phases
1516 (add-before 'build 'copy-resources
1518 (copy-recursively "src/main/resources" "build/classes")
1520 (add-before 'build 'generate-parser
1522 (let* ((dir "src/main/java/ch/poole/openinghoursparser")
1523 (file (string-append dir "/OpeningHoursParser.jj")))
1524 (invoke "javacc" "-DEBUG_PARSER=false"
1525 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1526 "-GRAMMAR_ENCODING=UTF-8"
1527 (string-append "-OUTPUT_DIRECTORY=" dir)
1531 `(("java-jetbrains-annotations" ,java-jetbrains-annotations)))
1533 `(("javacc" ,javacc)
1534 ("java-junit" ,java-junit)
1535 ("java-hamcrest-core" ,java-hamcrest-core)))
1536 (home-page "https://github.com/simonpoole/OpeningHoursParser")
1537 (synopsis "Java parser for the OpenStreetMap opening hour format")
1538 (description "This is a very simplistic parser for string values according
1539 to the OSM opening hours specification.")
1540 (license license:expat)))
1549 (url "https://josm.openstreetmap.de/svn/trunk")
1550 (revision (string->number version))
1554 "162hdck29bkag1d97nisx8v7395pdw00bl7nf0p02hr30fc1fcrh"))
1555 (file-name (string-append name "-" version "-checkout"))
1556 (modules '((guix build utils)))
1559 (for-each delete-file (find-files "." ".*.jar$"))
1561 (build-system ant-build-system)
1563 `(("javacc" ,javacc)))
1565 `(("java-commons-jcs" ,java-commons-jcs)
1566 ("java-commons-compress" ,java-commons-compress)
1567 ("java-jmapviewer" ,java-jmapviewer)
1568 ("java-jsonp-api" ,java-jsonp-api)
1569 ("java-jsonp-impl" ,java-jsonp-impl); runtime dependency
1570 ("java-jsr305" ,java-jsr305)
1571 ("java-metadata-extractor" ,java-metadata-extractor)
1572 ("java-opening-hours-parser" ,java-opening-hours-parser)
1573 ("java-openjfx-media" ,java-openjfx-media)
1574 ("java-signpost-core" ,java-signpost-core)
1575 ("java-svg-salamander" ,java-svg-salamander)))
1578 #:jar-name "josm.jar"
1580 (modify-phases %standard-phases
1581 (add-after 'unpack 'rm-build.xml
1583 (delete-file "build.xml")
1585 (add-before 'build 'fix-revision
1587 (with-output-to-file "REVISION.XML"
1590 (string-append "<info><entry><commit revision=\"" ,version "\">"
1591 "<date>1970-01-01 00:00:00 +0000</date>"
1592 "</commit></entry></info>"))))
1594 (add-before 'build 'fix-jcs
1596 ;; This version of JOSM uses an unreleased version of commons-jcs,
1597 ;; which has renamed its classes to another namespace. Rename them
1598 ;; back so they can be used with our version of jcs.
1599 (substitute* (find-files "." ".*.java$")
1601 (("ICache.NAME_COMPONENT_DELIMITER") "\":\""))
1603 (add-before 'build 'fix-classpath
1604 (lambda* (#:key inputs #:allow-other-keys)
1609 (let ((source (assoc-ref inputs "source")))
1610 (not (equal? (substring s 0 (string-length source))
1612 (string-split (getenv "CLASSPATH") #\:))
1615 (add-before 'build 'generate-parser
1617 (let* ((dir "src/org/openstreetmap/josm/gui/mappaint/mapcss")
1618 (out (string-append dir "/parsergen"))
1619 (file (string-append dir "/MapCSSParser.jj")))
1620 (mkdir-p "src/org/openstreetmap/josm/gui/mappaint/mapcss/parsergen")
1621 (invoke "javacc" "-DEBUG_PARSER=false"
1622 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1623 "-GRAMMAR_ENCODING=UTF-8"
1624 (string-append "-OUTPUT_DIRECTORY=" out)
1627 (add-after 'build 'generate-epsg
1629 (system* "javac" "scripts/BuildProjectionDefinitions.java"
1630 "-cp" "build/classes")
1631 (mkdir-p "data/projection")
1632 (with-output-to-file "data/projection/custom-epsg"
1633 (lambda _ (display "")))
1634 (invoke "java" "-cp" "build/classes:scripts:."
1635 "BuildProjectionDefinitions" ".")
1637 (add-after 'generate-epsg 'copy-resources
1639 (copy-recursively "resources" "build/classes")
1641 (add-before 'install 'regenerate-jar
1643 ;; We need to regenerate the jar file to add data.
1644 (delete-file "build/jar/josm.jar")
1645 (invoke "jar" "-cf" "build/jar/josm.jar" "-C"
1646 "build/classes" ".")
1648 (add-before 'build 'copy-revision
1650 (mkdir-p "build/classes")
1651 (with-output-to-file "build/classes/REVISION"
1654 (string-append "Revision: " ,version "\n"
1655 "Is-Local-Build: true\n"
1656 "Build-Date: 1970-01-01 00:00:00 +0000\n"))))
1658 (add-after 'install 'install-share-directories
1659 (lambda* (#:key outputs #:allow-other-keys)
1660 (let ((out (assoc-ref outputs "out"))
1661 (share-directories '("applications" "icons" "man" "menu"
1662 "metainfo" "mime" "pixmaps"))
1663 (desktop "org.openstreetmap.josm.desktop"))
1664 (for-each (lambda (directory)
1665 (copy-recursively (string-append
1666 "native/linux/tested/usr/share/"
1669 out "/share/" directory)))
1671 (substitute* (string-append out "/share/applications/" desktop)
1672 (("josm-MainApplication") "josm-gui-MainApplication")))
1674 (add-after 'install 'install-bin
1675 (lambda* (#:key outputs inputs #:allow-other-keys)
1676 (let* ((out (assoc-ref outputs "out"))
1677 (bin (string-append out "/bin")))
1679 (with-output-to-file (string-append bin "/josm")
1682 (string-append "#!/bin/sh\n"
1683 (assoc-ref inputs "jdk") "/bin/java"
1684 " -cp " out "/share/java/josm.jar:"
1685 (getenv "CLASSPATH")
1686 " org.openstreetmap.josm.gui.MainApplication"))))
1687 (chmod (string-append bin "/josm") #o755))
1689 (home-page "https://josm.openstreetmap.de")
1690 (synopsis "OSM editor")
1691 (description "JOSM is an extensible editor for OpenStreetMap (OSM). It
1692 supports loading GPX tracks, background imagery and OSM data from local
1693 sources as well as from online sources and allows editing the OSM data (nodes,
1694 ways, and relations) and their metadata tags.")
1695 (license license:gpl2+)))
1697 (define-public libmaxminddb
1699 (name "libmaxminddb")
1704 (uri (string-append "https://github.com/maxmind/libmaxminddb"
1705 "/releases/download/" version "/"
1706 "/libmaxminddb-" version ".tar.gz"))
1708 (base32 "0fd4a4sxiiwzbd5h74wl1ijnb7xybjyybb7q41vdq3w8nk3zdzd5"))))
1709 (build-system gnu-build-system)
1712 (list ,(string-append "CC=" (cc-for-target)))))
1715 (home-page "https://maxmind.github.io/libmaxminddb/")
1716 (synopsis "C library for the MaxMind DB file format")
1717 (description "The libmaxminddb library provides a C library for reading
1718 MaxMind DB files, including the GeoIP2 databases from MaxMind. The MaxMind DB
1719 format is a custom, but open, binary format designed to facilitate fast
1720 lookups of IP addresses while allowing flexibility in the type of data
1721 associated with an address.")
1722 (license license:asl2.0)))
1724 (define-public python-maxminddb
1726 (name "python-maxminddb")
1731 (uri (pypi-uri "maxminddb" version))
1734 "0y9giw81k4wdmpryr4k42w50z292mf364a6vs1vxf83ksc9ig6j4"))))
1735 (build-system python-build-system)
1737 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1739 `(("libmaxminddb" ,libmaxminddb)))
1740 (home-page "https://www.maxmind.com/")
1741 (synopsis "Reader for the MaxMind DB format")
1742 (description "MaxMind DB is a binary file format that stores data indexed
1743 by IP address subnets (IPv4 or IPv6). This is a Python module for reading
1745 (license license:asl2.0)))
1747 (define-public python-geoip2
1749 (name "python-geoip2")
1754 (uri (pypi-uri "geoip2" version))
1757 "1w7cay5q6zawjzivqbwz5cqx1qbdjw6kbriccb7l46p7b39fkzzp"))))
1758 (build-system python-build-system)
1760 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1762 `(("python-maxminddb" ,python-maxminddb)
1763 ("python-requests" ,python-requests)))
1764 (home-page "https://www.maxmind.com/")
1765 (synopsis "MaxMind GeoIP2 API")
1766 (description "Provides an API for the GeoIP2 web services and databases.
1767 The API also works with MaxMind’s free GeoLite2 databases.")
1768 (license license:asl2.0)))
1770 (define-public routino
1777 (uri (string-append "http://www.routino.org/download/routino-"
1780 (base32 "1xa7l2bjn832nk6bc7b481nv8hd2gj41jwhg0d2qy10lqdvjpn5b"))))
1781 (build-system gnu-build-system)
1789 `(#:test-target "test"
1791 (modify-phases %standard-phases
1793 (lambda* (#:key outputs #:allow-other-keys)
1794 (substitute* "Makefile.conf"
1795 (("prefix=/usr/local")
1796 (string-append "prefix=" (assoc-ref outputs "out")))
1797 (("LDFLAGS_LDSO=-Wl,-R\\.")
1798 "LDFLAGS_LDSO=-Wl,-R$(libdir)")
1799 (("#CFLAGS\\+=-DUSE_XZ")
1801 (("#LDFLAGS\\+=-llzma")
1804 (synopsis "Routing application for OpenStreetMap data")
1806 "Routino is an application for finding a route between two points
1807 using the dataset of topographical information collected by
1808 @url{https://www.OpenStreetMap.org}.")
1809 (home-page "https://www.routino.org/")
1810 (license license:agpl3+)))
1812 (define-public qmapshack
1820 (url "https://github.com/Maproom/qmapshack")
1821 (commit (string-append "V_" version))))
1822 (file-name (git-file-name name version))
1824 (base32 "1l1j2axf94pdqwirwwhwy3y6k8v1aix78ifqbv6j8sv131h2j7y7"))))
1825 (build-system qt-build-system)
1827 `(("pkg-config" ,pkg-config)
1828 ("qttools" ,qttools)))
1831 ("libjpeg-turbo" ,libjpeg-turbo)
1833 ("qtbase" ,qtbase-5)
1834 ("qtdeclarative" ,qtdeclarative)
1835 ("qtlocation" ,qtlocation)
1836 ("qtwebchannel" ,qtwebchannel)
1837 ("qtwebengine" ,qtwebengine)
1838 ("quazip" ,quazip-0)
1839 ("routino" ,routino)
1840 ("sqlite" ,sqlite) ; See wrap phase
1845 (modify-phases %standard-phases
1846 (add-after 'unpack 'fix-cmake-modules
1847 (lambda* (#:key inputs #:allow-other-keys)
1848 (substitute* "CMakeLists.txt"
1849 (("find_package\\(Qt5PrintSupport REQUIRED\\)" all)
1850 (string-append all "\nfind_package(Qt5Positioning REQUIRED)")))
1851 (substitute* "cmake/Modules/FindROUTINO.cmake"
1853 (assoc-ref inputs "routino")))
1854 ;; The following fixes are included as patches in the sources
1855 ;; of QMapShack, but they are not applied by default, for
1857 (invoke "patch" "-p1" "-i" "FindPROJ4.patch")
1858 (invoke "patch" "-p1" "-i" "FindQuaZip5.patch"))))))
1859 (synopsis "GPS mapping application")
1861 "QMapShack can be used to plan your next outdoor trip or to visualize and
1862 archive all the GPS recordings of your past trips. It is the successor of the
1863 QLandkarte GT application.")
1864 (home-page "https://github.com/Maproom/qmapshack/wiki")
1865 (license license:gpl3+)))
1867 (define-public readosm
1874 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1875 "readosm-" version ".tar.gz"))
1877 (base32 "0igif2bxf4dr82glxz9gyx5mmni0r2dsnx9p9k6pxv3c4lfhaz6v"))))
1878 (build-system gnu-build-system)
1882 (synopsis "Data extractor for OpenStreetMap files")
1884 "ReadOSM is a library to extract valid data from within an OpenStreetMap
1885 input file (in @code{.osm} or @code{.osm.pbf} format).")
1886 (home-page "https://www.gaia-gis.it/fossil/readosm/index")
1887 (license (list license:gpl2+
1891 (define-public shapelib
1899 (url "https://github.com/OSGeo/shapelib")
1900 (commit (string-append "v" version))))
1901 (file-name (git-file-name name version))
1903 (base32 "1lzch0jf6yqhw391phhafzw4ghmiz98zkf698h4fmq109fa2vhqd"))))
1904 (build-system gnu-build-system)
1906 `(("autoconf" ,autoconf)
1907 ("automake" ,automake)
1908 ("libtool" ,libtool)))
1909 (home-page "http://shapelib.maptools.org/")
1910 (synopsis "Provides C library to write and update ESRI Shapefiles")
1912 "The Shapefile C Library provides the ability to write simple C programs
1913 for reading, writing and updating (to a limited extent) ESRI Shapefiles, and the
1914 associated attribute file (@file{.dbf}).")
1915 (license license:gpl2+)))
1917 (define-public spatialite-tools
1919 (name "spatialite-tools")
1924 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1925 "spatialite-tools-" version ".tar.gz"))
1927 (base32 "070p6pg541wvwb28wkn7k0z1qdyirik2qc2jpj4pf0vzx02w414n"))))
1928 (build-system gnu-build-system)
1930 `(("pkg-config" ,pkg-config)))
1935 ("librttopo" ,librttopo)
1936 ("libspatialite" ,libspatialite)
1937 ("libxml2" ,libxml2)
1938 ("minizip" ,minizip)
1940 ("readosm" ,readosm)
1941 ("sqlite" ,sqlite)))
1942 (synopsis "Collection of command line tools for SpatiaLite")
1944 "@code{spatialite-tools} is a collection of Command Line Interface (CLI)
1945 tools supporting SpatiaLite.")
1946 (home-page "https://www.gaia-gis.it/fossil/spatialite-tools/index")
1947 (license license:gpl3+)))
1949 (define-public virtualpg
1956 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1957 "virtualpg-" version ".tar.gz"))
1959 (base32 "12z0l7368r4116ljzg7nljy5hf425r11vxc540w79wlzikmynamy"))))
1960 (build-system gnu-build-system)
1962 `(("postgresql" ,postgresql)
1963 ("sqlite" ,sqlite)))
1964 (synopsis "Allow SQLite/SpatiaLite to access PostgreSQL/PostGIS tables")
1966 "VirtualPG is a dynamic extension for the SQLite DBMS. It implements
1967 the VirtualPostgres driver, allowing to directly exchange data between SQLite
1968 and PostgreSQL; if SpatiaLite is available even PostGIS geometries can be
1969 exchanged form one Spatial DBMS and the other.")
1970 (home-page "https://www.gaia-gis.it/fossil/virtualpg/index")
1971 (license (list license:gpl2+
1975 (define-public opencpn
1983 (url "https://github.com/OpenCPN/OpenCPN")
1984 (commit (string-append "v" version))))
1985 (file-name (git-file-name name version))
1987 (base32 "1xv3h6svw9aay5ixpql231md3pf00qxvhg62z88daraf18hlkfja"))))
1988 (build-system cmake-build-system)
1990 `(("gettext" ,gettext-minimal)
1991 ("pkg-config" ,pkg-config)))
1998 ("libarchive" ,libarchive)
2000 ("libexif" ,libexif)
2001 ("libsndfile" ,libsndfile)
2005 ("portaudio" ,portaudio)
2007 ("tinyxml" ,tinyxml)
2009 ("wxwidgets" ,wxwidgets)
2013 `(#:configure-flags '("-DENABLE_PORTAUDIO=ON"
2014 "-DENABLE_SNDFILE=ON"
2015 "-DBUNDLE_TCDATA=ON"
2016 "-DBUNDLE_GSHHS=CRUDE"
2017 "-DCMAKE_C_FLAGS=-fcommon")
2018 #:tests? #f ; No tests defined
2020 (modify-phases %standard-phases
2021 (add-after 'unpack 'fix-build
2023 (substitute* "CMakeLists.txt"
2024 (("set\\(wxWidgets_CONFIG_OPTIONS.*--toolkit=gtk3" all)
2025 (string-append all " --libs all")))
2027 (synopsis "Chart plotter and marine GPS navigation software")
2029 "OpenCPN is a chart plotter and marine navigation software designed to be
2030 used at the helm station of your boat while underway. Chart a course and
2031 track your position right from your laptop.")
2032 (home-page "https://opencpn.org/")
2033 (license (list license:asl2.0
2044 (define-public grass
2045 (let* ((version "7.8.5")
2046 (majorminor (string-join (list-head (string-split version #\.) 2) ""))
2047 (grassxx (string-append "grass" majorminor)))
2054 (uri (string-append "https://grass.osgeo.org/" grassxx
2055 "/source/grass-" version ".tar.gz"))
2057 (base32 "0dzzhgcsrszzinvjir50nvzq873b8gsp0p9k8fvcrv14amkbnnd3"))))
2058 (build-system gnu-build-system)
2063 ("freetype" ,freetype)
2069 ("libtiff" ,libtiff)
2071 ("mariadb-dev" ,mariadb "dev")
2072 ("mariadb-lib" ,mariadb "lib")
2074 ("openblas" ,openblas)
2076 ("postgresql" ,postgresql)
2079 ("python-dateutil" ,python-dateutil)
2080 ("python-numpy" ,python-numpy)
2081 ("python-wxpython" ,python-wxpython)
2082 ("readline" ,readline)
2084 ("wxwidgets" ,wxwidgets)
2086 ("zstd" ,zstd "lib")))
2088 `(("bash" ,bash-minimal)
2091 ("pkg-config" ,pkg-config)))
2093 `(#:tests? #f ; No tests
2094 #:modules ((guix build gnu-build-system)
2095 ((guix build python-build-system) #:prefix python:)
2097 #:imported-modules (,@%gnu-build-system-modules
2098 (guix build python-build-system))
2100 (modify-phases %standard-phases
2102 (lambda* (#:key inputs outputs #:allow-other-keys)
2103 (let ((shell (search-input-file inputs "/bin/bash")))
2104 (setenv "SHELL" shell)
2105 (setenv "CONFIG_SHELL" shell)
2106 (setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl,"
2107 (assoc-ref outputs "out")
2108 "/" ,grassxx "/lib")))
2109 (invoke "./configure"
2110 (string-append "--prefix="
2111 (assoc-ref outputs "out"))
2114 (string-append "--with-freetype-includes="
2115 (assoc-ref inputs "freetype")
2116 "/include/freetype2")
2117 (string-append "--with-freetype-libs="
2118 (assoc-ref inputs "freetype")
2123 (string-append "--with-mysql-includes="
2124 (assoc-ref inputs "mariadb-dev")
2126 (string-append "--with-mysql-libs="
2127 (assoc-ref inputs "mariadb-lib")
2131 (string-append "--with-proj-share="
2132 (assoc-ref inputs "proj")
2137 "--with-wxwidgets")))
2138 (add-after 'install 'install-links
2139 (lambda* (#:key outputs #:allow-other-keys)
2140 ;; Put links for includes and libraries in the standard places.
2141 (let* ((out (assoc-ref outputs "out"))
2142 (dir (string-append out "/" ,grassxx)))
2143 (symlink (string-append dir "/include")
2144 (string-append out "/include"))
2145 (symlink (string-append dir "/lib")
2146 (string-append out "/lib")))
2148 (add-after 'install-links 'python:wrap
2149 (assoc-ref python:%standard-phases 'wrap))
2150 (add-after 'python:wrap 'wrap-with-python-interpreter
2151 (lambda* (#:key outputs #:allow-other-keys)
2152 (let ((out (assoc-ref outputs "out")))
2153 (wrap-program (string-append out "/bin/" ,grassxx)
2154 `("GRASS_PYTHON" = (,(which "python3"))))
2156 (synopsis "GRASS Geographic Information System")
2158 "GRASS (Geographic Resources Analysis Support System), is a Geographic
2159 Information System (GIS) software suite used for geospatial data management and
2160 analysis, image processing, graphics and maps production, spatial modeling, and
2162 (home-page "https://grass.osgeo.org/")
2163 (license license:gpl2+))))
2172 (uri (string-append "mirror://sourceforge/saga-gis/SAGA%20-%20"
2173 (version-major version) "/SAGA%20-%20" version
2174 "/saga-" version ".tar.gz"))
2176 (base32 "1n051yxxkylly0k9rlkx2ih3j2lf9d4csg00sm7161r7nhjvggd1"))))
2177 (build-system gnu-build-system)
2179 `(("pkg-config" ,pkg-config)
2187 ("libharu" ,libharu)
2188 ("libtiff" ,libtiff)
2190 ("postgresql" ,postgresql)
2194 ("unixodbc" ,unixodbc)
2196 ("wxwidgets" ,wxwidgets)))
2198 '(#:configure-flags '("--enable-python")))
2199 (synopsis "System for Automated Geoscientific Analyses")
2201 "SAGA (System for Automated Geoscientific Analyses) is a Geographic
2202 Information System (GIS) software. It has been designed for an easy and
2203 effective implementation of spatial algorithms and it offers a comprehensive,
2204 growing set of geoscientific methods.")
2205 (home-page "http://www.saga-gis.org")
2206 (license (list license:gpl2+ license:lgpl2.1+))))
2215 (uri (string-append "https://qgis.org/downloads/qgis-"
2216 version ".tar.bz2"))
2218 (base32 "012dv8dcg7w4lf6k37i41wialwhi0kpkxw2dnq19yqqk35632mzx"))))
2219 (build-system cmake-build-system)
2221 `(#:modules ((guix build cmake-build-system)
2222 ((guix build python-build-system) #:prefix python:)
2223 (guix build qt-utils)
2225 #:imported-modules (,@%cmake-build-system-modules
2226 (guix build python-build-system)
2227 (guix build qt-utils))
2229 (modify-phases %standard-phases
2230 ;; Configure correct path to PyQt5 SIP directory
2231 (add-after 'unpack 'configure-pyqt5-sip-path
2232 (lambda* (#:key inputs #:allow-other-keys)
2233 (substitute* "cmake/FindPyQt5.py"
2234 (("sip_dir = cfg.default_sip_dir")
2235 (string-append "sip_dir = \""
2236 (assoc-ref inputs "python-pyqt+qscintilla")
2238 ;; Fix building with python-sip@5.
2240 ;; The reason for this is that python-sip@5 introduces some
2241 ;; changes such as a new build system 'sip-build' as well as the
2242 ;; use of the path "/lib/pythonX.X/site-packages/*/bindings/"
2243 ;; instead of "/share/sip/" for .sip files. However, we do not
2244 ;; actually use that those yet. QGIS detects SIP5 and assumes we
2245 ;; are, messing up the build. The long term solution is to fully
2246 ;; upgrade SIP, use sip-build and fix all failing packages, but
2247 ;; for now I just want to get the build working.
2248 ((".pyqt_sip_dir...os.path.join.*,")
2249 (string-append "'pyqt_sip_dir': \""
2250 (assoc-ref inputs "python-pyqt+qscintilla")
2251 "/share/sip" "\",")))
2252 (substitute* (list "scripts/prepare_commit.sh"
2253 "scripts/qstringfixup.sh"
2254 "scripts/release.pl"
2255 "scripts/runtests_local_travis_config.sh"
2256 "scripts/sip_include.sh"
2258 "scripts/sipify_all.sh"
2259 "scripts/spell_check/check_spelling.sh"
2260 "scripts/spell_check/spell_test.sh"
2261 "scripts/verify_indentation.sh"
2262 "tests/code_layout/test_banned_keywords.sh"
2263 "tests/code_layout/test_licenses.sh"
2264 "tests/code_layout/test_shellcheck.sh"
2265 "tests/code_layout/test_sip_include.sh"
2266 "tests/code_layout/test_sipfiles.sh"
2267 "tests/code_layout/test_sipify.sh")
2268 (("\\$\\(git rev-parse --show-toplevel\\)")
2270 (substitute* "tests/code_layout/test_sip_include.sh"
2271 (("^REV=.*") "REV=currentrev\n"))
2274 (lambda* (#:key inputs #:allow-other-keys)
2275 (setenv "HOME" "/tmp")
2276 (system "Xvfb :1 &")
2277 (setenv "DISPLAY" ":1")
2278 (setenv "TRAVIS" "true")
2279 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
2282 '(;; Disable tests that require network access
2283 "qgis_filedownloader"
2284 ;; TODO: Find why the following tests fail
2285 "ProcessingGdalAlgorithmsRasterTest"
2286 "ProcessingGdalAlgorithmsVectorTest"
2287 "ProcessingGrass7AlgorithmsImageryTest"
2288 "ProcessingGrass7AlgorithmsRasterTest"
2289 "ProcessingGrass7AlgorithmsVectorTest"
2290 "ProcessingOtbAlgorithmsTest"
2291 "ProcessingQgisAlgorithmsTestPt1"
2292 "ProcessingQgisAlgorithmsTestPt2"
2293 "ProcessingQgisAlgorithmsTestPt3"
2294 "ProcessingQgisAlgorithmsTestPt4"
2298 "PyQgsAuthBasicMethod"
2299 "PyQgsAuthenticationSystem"
2300 "PyQgsAuxiliaryStorage"
2301 "PyQgsDBManagerGpkg"
2302 "PyQgsDBManagerSpatialite"
2304 "PyQgsFieldValidator"
2308 "PyQgsImportIntoPostGIS"
2309 "PyQgsLayerDependencies"
2310 "PyQgsLayerMetadata"
2312 "PyQgsLayoutExporter"
2315 "PyQgsLayoutMapGrid"
2319 "PyQgsOGRProviderGpkg"
2320 "PyQgsOapifProvider"
2321 "PyQgsPalLabelingLayout"
2323 "PyQgsProviderConnectionGpkg"
2324 "PyQgsProviderConnectionPostgres"
2325 "PyQgsProviderConnectionSpatialite"
2326 "PyQgsPythonProvider"
2328 "PyQgsRulebasedRenderer"
2329 "PyQgsSelectiveMasking"
2331 "PyQgsShapefileProvider"
2332 "PyQgsSpatialiteProvider"
2334 "PyQgsSymbolExpressionVariables"
2336 "PyQgsVectorFileWriter"
2338 "PyQgsVectorLayerUtils"
2339 "PyQgsVirtualLayerProvider"
2341 "qgis_arcgisrestutilstest"
2342 "qgis_authmanagertest"
2343 "qgis_compositionconvertertest"
2344 "qgis_coordinatereferencesystemtest"
2345 "qgis_expressiontest"
2346 "qgis_fontmarkertest"
2347 "qgis_geometrycheckstest"
2349 "qgis_gpsinformationwidget"
2350 "qgis_grassprovidertest7"
2351 "qgis_imagecachetest"
2352 "qgis_labelingenginetest"
2353 "qgis_layouthtmltest"
2354 "qgis_layoutmanualtabletest"
2355 "qgis_layoutmapgridtest"
2356 "qgis_layoutmaptest"
2357 "qgis_layoutpicturetest"
2358 "qgis_layouttabletest"
2359 "qgis_mapdevicepixelratiotest"
2360 "qgis_maprendererjobtest"
2361 "qgis_ogrproviderguitest"
2362 "qgis_painteffecttest"
2363 "qgis_pallabelingtest"
2364 "qgis_processingtest"
2365 "qgis_rasterlayertest"
2371 "qgis_svgmarkertest"
2372 "qgis_taskmanagertest"
2373 "qgis_wcsprovidertest"
2374 "qgis_ziplayertest")
2376 (add-after 'install 'wrap-python
2377 (assoc-ref python:%standard-phases 'wrap))
2378 (add-after 'wrap-python 'wrap-qt
2379 (lambda* (#:key outputs inputs #:allow-other-keys)
2380 (let ((out (assoc-ref outputs "out")))
2381 (wrap-qt-program "qgis" #:output out #:inputs inputs))
2383 (add-after 'wrap-qt 'wrap-gis
2384 (lambda* (#:key inputs outputs #:allow-other-keys)
2385 ;; TODO: Find if there is a way to get SAGA to work.
2386 ;; Currently QGIS says "version of SAGA not supported".
2387 ;; Disable it for now.
2388 (let* ((out (assoc-ref outputs "out"))
2389 ;;(saga (string-append (assoc-ref inputs "saga") "/bin"))
2390 (grass-version ,(package-version grass))
2391 (grass-majorminor (string-join
2393 (string-split grass-version #\.) 2)
2395 (grass (string-append (assoc-ref inputs "grass")
2396 "/grass" grass-majorminor)))
2397 (wrap-program (string-append out "/bin/qgis")
2398 ;;`("PATH" ":" prefix (,saga))
2399 `("QGIS_PREFIX_PATH" = (,out))
2400 `("GISBASE" = (,grass))))
2407 ("gpsbabel" ,gpsbabel)
2411 ("libspatialindex" ,libspatialindex)
2412 ("libspatialite" ,libspatialite)
2413 ("libxml2" ,libxml2)
2416 ("postgresql" ,postgresql)
2418 ("protobuf" ,protobuf)
2420 ("python-chardet" ,python-chardet)
2421 ("python-dateutil" ,python-dateutil)
2422 ("python-future" ,python-future)
2423 ("python-gdal" ,python-gdal)
2424 ("python-jinja2" ,python-jinja2)
2425 ("python-numpy" ,python-numpy)
2426 ("python-owslib" ,python-owslib)
2427 ("python-psycopg2" ,python-psycopg2)
2428 ("python-pygments" ,python-pygments)
2429 ("python-pyqt+qscintilla" ,python-pyqt+qscintilla)
2430 ("python-pytz" ,python-pytz)
2431 ("python-pyyaml" ,python-pyyaml)
2432 ("python-requests" ,python-requests)
2433 ("python-sip" ,python-sip)
2434 ("python-six" ,python-six)
2435 ("python-urllib3" ,python-urllib3)
2437 ("qscintilla" ,qscintilla)
2438 ("qtbase" ,qtbase-5)
2439 ("qtdeclarative" ,qtdeclarative)
2440 ("qtkeychain" ,qtkeychain)
2441 ("qtlocation" ,qtlocation)
2442 ("qtserialport" ,qtserialport)
2444 ("qtwebkit" ,qtwebkit)
2447 ("sqlite" ,sqlite)))
2452 ("perl-yaml-tiny" ,perl-yaml-tiny)
2453 ("pkg-config" ,pkg-config)
2454 ("python-mock" ,python-mock)
2455 ("python-nose2" ,python-nose2)
2456 ("qttools" ,qttools)
2457 ("shellcheck" ,shellcheck)
2458 ("xorg-server" ,xorg-server-for-tests)))
2459 (home-page "https://qgis.org")
2460 (synopsis "Geographical information system")
2461 (description "QGIS is an easy to use Geographical Information
2462 System (GIS). It is a GIS data viewer and editor. QGIS supports a number of
2463 raster and vector data formats, with new support easily added using the plugin
2476 (license:fsdg-compatible "https://www.deviantart.com/elvensword")
2477 (license:fsf-free "file://debian/copyright" "Go Squared")
2481 "https://www.deviantart.com/webgoddess/art/Reddish-Inspired-Gradients-42208824")
2483 "file://debian/copyright"
2484 "QT-Commercial or LGPL-2.1 with Digia Qt LGPL Exception 1.1 or GPL-3")
2494 (license:non-copyleft "file://debian/copyright" "BSD-like-gist")
2495 (license:non-copyleft "file://debian/copyright" "Jim Mossman Attribution")
2496 (license:non-copyleft
2497 "https://www.ncl.ucar.edu/Download/NCL_source_license.shtml"
2498 "NCL Source Code License")
2501 license:public-domain
2504 (define-public python-geographiclib
2506 (name "python-geographiclib")
2511 (uri (pypi-uri "geographiclib" version))
2514 "0cn6ap5fkh3mkfa57l5b44z3gvz7j6lpmc9rl4g2jny2gvp4dg8j"))))
2515 (build-system python-build-system)
2516 (home-page "https://geographiclib.sourceforge.io/1.50/python/")
2517 (synopsis "Python geodesic routines from GeographicLib")
2519 "This is a python implementation of the geodesic routines in GeographicLib.")
2520 (license license:expat)))
2522 (define-public python-geopy
2524 (name "python-geopy")
2529 (uri (pypi-uri "geopy" version))
2532 "0fx0cv0kgbvynpmjgsvq2fpsyngd5idiscdn8pd5201f1ngii3mq"))))
2533 (build-system python-build-system)
2535 `(("python-geographiclib" ,python-geographiclib)))
2537 `(("python-async-generator" ,python-async-generator)
2538 ("python-coverage" ,python-coverage)
2539 ("python-flake8" ,python-flake8)
2540 ("python-isort" ,python-isort)
2541 ("python-pytest" ,python-pytest)
2542 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
2543 ("python-readme-renderer" ,python-readme-renderer)
2544 ("python-pytz" ,python-pytz)))
2545 (home-page "https://github.com/geopy/geopy")
2546 (synopsis "Geocoding library for Python")
2547 (description "@code{geopy} is a Python client for several popular geocoding
2548 web services. @code{geopy} makes it easy for Python developers to locate the
2549 coordinates of addresses, cities, countries, and landmarks across the globe
2550 using third-party geocoders and other data sources.")
2551 (license license:expat)))
2553 (define-public marble-qt
2554 (let ((release "17.08")
2555 (commit "fc7166eeef784732033c999ba605364f9c82d21c")
2559 (version (git-version release revision commit))
2564 (url "https://invent.kde.org/education/marble.git/")
2566 (file-name (git-file-name name version))
2568 (base32 "0m0sf3sddaib7vc5lhbmh7ziw07p1hahg02f65sgfylyl5f5kj92"))
2569 (patches (search-patches
2570 "marble-qt-add-qt-headers.patch"))))
2571 (build-system cmake-build-system)
2573 `(#:tests? #f ; libmarblewidget-qt5.so.28 not found
2575 '("-DCMAKE_BUILD_TYPE=Release"
2576 "-DWITH_KF5=FALSE")))
2578 `(("qttools" ,qttools)))
2580 `(("qtbase" ,qtbase-5)
2582 ("qtdeclarative" ,qtdeclarative)
2583 ("qtwebkit" ,qtwebkit)
2584 ("qtlocation" ,qtlocation)))
2585 (home-page "https://marble.kde.org/")
2586 (synopsis "Virtual globe and world atlas")
2587 (description "Marble is similar to a desktop globe. At closer scale it
2588 becomes a world atlas, while OpenStreetMap takes the user to street level. It
2589 supports searching for places of interest, viewing Wikipedia articles,
2590 creating routes by drag and drop and more.")
2591 (license license:gpl3))))