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, 2021 Julien Lepiller <julien@lepiller.eu>
10 ;;; Copyright © 2019, 2020, 2021, 2022 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, 2022 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>
20 ;;; Copyright © 2021 Nikolay Korotkiy <sikmir@disroot.org>
22 ;;; This file is part of GNU Guix.
24 ;;; GNU Guix is free software; you can redistribute it and/or modify it
25 ;;; under the terms of the GNU General Public License as published by
26 ;;; the Free Software Foundation; either version 3 of the License, or (at
27 ;;; your option) any later version.
29 ;;; GNU Guix is distributed in the hope that it will be useful, but
30 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
31 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32 ;;; GNU General Public License for more details.
34 ;;; You should have received a copy of the GNU General Public License
35 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
37 (define-module (gnu packages geo)
38 #:use-module (guix build-system ant)
39 #:use-module (guix build-system cmake)
40 #:use-module (guix build-system glib-or-gtk)
41 #:use-module (guix build-system gnu)
42 #:use-module (guix build-system go)
43 #:use-module (guix build-system meson)
44 #:use-module (guix build-system python)
45 #:use-module (guix build-system qt)
46 #:use-module (guix build-system scons)
47 #:use-module (guix build-system r)
48 #:use-module (guix download)
49 #:use-module (guix git-download)
50 #:use-module (guix svn-download)
51 #:use-module ((guix licenses) #:prefix license:)
52 #:use-module (guix packages)
53 #:use-module (guix utils)
54 #:use-module (gnu packages)
55 #:use-module (gnu packages algebra)
56 #:use-module (gnu packages astronomy)
57 #:use-module (gnu packages audio)
58 #:use-module (gnu packages autotools)
59 #:use-module (gnu packages backup)
60 #:use-module (gnu packages bash)
61 #:use-module (gnu packages bison)
62 #:use-module (gnu packages boost)
63 #:use-module (gnu packages build-tools)
64 #:use-module (gnu packages check)
65 #:use-module (gnu packages compression)
66 #:use-module (gnu packages cpp)
67 #:use-module (gnu packages cups)
68 #:use-module (gnu packages curl)
69 #:use-module (gnu packages databases)
70 #:use-module (gnu packages datastructures)
71 #:use-module (gnu packages docbook)
72 #:use-module (gnu packages documentation)
73 #:use-module (gnu packages elf)
74 #:use-module (gnu packages flex)
75 #:use-module (gnu packages fonts)
76 #:use-module (gnu packages fontutils)
77 #:use-module (gnu packages gettext)
78 #:use-module (gnu packages gl)
79 #:use-module (gnu packages glib)
80 #:use-module (gnu packages gnome)
81 #:use-module (gnu packages gps)
82 #:use-module (gnu packages graphics)
83 #:use-module (gnu packages gtk)
84 #:use-module (gnu packages haskell-apps)
85 #:use-module (gnu packages haskell-xyz)
86 #:use-module (gnu packages image)
87 #:use-module (gnu packages image-processing)
88 #:use-module (gnu packages icu4c)
89 #:use-module (gnu packages java)
90 #:use-module (gnu packages kde)
91 #:use-module (gnu packages libusb)
92 #:use-module (gnu packages linux)
93 #:use-module (gnu packages lua)
94 #:use-module (gnu packages maths)
95 #:use-module (gnu packages multiprecision)
96 #:use-module (gnu packages pcre)
97 #:use-module (gnu packages pdf)
98 #:use-module (gnu packages perl)
99 #:use-module (gnu packages photo)
100 #:use-module (gnu packages pkg-config)
101 #:use-module (gnu packages protobuf)
102 #:use-module (gnu packages pulseaudio)
103 #:use-module (gnu packages python)
104 #:use-module (gnu packages python-build)
105 #:use-module (gnu packages python-check)
106 #:use-module (gnu packages python-crypto)
107 #:use-module (gnu packages python-science)
108 #:use-module (gnu packages python-web)
109 #:use-module (gnu packages python-xyz)
110 #:use-module (gnu packages qt)
111 #:use-module (gnu packages readline)
112 #:use-module (gnu packages swig)
113 #:use-module (gnu packages sqlite)
114 #:use-module (gnu packages textutils)
115 #:use-module (gnu packages time)
116 #:use-module (gnu packages web)
117 #:use-module (gnu packages webkit)
118 #:use-module (gnu packages wxwidgets)
119 #:use-module (gnu packages xml)
120 #:use-module (gnu packages xorg))
122 (define-public memphis
131 (url "https://github.com/jiuka/memphis")
133 (file-name (git-file-name name version))
135 (base32 "068c3943pgbpfjq44pmvn5fmkh005ak5aa67vvrq3fn487c6w54q"))))
136 (build-system glib-or-gtk-build-system)
137 (outputs '("out" "doc"))
144 (string-append "--with-html-dir="
145 (assoc-ref %outputs "doc")
146 "/share/gtk-doc/html"))
148 (modify-phases %standard-phases
149 (add-after 'unpack 'patch-autogen
151 (substitute* "autogen.sh"
152 (("\\./configure \"\\$@\"")
155 (add-after 'patch-autogen 'patch-docbook-xml
156 (lambda* (#:key inputs #:allow-other-keys)
157 (with-directory-excursion "docs/reference"
158 (substitute* "libmemphis-docs.sgml"
159 (("http://www.oasis-open.org/docbook/xml/4.3/")
160 (string-append (assoc-ref inputs "docbook-xml")
161 "/xml/dtd/docbook/"))))
164 `(("autoconf" ,autoconf)
165 ("automake" ,automake)
166 ("docbook-xml" ,docbook-xml-4.3)
167 ("gobject-introspection" ,gobject-introspection)
168 ("gtk-doc" ,gtk-doc/stable)
170 ("pkg-config" ,pkg-config)
171 ("python" ,python-wrapper)
178 (synopsis "Map-rendering for OpenSteetMap")
179 (description "Memphis is a map-rendering application and a library for
180 OpenStreetMap written in C using eXpat, Cairo and GLib.")
181 (home-page "http://trac.openstreetmap.ch/trac/memphis/")
182 (license license:lgpl2.1+)))
190 (uri (string-append "http://download.osgeo.org/geos/geos-"
195 "1xqpmr10xi0n9sj47fbwc89qb0yr9imh4ybk0jsxpffy111syn22"))))
196 (build-system gnu-build-system)
197 (arguments `(#:phases
198 (modify-phases %standard-phases
200 'unpack 'patch-test-shebangs
202 (substitute* '("tests/xmltester/testrunner.sh"
203 "tests/geostest/testrunner.sh")
204 (("/bin/sh") (which "sh")))
208 (home-page "https://geos.osgeo.org/")
209 (synopsis "Geometry Engine for Geographic Information Systems")
211 "GEOS provides a spatial object model and fundamental geometric
212 functions. It is a C++ port of the Java Topology Suite (JTS). As such,
213 it aims to contain the complete functionality of JTS in C++. This
214 includes all the OpenGIS Simple Features for SQL spatial predicate
215 functions and spatial operators, as well as specific JTS enhanced
216 topology functions.")
217 (license (list license:lgpl2.1+ ; Main distribution.
218 license:zlib ; tests/xmltester/tinyxml/*
219 license:public-domain)))) ; include/geos/timeval.h
221 (define-public gnome-maps
227 (uri (string-append "mirror://gnome/sources/" name "/"
228 (version-major version) "/"
229 name "-" version ".tar.xz"))
232 "037xmkmcmcw87vb1c1s3y225m8757k331cvk1m8cshf6mx61p0l1"))))
233 (build-system meson-build-system)
237 (modify-phases %standard-phases
238 (add-after 'unpack 'skip-gtk-update-icon-cache
239 ;; Don't create 'icon-theme.cache'.
241 (substitute* "meson_post_install.py"
242 (("gtk-update-icon-cache") "true"))))
243 (add-after 'unpack 'patch-dbus-service
244 (lambda* (#:key outputs #:allow-other-keys)
245 (substitute* "data/org.gnome.Maps.service.in"
246 (("@pkgdatadir@/org.gnome.Maps")
247 (string-append (assoc-ref outputs "out")
248 "/bin/gnome-maps")))))
249 (add-after 'install 'wrap
250 (lambda* (#:key inputs outputs #:allow-other-keys)
251 (let ((out (assoc-ref outputs "out"))
252 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
253 (geocode-glib-path (string-append
254 (assoc-ref inputs "geocode-glib")
256 (goa-path (string-append
257 (assoc-ref inputs "gnome-online-accounts:lib")
259 (gdk-pixbuf-path (string-append
260 (assoc-ref inputs "gdk-pixbuf")
262 (webkitgtk-path (string-append
263 (assoc-ref inputs "webkitgtk")
265 (wrap-program (string-append out "/bin/gnome-maps")
266 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
268 ;; There seems to be no way to embed the path of
269 ;; libgoa-1.0.so.0, libwebkit2gtk-4.0.so.37,
270 ;; libgdk_pixbuf-2.0.so, libjavascriptcoregtk-4.0.so.18, and
271 ;; libgeocode-glib.so.0
272 `("LD_LIBRARY_PATH" ":" prefix (,goa-path
275 ,geocode-glib-path)))
278 `(("gettext" ,gettext-minimal)
279 ("gobject-introspection" ,gobject-introspection)
280 ("pkg-config" ,pkg-config)))
282 `(("evolution-data-server" ,evolution-data-server)
284 ("libchamplain" ,libchamplain)
286 ("libhandy" ,libhandy)
287 ("libsecret" ,libsecret)
288 ("libsoup" ,libsoup-minimal-2)
289 ("libgweather" ,libgweather)
292 ("glib-networking" ,glib-networking)
294 ("geocode-glib" ,geocode-glib)
295 ("gfbgraph" ,gfbgraph)
298 ("gnome-online-accounts:lib" ,gnome-online-accounts "lib")
299 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
302 ("webkitgtk" ,webkitgtk-with-libsoup2)))
303 (synopsis "Graphical map viewer and wayfinding program")
304 (description "GNOME Maps is a graphical map viewer. It uses map data from
305 the OpenStreetMap project. It can provide directions for walking, bicycling,
307 (home-page "https://wiki.gnome.org/Apps/Maps")
308 (license license:gpl2+)))
310 (define-public libgeotiff
317 (uri (string-append "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-"
319 (patches (search-patches
320 ;; See libgeotiff 1.5.1 issue
321 ;; https://github.com/OSGeo/libgeotiff/issues/22
322 "libgeotiff-adapt-test-script-for-proj-6.2.patch"))
324 (base32 "0b31mlzcv5b1y7jdvb7p0pa3xradrg3x5g32ym911lbhq4rrgsgr"))
325 (modules '((guix build utils)))
328 ;; Remove .csv files, distributed from EPSG under a restricted
329 ;; license. See LICENSE for full license text.
330 (for-each delete-file (find-files "." "\\.csv$"))
332 (build-system gnu-build-system)
334 (list libjpeg-turbo libtiff zlib))
336 (list ;; libgeotiff headers include proj headers, so ensure those are available.
340 (list "--disable-static"
341 "--with-zlib" "--with-jpeg"
342 (string-append "--with-libtiff=" (assoc-ref %build-inputs "libtiff")))))
343 (synopsis "Library for handling GeoTIFF (geographic enabled TIFF)")
344 (description "libgeotiff is a library on top of libtiff for reading and
345 writing GeoTIFF information tags.")
346 (home-page "https://trac.osgeo.org/geotiff/")
347 ;; This is a mixture of various contributions under different licenses.
348 ;; Note that the EPSG database is NOT "free to use" as the LICENSE file
349 ;; states, as its commercial redistribution is restricted. Hence, we have
350 ;; removed it from the package.
351 (license (list license:public-domain
354 (license:non-copyleft "file://LICENSE"
355 "See LICENSE in the distribution.")))))
357 (define-public librasterlite2
359 (name "librasterlite2")
360 (version "1.1.0-beta1")
365 "https://www.gaia-gis.it/gaia-sins/librasterlite2-sources/"
366 "librasterlite2-" version ".tar.gz"))
369 "1x24gqp4hsq97c31ncwxblab0x0863q8v1z42jil7lvsq3glqa7p"))))
370 (build-system gnu-build-system)
393 (synopsis "Library to work with huge raster coverages using a SpatiaLite")
395 "librasterlite2 is a library that stores and retrieves huge raster
396 coverages using a SpatiaLite DBMS.")
397 (home-page "https://www.gaia-gis.it/fossil/librasterlite2/index")
398 ;; For the genuine librasterlite-sources holds:
399 ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked.
400 ;; Files under src/control_points are from GRASS
401 ;; and are licensed under GPL2+ only.
402 ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak.
403 ;; The tools supporting the library (both rl2tool and wmslite) are
404 ;; licensed under the GPL v3 (or any subsequent version) terms.
405 ;; The test/*.svg files are placed in the public domain, except for
406 ;; test/Car_Yellow.svg which is licensed under the Free Art License 1.3.
407 (license (list license:gpl2+
412 license:public-domain))))
414 (define-public librttopo
422 (url "https://git.osgeo.org/gitea/rttopo/librttopo")
423 (commit (string-append "librttopo-" version))))
424 (file-name (git-file-name name version))
426 (base32 "0h7lzlkn9g4xky6h81ndy0aa6dxz8wb6rnl8v3987jy1i6pr072p"))))
427 (build-system gnu-build-system)
430 (modify-phases %standard-phases
431 (add-after 'unpack 'patch-autogen
433 (let ((autoconf (which "autoconf"))
434 (autoheader (which "autoheader"))
435 (aclocal (which "aclocal"))
436 (automake (which "automake"))
437 (libtoolize (which "libtoolize")))
438 (substitute* "autogen.sh"
439 (("`which autoconf 2>/dev/null`") autoconf)
440 (("`which autoheader 2>/dev/null`") autoheader)
442 (string-append "ACLOCAL=" aclocal "\n"))
444 (string-append "AUTOMAKE=" automake "\n"))
446 (string-append "LIBTOOLIZE=" libtoolize "\n"))))
449 (list autoconf automake libtool pkg-config))
452 (synopsis "Library to handle SQL/MM topologies")
454 "The RT Topology Library exposes an API to create and manage standard
455 (ISO 13249 aka SQL/MM) topologies using user-provided data stores.")
456 (home-page "https://git.osgeo.org/gitea/rttopo/librttopo")
457 (license license:gpl2+)))
459 (define-public libspatialite
461 (name "libspatialite")
466 (uri (string-append "https://www.gaia-gis.it/gaia-sins/libspatialite-"
470 "164y82rw2lrp5glfc0rkn7n6xvx5dvlgmh7bb7815067251wkjzf"))))
471 (build-system gnu-build-system)
484 '("--enable-rttopo=yes")
486 (modify-phases %standard-phases
487 ;; 1 test is failing, ignore it:
488 (add-after 'unpack 'ignore-broken-tests
490 (substitute* '("test/Makefile.in")
491 (("check_wms\\$\\(EXEEXT\\) check_drop_rename\\$\\(EXEEXT\\) ")
492 "check_wms$(EXEEXT) ")))))))
493 (synopsis "Extend SQLite to support Spatial SQL capabilities")
495 "SpatiaLite is a library intended to extend the SQLite core to support
496 fully fledged Spatial SQL capabilities.")
497 (home-page "https://www.gaia-gis.it/fossil/libspatialite/index")
498 ;; For the genuine libspatialite-sources holds:
499 ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked.
500 ;; Files under src/control_points are from GRASS
501 ;; and are licensed under GPL2+ only.
502 ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak.
503 (license (list license:gpl2+
506 license:public-domain))))
515 (uri (string-append "http://download.osgeo.org/proj/proj-"
519 "050apzdn0isxpsblys1shrl9ccli5vd32kgswlgx1imrbwpg915k"))))
520 (build-system cmake-build-system)
522 `(#:configure-flags '("-DUSE_EXTERNAL_GTEST=ON")
524 (modify-phases %standard-phases
525 (add-after 'unpack 'fix-version
527 (substitute* "CMakeLists.txt"
528 (("MAJOR 7 MINOR 2 PATCH 0") "MAJOR 7 MINOR 2 PATCH 1")))))))
530 (list curl libjpeg-turbo libtiff sqlite))
532 (list googletest pkg-config))
533 (home-page "https://proj.org/")
534 (synopsis "Coordinate transformation software")
536 "Proj is a generic coordinate transformation software that transforms
537 geospatial coordinates from one @acronym{CRS, coordinate reference system}
538 to another. This includes cartographic projections as well as geodetic
539 transformations. Proj includes command line applications for easy
540 conversion of coordinates from text files or directly from user input.
541 In addition, Proj also exposes an application programming interface that
542 lets developers use the functionality of Proj in their own software.")
543 (license (list license:expat
544 ;; src/projections/patterson.cpp
546 ;; src/geodesic.*, src/tests/geodtest.cpp
549 (define-public proj.4
555 (uri (string-append "http://download.osgeo.org/proj/proj-"
559 "1xw5f427xk9p2nbsj04j6m5zyjlyd66sbvl2bkg8hd1kx8pm9139"))))
560 (build-system gnu-build-system)
563 (modify-phases %standard-phases
564 (add-after 'unpack 'patch-test-paths
566 (substitute* '("nad/test27"
572 (("/bin/rm") (which "rm")))
574 ;; Precision problems on i686 and other platforms. See:
575 ;; https://web.archive.org/web/20151006134301/http://trac.osgeo.org/proj/ticket/255
576 ;; Disable failing test.
577 (add-after 'patch-test-paths 'ignore-failing-tests
579 (substitute* '("nad/Makefile.in")
580 (("\tPROJ_LIB.*" all) (string-append "#" all)))
584 (home-page "https://proj.org/")
585 (synopsis "Cartographic Projections Library")
587 "Proj.4 is a library for converting coordinates between cartographic
589 (license (list license:expat
590 ;; src/PJ_patterson.c
594 ;; Embedded EPSG database.
595 (license:non-copyleft "http://www.epsg.org/TermsOfUse")
599 (define-public python-pyproj
601 (name "python-pyproj")
606 (uri (pypi-uri "pyproj" version))
609 "0xrqpy708qlyd7nqjra0dl7nvkqzaj9w0v7wq4j5pxazha9n14sa"))))
610 (build-system python-build-system)
613 (modify-phases %standard-phases
614 (add-after 'unpack 'set-proj-path
615 (lambda* (#:key inputs #:allow-other-keys)
616 (let ((proj (assoc-ref inputs "proj")))
617 (setenv "PROJ_DIR" proj)
618 (substitute* "pyproj/datadir.py"
619 (("(internal_datadir = ).*$" all var)
620 (string-append var "Path(\"" proj "/share/proj\")\n")))))))))
624 (list python-certifi))
626 (list python-cython python-numpy python-pandas python-pytest
628 (home-page "https://github.com/pyproj4/pyproj")
630 "Python interface to PROJ")
632 "This package provides a Python interface to PROJ, a cartographic
633 projections and coordinate transformations library.")
634 (license license:expat)))
636 (define-public python-fiona
638 (name "python-fiona")
643 (uri (pypi-uri "Fiona" version))
646 "0fql7i7dg1xpbadmk8d26dwp91v7faixxc4wq14zg0kvhp9041d7"))))
647 (build-system python-build-system)
650 (modify-phases %standard-phases
651 (add-before 'check 'remove-local-fiona
653 ; This would otherwise interfere with finding the installed
654 ; fiona when running tests.
655 (delete-file-recursively "fiona")))
657 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
658 (add-installed-pythonpath inputs outputs)
659 (setenv "GDAL_ENABLE_DEPRECATED_DRIVER_GTM" "YES")
662 "-m" "not network and not wheel"
663 ;; FIXME: Find why the
664 ;; test_no_append_driver_cannot_append[PCIDSK]
666 "-k" "not test_no_append_driver_cannot_append")))))))
680 (list gdal ; for gdal-config
685 (home-page "https://github.com/Toblerity/Fiona")
687 "Fiona reads and writes spatial data files")
689 "Fiona is GDAL’s neat and nimble vector API for Python programmers.
690 Fiona is designed to be simple and dependable. It focuses on reading
691 and writing data in standard Python IO style and relies upon familiar
692 Python types and protocols such as files, dictionaries, mappings, and
693 iterators instead of classes specific to OGR. Fiona can read and write
694 real-world data using multi-layered GIS formats and zipped virtual file
695 systems and integrates readily with other Python GIS packages such as
696 pyproj, Rtree, and Shapely.")
697 (license license:bsd-3)))
699 (define-public python-geopandas
701 (name "python-geopandas")
706 (uri (pypi-uri "geopandas" version))
709 "1nvim2i47ap1zdwy6kxydskf1cir5g4ij8124wvmrqij0zklggzg"))))
710 (build-system python-build-system)
713 (modify-phases %standard-phases
715 (lambda* (#:key tests? #:allow-other-keys)
718 ; Disable tests that fail due to incompatibilities
719 ; with our pandas version.
722 "not test_getitem_invalid"
723 " and not test_value_counts"
724 " and not test_setitem_invalid"
725 " and not test_insert_invalid")
726 ; Disable tests that require internet access.
727 "-m" "not web")))))))
729 (list python-fiona python-pandas python-pyproj python-shapely))
731 (list python-pytest))
732 (home-page "http://geopandas.org")
733 (synopsis "Geographic pandas extensions")
734 (description "The goal of GeoPandas is to make working with
735 geospatial data in Python easier. It combines the capabilities of
736 Pandas and Shapely, providing geospatial operations in Pandas and a
737 high-level interface to multiple geometries to Shapely. GeoPandas
738 enables you to easily do operations in Python that would otherwise
739 require a spatial database such as PostGIS.")
740 (license license:bsd-3)))
742 (define-public mapnik
749 (uri (string-append "https://github.com/mapnik/mapnik/releases/download/v"
750 version "/mapnik-v" version ".tar.bz2"))
753 "06frcikaj2mgz3abfk5h0z4j3hbksi0zikwjngbjv4p5f3pwxf8q"))))
754 (build-system scons-build-system)
772 `(#:scons ,scons-python2
775 (string-append "PREFIX=" %output)
776 (string-append "CUSTOM_LDFLAGS=-Wl,-rpath=" %output "/lib"))))
777 (home-page "https://mapnik.org/")
778 (synopsis "Toolkit for developing mapping applications")
779 (description "Mapnik is a toolkit for developing mapping applications. It
780 is basically a collection of geographic objects like maps, layers,
781 datasources, features, and geometries. At its core is a C++ shared library
782 providing algorithms and patterns for spatial data access and visualization.
783 The library does not rely on any specific windowing system and can be deployed
784 to any server environment. It is intended to play fair in a multi-threaded
785 environment and is aimed primarily, but not exclusively, at web-based
787 (license (list license:lgpl2.1+
788 ;; demo/viewer, demo/python/rundemo.py
790 ;; deps/boost, deps/mapbox, deps/agg/include/agg_conv_offset.h
792 ;; deps/mapnik/sparsehash
795 (license:non-copyleft "file://deps/agg/copying")))))
797 (define-public spatialite-gui
799 (name "spatialite-gui")
800 (version "2.1.0-beta1")
805 "https://www.gaia-gis.it/gaia-sins/spatialite-gui-sources/"
806 "spatialite_gui-" version ".tar.gz"))
808 (base32 "0cyv4cycl073p9lnnnglcb72qn71g8h9g5zn4gzw7swcy5nxjj5s"))))
809 (build-system gnu-build-system)
834 `(#:phases (modify-phases %standard-phases
835 (add-after 'unpack 'fix-gui
837 ;; Fix for the GUI not showing up.
838 (substitute* "Main.cpp"
839 (("Hide\\(\\);") ""))
841 (synopsis "Graphical user interface for SpatiaLite")
842 (description "Spatialite-gui provides a visual interface for viewing and
843 maintaining a spatialite database. You can easily see the structure of the
844 tables and data contents using point and click functions, many of which
845 construct common SQL queries, or craft your own SQL queries.")
846 (home-page "https://www.gaia-gis.it/fossil/spatialite_gui/index")
847 (license license:gpl3+)))
856 "http://download.osgeo.org/gdal/" version "/gdal-"
860 "0nk09lws1hk873yn5f4wzqfvr82gm4hw3gq8w9g1h0kvf6j5x4i8"))
861 (modules '((guix build utils)))
864 ;; TODO: frmts contains a lot more bundled code.
865 (for-each delete-file-recursively
870 "frmts/jpeg/libjpeg12"
871 "frmts/gtiff/libtiff"
872 "frmts/gtiff/libgeotiff"
874 "ogr/ogrsf_frmts/geojson/libjson"))))))
875 (build-system gnu-build-system)
879 (let-syntax ((with (syntax-rules ()
881 (string-append option "="
882 (assoc-ref %build-inputs input))))))
884 ;; TODO: --with-pcidsk, --with-pcraster
885 (with "--with-freexl" "freexl")
886 (with "--with-libjson-c" "json-c")
887 (with "--with-png" "libpng")
888 (with "--with-webp" "libwebp")
889 (with "--with-gif" "giflib")
890 (with "--with-jpeg" "libjpeg-turbo")
891 (with "--with-libtiff" "libtiff")
892 (with "--with-geotiff" "libgeotiff")
893 (with "--with-libz" "zlib")
894 (with "--with-expat" "expat")
895 (with "--with-sqlite3" "sqlite")
898 (modify-phases %standard-phases
899 (add-before 'build 'fix-path
901 (substitute* "frmts/mrf/mrf_band.cpp"
902 (("\"../zlib/zlib.h\"") "<zlib.h>")))))))
922 (home-page "https://gdal.org/")
923 (synopsis "Raster and vector geospatial data format library")
924 (description "GDAL is a translator library for raster and vector geospatial
925 data formats. As a library, it presents a single raster abstract data model
926 and single vector abstract data model to the calling application for all
927 supported formats. It also comes with a variety of useful command line
928 utilities for data translation and processing.")
932 ;; frmts/gtiff/tif_float.c, frmts/pcraster/libcsf,
933 ;; ogr/ogrsf_frmts/dxf/intronurbs.cpp, frmts/pdf/pdfdataset.cpp
936 ;; frmts/hdf4/hdf-eos/*
937 ;; similar to the expat license, but without guarantee exclusion
938 (license:non-copyleft "file://frmts/hdf4/hdf-eos/README")
939 ;; frmts/grib/degrib/
940 license:public-domain ; with guarantee exclusion
942 ;; Some bsd-inspired license
943 (license:non-copyleft "file://port/LICENCE_minizip")
944 ;; alg/internal_libqhull
945 ;; Some 5-clause license
946 (license:non-copyleft "file://alg/internal_libqhull/COPYING.txt")
950 (define-public python-gdal
951 (package (inherit gdal)
953 (build-system python-build-system)
955 '(#:tests? #f ; no tests
957 (modify-phases %standard-phases
958 (add-before 'build 'chdir
960 (chdir "swig/python")
967 (synopsis "GDAL (Geospatial Data Abstraction Library) python bindings")))
969 (define-public python-pyshp
971 (name "python-pyshp")
977 (url "https://github.com/GeospatialPython/pyshp")
979 (file-name (git-file-name name version))
981 (base32 "0jsraqzq82pw19wvx84x7w5cs8agr44a9b5y0jjw540wim4xa73r"))))
982 (build-system python-build-system)
985 (modify-phases %standard-phases
987 (lambda* (#:key tests? #:allow-other-keys)
989 ;; This is the only test file.
990 (invoke "python" "-m" "pytest" "test_shapefile.py")))))))
992 (list python-pytest python-pytest-runner))
993 (home-page "https://github.com/GeospatialPython/pyshp")
994 (synopsis "Read/write support for ESRI Shapefile format")
996 "The Python Shapefile Library (PyShp) reads and writes ESRI Shapefiles.")
997 (license license:expat)))
999 (define-public python-cartopy
1001 (name "python-cartopy")
1002 ;; This is a post-release fix that adds build_ext to setup.py.
1003 (version "0.19.0.post1")
1007 (uri (pypi-uri "Cartopy" version))
1009 (base32 "0xnm8z3as3hriivdfd26s6vn5b63gb46x6vxw6gh1mwfm5rlg2sb"))))
1010 (build-system python-build-system)
1013 (modify-phases %standard-phases
1015 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1017 (add-installed-pythonpath inputs outputs)
1018 (invoke "python" "-m" "pytest" "--pyargs" "cartopy"
1019 ;; These tests require online data.
1020 "-m" "not natural_earth and not network"
1021 ;; This one too but it's not marked as such.
1022 "-k" "not test_gridliner_labels_bbox_style")))))))
1024 (list python-matplotlib
1033 (list python-cython python-flufl-lock python-pytest))
1034 (home-page "https://scitools.org.uk/cartopy/docs/latest/")
1035 (synopsis "Cartographic library for visualisation")
1037 "Cartopy is a Python package designed to make drawing maps for data
1038 analysis and visualisation easy.
1043 @item object oriented projection definitions
1044 @item point, line, polygon and image transformations between projections
1045 @item integration to expose advanced mapping in Matplotlib with a simple and
1047 @item powerful vector data handling by integrating shapefile reading with
1048 Shapely capabilities
1050 (license license:lgpl3+)))
1052 (define-public postgis
1058 (uri (string-append "https://download.osgeo.org/postgis/source/postgis-"
1062 "0gl9d6xy2an82ldb9sixz5blyngjryq8m3509fr38ffawvfniazv"))))
1063 (build-system gnu-build-system)
1067 (list (string-append "datadir=" (assoc-ref %outputs "out") "/share")
1068 (string-append "docdir="(assoc-ref %outputs "out") "/share/doc")
1069 (string-append "pkglibdir="(assoc-ref %outputs "out") "/lib")
1070 (string-append "bindir=" (assoc-ref %outputs "out") "/bin"))
1072 (modify-phases %standard-phases
1073 (add-before 'build 'fix-install-path
1074 (lambda* (#:key outputs #:allow-other-keys)
1075 (substitute* '("raster/loader/Makefile" "raster/scripts/python/Makefile")
1076 (("\\$\\(DESTDIR\\)\\$\\(PGSQL_BINDIR\\)")
1077 (string-append (assoc-ref outputs "out") "/bin"))))))))
1090 (list perl pkg-config))
1091 (home-page "https://postgis.net")
1092 (synopsis "Spatial database extender for PostgreSQL")
1093 (description "PostGIS is a spatial database extender for PostgreSQL
1094 object-relational database. It adds support for geographic objects allowing
1095 location queries to be run in SQL. This package provides a PostgreSQL
1100 ;; loader/dbfopen, safileio.*, shapefil.h, shpopen.c
1103 license:public-domain
1105 license:bsd-3 ; files only say "BSD"
1107 license:cc-by-sa3.0))))
1109 (define-public tegola
1116 "https://github.com/go-spatial/tegola/archive/v"
1118 (file-name (string-append name "-" version ".tar.gz"))
1121 "09vnzxfn0r70kmd776kcdfqxhzdj11syxa0b27z4ci1k367v7viw"))))
1122 (build-system go-build-system)
1124 `(#:import-path "github.com/go-spatial/tegola/cmd/tegola"
1125 #:unpack-path "github.com/go-spatial/tegola"
1127 (modify-phases %standard-phases
1128 (add-before 'build 'set-version
1130 (with-directory-excursion "src/github.com/go-spatial/tegola"
1131 (substitute* '("cmd/tegola/cmd/root.go"
1132 "cmd/tegola_lambda/main.go")
1133 (("version not set") ,version)))
1135 (home-page "https://tegola.io")
1136 (synopsis "Vector tile server for maps")
1137 (description "Tegola is a free vector tile server written in Go. Tegola
1138 takes geospatial data and slices it into vector tiles that can be efficiently
1139 delivered to any client.")
1142 ;; Some packages in vendor have other licenses
1148 (define-public imposm3
1155 (uri (string-append "https://github.com/omniscale/imposm3/archive/v"
1157 (file-name (string-append name "-" version ".tar.gz"))
1160 "1w7b221z5k9254zn01imycxkyw62xigqizhwvrgxqmq1m9r5410l"))))
1161 (build-system go-build-system)
1163 `(#:import-path "github.com/omniscale/imposm3/cmd/imposm"
1164 #:unpack-path "github.com/omniscale/imposm3"
1166 (modify-phases %standard-phases
1167 (add-before 'build 'set-version
1169 (substitute* "src/github.com/omniscale/imposm3/version.go"
1170 (("0.0.0-dev") ,version))
1173 (list geos leveldb))
1174 (home-page "https://imposm.org/")
1175 (synopsis "OpenStreetMap importer for PostGIS")
1176 (description "Imposm is an importer for OpenStreetMap data. It reads PBF
1177 files and imports the data into PostgreSQL/PostGIS databases. It is designed
1178 to create databases that are optimized for rendering/tile/map-services.")
1181 ;; Some dependencies in vendor have different licenses
1186 (define-public libosmium
1194 (url "https://github.com/osmcode/libosmium")
1195 (commit (string-append "v" version))))
1196 (file-name (git-file-name name version))
1198 (base32 "0fh57mpii1ksacwfx5rz213j896aklib53jbybld2i517q2mmxr0"))))
1199 (build-system cmake-build-system)
1214 (home-page "https://osmcode.org/libosmium/")
1215 (synopsis "C++ library for working with OpenStreetMap data")
1216 (description "Libosmium is a fast and flexible C++ library for working with
1217 OpenStreetMap data.")
1218 (license license:boost1.0)))
1220 (define-public osmium-tool
1222 (name "osmium-tool")
1228 (url "https://github.com/osmcode/osmium-tool")
1229 (commit (string-append "v" version))))
1230 (file-name (git-file-name name version))
1232 (base32 "0zgyqyrs89vch0qnkh9m5xq079sr2wmydy5zz4l8xbysbjf6xry5"))
1233 (modules '((guix build utils)))
1235 ;; Remove bundled libraries.
1236 '(delete-file-recursively "include/rapidjson"))))
1237 (build-system cmake-build-system)
1243 (home-page "https://osmcode.org/osmium-tool/")
1244 (synopsis "Osmium command-line tool")
1245 (description "Command line tool for working with OpenStreetMap data
1246 based on the Osmium library.")
1247 (license license:gpl3+)))
1249 (define-public osm2pgsql
1257 (url "https://github.com/openstreetmap/osm2pgsql")
1259 (file-name (git-file-name name version))
1261 (base32 "0i18mskcs087dn3f3h9n7j0wafn8502m0h13mrjwin38xsz0crfj"))
1262 (modules '((guix build utils)))
1265 (delete-file-recursively "contrib/protozero")
1266 (delete-file-recursively "contrib/libosmium")
1268 (build-system cmake-build-system)
1270 `(#:tests? #f; tests fail because we need to setup a database
1272 (list (string-append "-DOSMIUM_INCLUDE_DIR="
1273 (assoc-ref %build-inputs "libosmium")
1275 (string-append "-DPROTOZERO_INCLUDE_DIR="
1276 (assoc-ref %build-inputs "protozero")
1289 (list python python-psycopg2))
1290 (home-page "https://github.com/openstreetmap/osm2pgsql")
1291 (synopsis "OSM data importer to postgresql")
1292 (description "Osm2pgsql is a tool for loading OpenStreetMap data into a
1293 PostgreSQL / PostGIS database suitable for applications like rendering into a
1294 map, geocoding with Nominatim, or general analysis.")
1295 (license license:gpl2+)))
1297 (define-public tippecanoe
1305 (url "https://github.com/mapbox/tippecanoe")
1307 (file-name (git-file-name name version))
1309 (base32 "0lbmhly4ivnqc6qk1k3sdqvsg6x3nfd8gnjx846bhqj4wag3f88m"))))
1310 (build-system gnu-build-system)
1313 (modify-phases %standard-phases (delete 'configure))
1314 #:test-target "test"
1316 (list (string-append "CC=" ,(cc-for-target))
1317 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1319 (list perl sqlite zlib))
1320 (home-page "https://github.com/mapbox/tippecanoe")
1321 (synopsis "Vector tile server for maps")
1322 (description "Tippecanoe creates scale-independent view of data, so that
1323 the texture and density of features is visible at every zoom level, instead of
1324 dropping features at lower levels.")
1325 (license license:bsd-2)))
1327 (define-public osmctools
1335 (url "https://gitlab.com/osm-c-tools/osmctools")
1337 (file-name (git-file-name name version))
1340 "1m8d3r1q1v05pkr8k9czrmb4xjszw6hvgsf3kn9pf0v14gpn4r8f"))))
1341 (build-system gnu-build-system)
1343 (list autoconf automake))
1346 (home-page "https://gitlab.com/osm-c-tools/osmctools")
1347 (synopsis "Tools to convert, filter and update OpenStreetMap data files")
1348 (description "This project contains a few tools which are used in the
1349 OpenStreetMap project. They can be used to convert, filter and update
1350 OpenStreetMap data files.")
1351 (license license:agpl3)))
1353 (define-public osm-gps-map
1355 (name "osm-gps-map")
1361 "https://github.com/nzjrs/osm-gps-map/releases/download/"
1362 version "/osm-gps-map-" version ".tar.gz"))
1365 "11imsf4cz1dpxdjh178k2s29axmq86rkfg1pqmn7incyxmjzhbwg"))))
1366 (build-system gnu-build-system)
1368 (list gnome-common gtk-doc/stable pkg-config))
1370 (list cairo glib gobject-introspection gtk+ libsoup-minimal-2))
1371 (home-page "https://nzjrs.github.io/osm-gps-map/")
1372 (synopsis "GTK+ widget for displaying OpenStreetMap tiles")
1374 "This package provides a GTK+ widget (and Python bindings) that when
1375 given GPS coordinates,draws a GPS track, and points of interest on a moving
1376 map display. Downloads map data from a number of websites, including
1377 @url{https://www.openstreetmap.org}.")
1378 (license license:gpl2+)))
1380 (define-public xygrib
1387 (url "https://github.com/opengribs/XyGrib")
1388 (commit (string-append "v" version))))
1389 (file-name (git-file-name name version))
1390 (patches (search-patches "xygrib-fix-finding-data.patch"))
1393 "0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia"))
1394 (modules '((guix build utils)))
1397 (delete-file-recursively "data/fonts")
1398 ;; Fixes compilation, can be removed with the next release.
1399 ;; Upstream link: https://github.com/opengribs/XyGrib/pull/255
1400 (substitute* "src/SkewT.h"
1401 (("QMessageBox>") "QMessageBox>\n#include <QPainterPath>"))
1403 (build-system cmake-build-system)
1405 `(#:configure-flags (list "-DGNU_PACKAGE=ON")
1408 (modify-phases %standard-phases
1409 (add-after 'unpack 'patch-directories
1410 (lambda* (#:key inputs #:allow-other-keys)
1411 (let ((jpeg (assoc-ref inputs "openjpeg"))
1412 (font (assoc-ref inputs "font-liberation")))
1413 (substitute* "CMakeLists.txt"
1414 ;; Skip looking for the static library.
1415 (("\"libnova.a\"") ""))
1416 ;; Don't use the bundled font-liberation.
1417 (substitute* "src/util/Font.cpp"
1418 (("Util::pathFonts\\(\\)\\+\"liberation-fonts/\"")
1419 (string-append "\"" font "/share/fonts/truetype/\"")))
1420 (substitute* "src/util/Util.h"
1421 (("pathData\\(\\)\\+\"data/fonts/\"")
1422 (string-append "\"" font "/share/fonts/\"")))))))
1423 #:tests? #f)) ; no tests
1435 (native-search-paths
1436 (list (search-path-specification
1437 (variable "XDG_DATA_DIRS")
1438 (files '("share")))))
1439 (synopsis "Weather Forecast Visualization")
1441 "XyGrib is a Grib file reader and visualizes meteorological data providing
1442 an off-line capability to analyse weather forecasts or hindcasts. It is
1443 intended to be used as a capable weather work station for anyone with a serious
1444 interest in examining weather. This would include members of the sailing
1445 community, private and sport aviators, farmers, weather buffs and many more.
1446 XyGrib is the continuation of the zyGrib software package with a new team of
1448 (home-page "https://opengribs.org")
1449 (license license:gpl3+)))
1451 (define-public libspatialindex
1453 (name "libspatialindex")
1458 (uri (string-append "https://github.com/libspatialindex/libspatialindex/"
1459 "releases/download/" version "/spatialindex-src-"
1460 version ".tar.bz2"))
1463 "02n5vjcyk04w0djidyp21hfbxfpbbara8ifd9nml6158rwqr8lja"))))
1464 (build-system cmake-build-system)
1465 (home-page "https://libspatialindex.org")
1466 (synopsis "Spatial indexing library")
1467 (description "The purpose of this library is to provide:
1470 @item An extensible framework that will support robust spatial indexing
1472 @item Support for sophisticated spatial queries. Range, point location,
1473 nearest neighbor and k-nearest neighbor as well as parametric queries (defined
1474 by spatial constraints) should be easy to deploy and run.
1475 @item Easy to use interfaces for inserting, deleting and updating information.
1476 @item Wide variety of customization capabilities. Basic index and storage
1477 characteristics like the page size, node capacity, minimum fan-out, splitting
1478 algorithm, etc. should be easy to customize.
1479 @item Index persistence. Internal memory and external memory structures
1480 should be supported. Clustered and non-clustered indices should be easy to be
1484 (license license:expat)))
1486 (define-public python-rtree
1488 (name "python-rtree")
1493 (uri (pypi-uri "Rtree" version))
1495 (base32 "0gna530vy6rh76035cqh7i2lx199cvxjrzjczg9rm6k96k5751xy"))))
1496 (build-system python-build-system)
1499 (modify-phases %standard-phases
1500 (add-after 'unpack 'find-libspatialindex
1501 (lambda* (#:key inputs #:allow-other-keys)
1502 (setenv "SPATIALINDEX_C_LIBRARY"
1503 (string-append (assoc-ref inputs "libspatialindex")
1504 "/lib/libspatialindex.so"))))
1506 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1508 (add-installed-pythonpath inputs outputs)
1509 (invoke "python" "-m" "pytest")))))))
1511 (list python-numpy python-pytest python-wheel))
1513 (list libspatialindex))
1514 (home-page "https://github.com/Toblerity/rtree")
1515 (synopsis "R-Tree spatial index for Python GIS")
1517 "RTree is a Python package with bindings for @code{libspatialindex}.")
1518 (license license:expat)))
1520 (define-public java-jmapviewer
1522 (name "java-jmapviewer")
1526 (uri (string-append "https://svn.openstreetmap.org/applications/"
1527 "viewer/jmapviewer/releases/" version
1528 "/JMapViewer-" version "-Source.zip"))
1531 "0sy6r5fkbb9bclw0is6gwnbzz627m7pjfnsqydxz58pbndakkhrv"))))
1532 (build-system ant-build-system)
1536 `(#:build-target "pack"
1537 #:tests? #f; No tests
1539 (modify-phases %standard-phases
1540 (add-before 'build 'clean
1542 (invoke "ant" "clean")))
1544 (lambda* (#:key outputs #:allow-other-keys)
1545 (let ((dir (string-append (assoc-ref outputs "out") "/share/java/")))
1547 (copy-file "JMapViewer.jar" (string-append dir "JMapViewer.jar"))
1549 (home-page "https://wiki.openstreetmap.org/wiki/JMapViewer")
1550 (synopsis "OSM map integration in Java")
1551 (description "JMapViewer is a Java component which easily
1552 integrates an OSM map view into your Java application. It is maintained as
1553 an independent project by the JOSM team.")
1554 (license license:gpl2)))
1556 (define-public java-opening-hours-parser
1558 (name "java-opening-hours-parser")
1563 (url "https://github.com/simonpoole/OpeningHoursParser")
1565 (file-name (git-file-name name version))
1568 "0yhbd2ix6h506aljh0jkrnp28m4xcqdcdpnqm30fn08kawdgxgsh"))))
1569 (build-system ant-build-system)
1571 `(#:jar-name "java-opening-hours-parser.jar"
1572 #:source-dir "src/main/java"
1574 (modify-phases %standard-phases
1575 (add-before 'build 'copy-resources
1577 (copy-recursively "src/main/resources" "build/classes")
1579 (add-before 'build 'generate-parser
1581 (let* ((dir "src/main/java/ch/poole/openinghoursparser")
1582 (file (string-append dir "/OpeningHoursParser.jj")))
1583 (invoke "javacc" "-DEBUG_PARSER=false"
1584 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1585 "-GRAMMAR_ENCODING=UTF-8"
1586 (string-append "-OUTPUT_DIRECTORY=" dir)
1590 (list java-jetbrains-annotations))
1592 (list javacc java-junit java-hamcrest-core))
1593 (home-page "https://github.com/simonpoole/OpeningHoursParser")
1594 (synopsis "Java parser for the OpenStreetMap opening hour format")
1595 (description "This is a very simplistic parser for string values according
1596 to the OSM opening hours specification.")
1597 (license license:expat)))
1606 (url "https://josm.openstreetmap.de/svn/trunk")
1607 (revision (string->number version))
1611 "0j7fhzh6hs2b5r1a3d1xpy6f5r6q1kh79bck28raang8ldd754c6"))
1612 (file-name (string-append name "-" version "-checkout"))
1613 (modules '((guix build utils)))
1616 (for-each delete-file (find-files "." ".*.jar$"))
1618 (build-system ant-build-system)
1622 (list java-commons-jcs
1623 java-commons-compress
1626 java-jsonp-impl ; runtime dependency
1628 java-metadata-extractor
1629 java-opening-hours-parser
1632 java-svg-salamander))
1635 #:jar-name "josm.jar"
1637 (modify-phases %standard-phases
1638 (add-after 'unpack 'rm-build.xml
1640 (delete-file "build.xml")
1642 (add-before 'build 'fix-revision
1644 (with-output-to-file "REVISION.XML"
1647 (string-append "<info><entry><commit revision=\"" ,version "\">"
1648 "<date>1970-01-01 00:00:00 +0000</date>"
1649 "</commit></entry></info>"))))
1651 (add-before 'build 'fix-jcs
1653 ;; This version of JOSM uses an unreleased version of commons-jcs,
1654 ;; which has renamed its classes to another namespace. Rename them
1655 ;; back so they can be used with our version of jcs.
1656 (substitute* (find-files "." ".*.java$")
1658 (("ICache.NAME_COMPONENT_DELIMITER") "\":\""))
1660 (add-before 'build 'fix-classpath
1661 (lambda* (#:key inputs #:allow-other-keys)
1666 (let ((source (assoc-ref inputs "source")))
1667 (not (equal? (substring s 0 (string-length source))
1669 (string-split (getenv "CLASSPATH") #\:))
1672 (add-before 'build 'generate-parser
1674 (let* ((dir "src/org/openstreetmap/josm/gui/mappaint/mapcss")
1675 (out (string-append dir "/parsergen"))
1676 (file (string-append dir "/MapCSSParser.jj")))
1677 (mkdir-p "src/org/openstreetmap/josm/gui/mappaint/mapcss/parsergen")
1678 (invoke "javacc" "-DEBUG_PARSER=false"
1679 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1680 "-GRAMMAR_ENCODING=UTF-8"
1681 (string-append "-OUTPUT_DIRECTORY=" out)
1684 (add-after 'build 'generate-epsg
1686 (system* "javac" "scripts/BuildProjectionDefinitions.java"
1687 "-cp" "build/classes")
1688 (mkdir-p "data/projection")
1689 (with-output-to-file "data/projection/custom-epsg"
1690 (lambda _ (display "")))
1691 (invoke "java" "-cp" "build/classes:scripts:."
1692 "BuildProjectionDefinitions" ".")
1694 (add-after 'generate-epsg 'copy-resources
1696 (copy-recursively "resources" "build/classes")
1698 (add-before 'install 'regenerate-jar
1700 ;; We need to regenerate the jar file to add data.
1701 (delete-file "build/jar/josm.jar")
1702 (invoke "jar" "-cf" "build/jar/josm.jar" "-C"
1703 "build/classes" ".")
1705 (add-before 'build 'copy-revision
1707 (mkdir-p "build/classes")
1708 (with-output-to-file "build/classes/REVISION"
1711 (string-append "Revision: " ,version "\n"
1712 "Is-Local-Build: true\n"
1713 "Build-Date: 1970-01-01 00:00:00 +0000\n"))))
1715 (add-after 'install 'install-share-directories
1716 (lambda* (#:key outputs #:allow-other-keys)
1717 (let ((out (assoc-ref outputs "out"))
1718 (share-directories '("applications" "icons" "man" "menu"
1719 "metainfo" "mime" "pixmaps"))
1720 (desktop "org.openstreetmap.josm.desktop"))
1721 (for-each (lambda (directory)
1722 (copy-recursively (string-append
1723 "native/linux/tested/usr/share/"
1726 out "/share/" directory)))
1728 (substitute* (string-append out "/share/applications/" desktop)
1729 (("josm-MainApplication") "josm-gui-MainApplication")))
1731 (add-after 'install 'install-bin
1732 (lambda* (#:key outputs inputs #:allow-other-keys)
1733 (let* ((out (assoc-ref outputs "out"))
1734 (bin (string-append out "/bin")))
1736 (with-output-to-file (string-append bin "/josm")
1739 (string-append "#!/bin/sh\n"
1740 (assoc-ref inputs "jdk") "/bin/java"
1741 " -cp " out "/share/java/josm.jar:"
1742 (getenv "CLASSPATH")
1743 " org.openstreetmap.josm.gui.MainApplication"))))
1744 (chmod (string-append bin "/josm") #o755))
1746 (home-page "https://josm.openstreetmap.de")
1747 (synopsis "OSM editor")
1748 (description "JOSM is an extensible editor for OpenStreetMap (OSM). It
1749 supports loading GPX tracks, background imagery and OSM data from local
1750 sources as well as from online sources and allows editing the OSM data (nodes,
1751 ways, and relations) and their metadata tags.")
1752 (license license:gpl2+)))
1754 (define-public libmaxminddb
1756 (name "libmaxminddb")
1761 (uri (string-append "https://github.com/maxmind/libmaxminddb"
1762 "/releases/download/" version "/"
1763 "/libmaxminddb-" version ".tar.gz"))
1765 (base32 "0fd4a4sxiiwzbd5h74wl1ijnb7xybjyybb7q41vdq3w8nk3zdzd5"))))
1766 (build-system gnu-build-system)
1769 (list ,(string-append "CC=" (cc-for-target)))))
1772 (home-page "https://maxmind.github.io/libmaxminddb/")
1773 (synopsis "C library for the MaxMind DB file format")
1774 (description "The libmaxminddb library provides a C library for reading
1775 MaxMind DB files, including the GeoIP2 databases from MaxMind. The MaxMind DB
1776 format is a custom, but open, binary format designed to facilitate fast
1777 lookups of IP addresses while allowing flexibility in the type of data
1778 associated with an address.")
1779 (license license:asl2.0)))
1781 (define-public python-maxminddb
1783 (name "python-maxminddb")
1788 (uri (pypi-uri "maxminddb" version))
1791 "0y9giw81k4wdmpryr4k42w50z292mf364a6vs1vxf83ksc9ig6j4"))))
1792 (build-system python-build-system)
1794 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1796 (list libmaxminddb))
1797 (home-page "https://www.maxmind.com/")
1798 (synopsis "Reader for the MaxMind DB format")
1799 (description "MaxMind DB is a binary file format that stores data indexed
1800 by IP address subnets (IPv4 or IPv6). This is a Python module for reading
1802 (license license:asl2.0)))
1804 (define-public python-geoip2
1806 (name "python-geoip2")
1811 (uri (pypi-uri "geoip2" version))
1814 "1w7cay5q6zawjzivqbwz5cqx1qbdjw6kbriccb7l46p7b39fkzzp"))))
1815 (build-system python-build-system)
1817 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1819 (list python-maxminddb python-requests))
1820 (home-page "https://www.maxmind.com/")
1821 (synopsis "MaxMind GeoIP2 API")
1822 (description "Provides an API for the GeoIP2 web services and databases.
1823 The API also works with MaxMind’s free GeoLite2 databases.")
1824 (license license:asl2.0)))
1826 (define-public routino
1833 (uri (string-append "http://www.routino.org/download/routino-"
1836 (base32 "1xa7l2bjn832nk6bc7b481nv8hd2gj41jwhg0d2qy10lqdvjpn5b"))))
1837 (build-system gnu-build-system)
1841 (list bzip2 xz zlib))
1843 `(#:test-target "test"
1845 (modify-phases %standard-phases
1847 (lambda* (#:key outputs #:allow-other-keys)
1848 (substitute* "Makefile.conf"
1849 (("prefix=/usr/local")
1850 (string-append "prefix=" (assoc-ref outputs "out")))
1851 (("LDFLAGS_LDSO=-Wl,-R\\.")
1852 "LDFLAGS_LDSO=-Wl,-R$(libdir)")
1853 (("#CFLAGS\\+=-DUSE_XZ")
1855 (("#LDFLAGS\\+=-llzma")
1858 (synopsis "Routing application for OpenStreetMap data")
1860 "Routino is an application for finding a route between two points
1861 using the dataset of topographical information collected by
1862 @url{https://www.OpenStreetMap.org}.")
1863 (home-page "https://www.routino.org/")
1864 (license license:agpl3+)))
1866 (define-public qmapshack
1874 (url "https://github.com/Maproom/qmapshack")
1875 (commit (string-append "V_" version))))
1876 (file-name (git-file-name name version))
1878 (base32 "184fqmsfzr3b333ssizjk6gvv7mncmygq8dj5r7rsvs5md26z2ys"))))
1879 (build-system qt-build-system)
1881 (list pkg-config qttools))
1893 sqlite ; See wrap phase
1898 (modify-phases %standard-phases
1899 (add-after 'unpack 'fix-cmake-modules
1900 (lambda* (#:key inputs #:allow-other-keys)
1901 (substitute* "CMakeLists.txt"
1902 (("find_package\\(Qt5PrintSupport REQUIRED\\)" all)
1903 (string-append all "\nfind_package(Qt5Positioning REQUIRED)")))
1904 (substitute* "cmake/Modules/FindROUTINO.cmake"
1906 (assoc-ref inputs "routino"))))))))
1907 (synopsis "GPS mapping application")
1909 "QMapShack can be used to plan your next outdoor trip or to visualize and
1910 archive all the GPS recordings of your past trips. It is the successor of the
1911 QLandkarte GT application.")
1912 (home-page "https://github.com/Maproom/qmapshack/wiki")
1913 (license license:gpl3+)))
1915 (define-public readosm
1922 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1923 "readosm-" version ".tar.gz"))
1925 (base32 "0igif2bxf4dr82glxz9gyx5mmni0r2dsnx9p9k6pxv3c4lfhaz6v"))))
1926 (build-system gnu-build-system)
1929 (synopsis "Data extractor for OpenStreetMap files")
1931 "ReadOSM is a library to extract valid data from within an OpenStreetMap
1932 input file (in @code{.osm} or @code{.osm.pbf} format).")
1933 (home-page "https://www.gaia-gis.it/fossil/readosm/index")
1934 (license (list license:gpl2+
1938 (define-public shapelib
1946 (url "https://github.com/OSGeo/shapelib")
1947 (commit (string-append "v" version))))
1948 (file-name (git-file-name name version))
1950 (base32 "1lzch0jf6yqhw391phhafzw4ghmiz98zkf698h4fmq109fa2vhqd"))))
1951 (build-system gnu-build-system)
1953 (list autoconf automake libtool))
1954 (home-page "http://shapelib.maptools.org/")
1955 (synopsis "Provides C library to write and update ESRI Shapefiles")
1957 "The Shapefile C Library provides the ability to write simple C programs
1958 for reading, writing and updating (to a limited extent) ESRI Shapefiles, and the
1959 associated attribute file (@file{.dbf}).")
1960 (license license:gpl2+)))
1962 (define-public spatialite-tools
1964 (name "spatialite-tools")
1969 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1970 "spatialite-tools-" version ".tar.gz"))
1972 (base32 "070p6pg541wvwb28wkn7k0z1qdyirik2qc2jpj4pf0vzx02w414n"))))
1973 (build-system gnu-build-system)
1987 (synopsis "Collection of command line tools for SpatiaLite")
1989 "@code{spatialite-tools} is a collection of Command Line Interface (CLI)
1990 tools supporting SpatiaLite.")
1991 (home-page "https://www.gaia-gis.it/fossil/spatialite-tools/index")
1992 (license license:gpl3+)))
1994 (define-public virtualpg
2001 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
2002 "virtualpg-" version ".tar.gz"))
2004 (base32 "12z0l7368r4116ljzg7nljy5hf425r11vxc540w79wlzikmynamy"))))
2005 (build-system gnu-build-system)
2007 (list postgresql sqlite))
2008 (synopsis "Allow SQLite/SpatiaLite to access PostgreSQL/PostGIS tables")
2010 "VirtualPG is a dynamic extension for the SQLite DBMS. It implements
2011 the VirtualPostgres driver, allowing to directly exchange data between SQLite
2012 and PostgreSQL; if SpatiaLite is available even PostGIS geometries can be
2013 exchanged form one Spatial DBMS and the other.")
2014 (home-page "https://www.gaia-gis.it/fossil/virtualpg/index")
2015 (license (list license:gpl2+
2019 (define-public opencpn
2027 (url "https://github.com/OpenCPN/OpenCPN")
2028 (commit (string-append "Release_" version))))
2029 (file-name (git-file-name name version))
2031 (base32 "0g5x45wv3djfjmigk6kgs0i63yp8rs1fbmm4pb15wb3z6dml624y"))))
2032 (build-system cmake-build-system)
2034 `(("gettext" ,gettext-minimal)
2035 ("pkg-config" ,pkg-config)))
2062 `(#:configure-flags '("-DOCPN_USE_BUNDLED_LIBS=OFF"
2063 "-DOCPN_ENABLE_PORTAUDIO=ON"
2064 "-DOCPN_ENABLE_SNDFILE=ON"
2065 "-DOCPN_BUNDLE_TCDATA=ON"
2066 "-DOCPN_BUNDLE_GSHHS=ON")
2067 #:tests? #f ; No tests defined
2069 (modify-phases %standard-phases
2070 (add-after 'unpack 'fix-build
2071 (lambda* (#:key inputs #:allow-other-keys)
2072 (substitute* "CMakeLists.txt"
2075 (("\"/bin/sh\" \"-c\"")
2076 (string-append "\"" (which "bash") "\" \"-c\""))
2077 (("include\\(TargetSetup\\)")
2078 "set(PKG_TARGET \"guix\")\nset(PKG_TARGET_VERSION 1)")))))))
2079 (synopsis "Chart plotter and marine GPS navigation software")
2081 "OpenCPN is a chart plotter and marine navigation software designed to be
2082 used at the helm station of your boat while underway. Chart a course and
2083 track your position right from your laptop.")
2084 (home-page "https://opencpn.org/")
2085 (license (list license:asl2.0
2096 (define-public openorienteering-mapper
2098 (name "openorienteering-mapper")
2103 (url "https://github.com/OpenOrienteering/mapper")
2104 (commit (string-append "v" version))))
2105 (file-name (git-file-name name version))
2108 "11b578h8f3q9yvphbjhqmy2w1cfc9skslzawypqmc3k44v24aj0s"))))
2109 (build-system cmake-build-system)
2114 "-DLICENSING_PROVIDER:BOOL=OFF"
2115 "-DMapper_MANUAL_QTHELP:BOOL=OFF")))
2117 `(("clipper" ,clipper)
2121 ("qtbase" ,qtbase-5)
2122 ("qtimageformats" ,qtimageformats)
2123 ("qtlocation" ,qtlocation)
2124 ("qtsensors" ,qtsensors)
2127 `(("doxygen" ,doxygen)
2128 ("qttools" ,qttools)))
2129 (home-page "https://www.openorienteering.org/apps/mapper/")
2130 (synopsis "OpenOrienteering Mapper (OOM)")
2132 "OpenOrienteering Mapper is a software for creating maps for the
2133 orienteering sport.")
2134 (license license:gpl3+)))
2136 (define-public grass
2137 (let* ((version "7.8.6")
2138 (majorminor (string-join (list-head (string-split version #\.) 2) ""))
2139 (grassxx (string-append "grass" majorminor)))
2146 (uri (string-append "https://grass.osgeo.org/" grassxx
2147 "/source/grass-" version ".tar.gz"))
2149 (base32 "1glk74ly3j0x8ymn4jp73s6y8qv7p3g5nv4gvb6l9qqplyq1fpnq"))))
2150 (build-system gnu-build-system)
2155 ("freetype" ,freetype)
2161 ("libtiff" ,libtiff)
2163 ("mariadb-dev" ,mariadb "dev")
2164 ("mariadb-lib" ,mariadb "lib")
2166 ("openblas" ,openblas)
2168 ("postgresql" ,postgresql)
2171 ("python-dateutil" ,python-dateutil)
2172 ("python-numpy" ,python-numpy)
2173 ("python-wxpython" ,python-wxpython)
2174 ("readline" ,readline)
2176 ("wxwidgets" ,wxwidgets)
2178 ("zstd" ,zstd "lib")))
2180 `(("bash" ,bash-minimal)
2183 ("pkg-config" ,pkg-config)))
2185 `(#:tests? #f ; No tests
2186 #:modules ((guix build gnu-build-system)
2187 ((guix build python-build-system) #:prefix python:)
2189 #:imported-modules (,@%gnu-build-system-modules
2190 (guix build python-build-system))
2192 (modify-phases %standard-phases
2194 (lambda* (#:key inputs outputs #:allow-other-keys)
2195 (let ((shell (search-input-file inputs "/bin/bash")))
2196 (setenv "SHELL" shell)
2197 (setenv "CONFIG_SHELL" shell)
2198 (setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl,"
2199 (assoc-ref outputs "out")
2200 "/" ,grassxx "/lib")))
2201 (invoke "./configure"
2202 (string-append "--prefix="
2203 (assoc-ref outputs "out"))
2206 (string-append "--with-freetype-includes="
2207 (assoc-ref inputs "freetype")
2208 "/include/freetype2")
2209 (string-append "--with-freetype-libs="
2210 (assoc-ref inputs "freetype")
2215 (string-append "--with-mysql-includes="
2216 (assoc-ref inputs "mariadb-dev")
2218 (string-append "--with-mysql-libs="
2219 (assoc-ref inputs "mariadb-lib")
2223 (string-append "--with-proj-share="
2224 (assoc-ref inputs "proj")
2229 "--with-wxwidgets")))
2230 (add-after 'install 'install-links
2231 (lambda* (#:key outputs #:allow-other-keys)
2232 ;; Put links for includes and libraries in the standard places.
2233 (let* ((out (assoc-ref outputs "out"))
2234 (dir (string-append out "/" ,grassxx)))
2235 (symlink (string-append dir "/include")
2236 (string-append out "/include"))
2237 (symlink (string-append dir "/lib")
2238 (string-append out "/lib")))
2240 (add-after 'install-links 'python:wrap
2241 (assoc-ref python:%standard-phases 'wrap))
2242 (add-after 'python:wrap 'wrap-with-python-interpreter
2243 (lambda* (#:key outputs #:allow-other-keys)
2244 (let ((out (assoc-ref outputs "out")))
2245 (wrap-program (string-append out "/bin/" ,grassxx)
2246 `("GRASS_PYTHON" = (,(which "python3"))))
2248 (synopsis "GRASS Geographic Information System")
2250 "GRASS (Geographic Resources Analysis Support System), is a Geographic
2251 Information System (GIS) software suite used for geospatial data management and
2252 analysis, image processing, graphics and maps production, spatial modeling, and
2254 (home-page "https://grass.osgeo.org/")
2255 (license license:gpl2+))))
2264 (uri (string-append "mirror://sourceforge/saga-gis/SAGA%20-%20"
2265 (version-major version) "/SAGA%20-%20" version
2266 "/saga-" version ".tar.gz"))
2268 (base32 "1n051yxxkylly0k9rlkx2ih3j2lf9d4csg00sm7161r7nhjvggd1"))))
2269 (build-system gnu-build-system)
2271 (list pkg-config swig))
2289 '(#:configure-flags '("--enable-python")))
2290 (synopsis "System for Automated Geoscientific Analyses")
2292 "SAGA (System for Automated Geoscientific Analyses) is a Geographic
2293 Information System (GIS) software. It has been designed for an easy and
2294 effective implementation of spatial algorithms and it offers a comprehensive,
2295 growing set of geoscientific methods.")
2296 (home-page "http://www.saga-gis.org")
2297 (license (list license:gpl2+ license:lgpl2.1+))))
2306 (uri (string-append "https://qgis.org/downloads/qgis-"
2307 version ".tar.bz2"))
2309 (base32 "012dv8dcg7w4lf6k37i41wialwhi0kpkxw2dnq19yqqk35632mzx"))))
2310 (build-system cmake-build-system)
2312 `(#:modules ((guix build cmake-build-system)
2313 ((guix build python-build-system) #:prefix python:)
2314 (guix build qt-utils)
2316 #:imported-modules (,@%cmake-build-system-modules
2317 (guix build python-build-system)
2318 (guix build qt-utils))
2320 '("-DWITH_QTWEBKIT=NO")
2322 (modify-phases %standard-phases
2323 ;; Configure correct path to PyQt5 SIP directory
2324 (add-after 'unpack 'configure-pyqt5-sip-path
2325 (lambda* (#:key inputs #:allow-other-keys)
2326 (substitute* "cmake/FindPyQt5.py"
2327 (("sip_dir = cfg.default_sip_dir")
2328 (string-append "sip_dir = \""
2329 (assoc-ref inputs "python-pyqt+qscintilla")
2331 ;; Fix building with python-sip@5.
2333 ;; The reason for this is that python-sip@5 introduces some
2334 ;; changes such as a new build system 'sip-build' as well as the
2335 ;; use of the path "/lib/pythonX.X/site-packages/*/bindings/"
2336 ;; instead of "/share/sip/" for .sip files. However, we do not
2337 ;; actually use that those yet. QGIS detects SIP5 and assumes we
2338 ;; are, messing up the build. The long term solution is to fully
2339 ;; upgrade SIP, use sip-build and fix all failing packages, but
2340 ;; for now I just want to get the build working.
2341 ((".pyqt_sip_dir...os.path.join.*,")
2342 (string-append "'pyqt_sip_dir': \""
2343 (assoc-ref inputs "python-pyqt+qscintilla")
2344 "/share/sip" "\",")))
2345 (substitute* (list "scripts/prepare_commit.sh"
2346 "scripts/qstringfixup.sh"
2347 "scripts/release.pl"
2348 "scripts/runtests_local_travis_config.sh"
2349 "scripts/sip_include.sh"
2351 "scripts/sipify_all.sh"
2352 "scripts/spell_check/check_spelling.sh"
2353 "scripts/spell_check/spell_test.sh"
2354 "scripts/verify_indentation.sh"
2355 "tests/code_layout/test_banned_keywords.sh"
2356 "tests/code_layout/test_licenses.sh"
2357 "tests/code_layout/test_shellcheck.sh"
2358 "tests/code_layout/test_sip_include.sh"
2359 "tests/code_layout/test_sipfiles.sh"
2360 "tests/code_layout/test_sipify.sh")
2361 (("\\$\\(git rev-parse --show-toplevel\\)")
2363 (substitute* "tests/code_layout/test_sip_include.sh"
2364 (("^REV=.*") "REV=currentrev\n"))
2367 (lambda* (#:key inputs tests? #:allow-other-keys)
2369 (setenv "HOME" "/tmp")
2370 (system "Xvfb :1 &")
2371 (setenv "DISPLAY" ":1")
2372 (setenv "TRAVIS" "true")
2373 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
2376 '(;; Disable tests that require network access
2377 "qgis_filedownloader"
2378 ;; TODO: Find why the following tests fail
2379 "ProcessingGdalAlgorithmsRasterTest"
2380 "ProcessingGdalAlgorithmsVectorTest"
2381 "ProcessingGrass7AlgorithmsImageryTest"
2382 "ProcessingGrass7AlgorithmsRasterTest"
2383 "ProcessingGrass7AlgorithmsVectorTest"
2384 "ProcessingOtbAlgorithmsTest"
2385 "ProcessingQgisAlgorithmsTestPt1"
2386 "ProcessingQgisAlgorithmsTestPt2"
2387 "ProcessingQgisAlgorithmsTestPt3"
2388 "ProcessingQgisAlgorithmsTestPt4"
2392 "PyQgsAuthBasicMethod"
2393 "PyQgsAuthenticationSystem"
2394 "PyQgsAuxiliaryStorage"
2395 "PyQgsDBManagerGpkg"
2396 "PyQgsDBManagerSpatialite"
2398 "PyQgsFieldValidator"
2402 "PyQgsImportIntoPostGIS"
2403 "PyQgsLayerDependencies"
2404 "PyQgsLayerMetadata"
2406 "PyQgsLayoutExporter"
2409 "PyQgsLayoutMapGrid"
2413 "PyQgsOGRProviderGpkg"
2414 "PyQgsOapifProvider"
2415 "PyQgsPalLabelingLayout"
2417 "PyQgsProviderConnectionGpkg"
2418 "PyQgsProviderConnectionPostgres"
2419 "PyQgsProviderConnectionSpatialite"
2420 "PyQgsPythonProvider"
2422 "PyQgsRulebasedRenderer"
2423 "PyQgsSelectiveMasking"
2425 "PyQgsShapefileProvider"
2426 "PyQgsSpatialiteProvider"
2428 "PyQgsSymbolExpressionVariables"
2430 "PyQgsVectorFileWriter"
2432 "PyQgsVectorLayerUtils"
2433 "PyQgsVirtualLayerProvider"
2435 "qgis_arcgisrestutilstest"
2436 "qgis_authmanagertest"
2437 "qgis_compositionconvertertest"
2438 "qgis_coordinatereferencesystemtest"
2439 "qgis_expressiontest"
2440 "qgis_fontmarkertest"
2441 "qgis_geometrycheckstest"
2443 "qgis_gpsinformationwidget"
2444 "qgis_grassprovidertest7"
2445 "qgis_imagecachetest"
2446 "qgis_labelingenginetest"
2447 "qgis_layouthtmltest"
2448 "qgis_layoutlabeltest"
2449 "qgis_layoutmanualtabletest"
2450 "qgis_layoutmapgridtest"
2451 "qgis_layoutmaptest"
2452 "qgis_layoutmultiframetest"
2453 "qgis_layoutpicturetest"
2454 "qgis_layouttabletest"
2456 "qgis_mapdevicepixelratiotest"
2457 "qgis_maprendererjobtest"
2458 "qgis_ogrproviderguitest"
2459 "qgis_painteffecttest"
2460 "qgis_pallabelingtest"
2461 "qgis_processingtest"
2462 "qgis_rasterlayertest"
2468 "qgis_svgmarkertest"
2469 "qgis_taskmanagertest"
2470 "qgis_wcsprovidertest"
2471 "qgis_ziplayertest")
2473 (add-after 'install 'wrap-python
2474 (assoc-ref python:%standard-phases 'wrap))
2475 (add-after 'wrap-python 'wrap-qt
2476 (lambda* (#:key outputs inputs #:allow-other-keys)
2477 (let ((out (assoc-ref outputs "out")))
2478 (wrap-qt-program "qgis" #:output out #:inputs inputs))
2480 (add-after 'wrap-qt 'wrap-gis
2481 (lambda* (#:key inputs outputs #:allow-other-keys)
2482 ;; TODO: Find if there is a way to get SAGA to work.
2483 ;; Currently QGIS says "version of SAGA not supported".
2484 ;; Disable it for now.
2485 (let* ((out (assoc-ref outputs "out"))
2486 ;;(saga (string-append (assoc-ref inputs "saga") "/bin"))
2487 (grass-version ,(package-version grass))
2488 (grass-majorminor (string-join
2490 (string-split grass-version #\.) 2)
2492 (grass (string-append (assoc-ref inputs "grass")
2493 "/grass" grass-majorminor)))
2494 (wrap-program (string-append out "/bin/qgis")
2495 ;;`("PATH" ":" prefix (,saga))
2496 `("QGIS_PREFIX_PATH" = (,out))
2497 `("GISBASE" = (,grass))))
2526 python-pyqt+qscintilla
2554 xorg-server-for-tests))
2555 (home-page "https://qgis.org")
2556 (synopsis "Geographical information system")
2557 (description "QGIS is an easy to use Geographical Information
2558 System (GIS). It is a GIS data viewer and editor. QGIS supports a number of
2559 raster and vector data formats, with new support easily added using the plugin
2572 (license:fsdg-compatible "https://www.deviantart.com/elvensword")
2573 (license:fsf-free "file://debian/copyright" "Go Squared")
2577 "https://www.deviantart.com/webgoddess/art/Reddish-Inspired-Gradients-42208824")
2579 "file://debian/copyright"
2580 "QT-Commercial or LGPL-2.1 with Digia Qt LGPL Exception 1.1 or GPL-3")
2590 (license:non-copyleft "file://debian/copyright" "BSD-like-gist")
2591 (license:non-copyleft "file://debian/copyright" "Jim Mossman Attribution")
2592 (license:non-copyleft
2593 "https://www.ncl.ucar.edu/Download/NCL_source_license.shtml"
2594 "NCL Source Code License")
2597 license:public-domain
2600 (define-public python-geographiclib
2602 (name "python-geographiclib")
2607 (uri (pypi-uri "geographiclib" version))
2610 "0cn6ap5fkh3mkfa57l5b44z3gvz7j6lpmc9rl4g2jny2gvp4dg8j"))))
2611 (build-system python-build-system)
2612 (home-page "https://geographiclib.sourceforge.io/1.50/python/")
2613 (synopsis "Python geodesic routines from GeographicLib")
2615 "This is a python implementation of the geodesic routines in GeographicLib.")
2616 (license license:expat)))
2618 (define-public python-geopy
2620 (name "python-geopy")
2625 (uri (pypi-uri "geopy" version))
2628 "0fx0cv0kgbvynpmjgsvq2fpsyngd5idiscdn8pd5201f1ngii3mq"))))
2629 (build-system python-build-system)
2631 (list python-geographiclib))
2633 (list python-async-generator
2638 python-pytest-aiohttp
2639 python-readme-renderer
2641 (home-page "https://github.com/geopy/geopy")
2642 (synopsis "Geocoding library for Python")
2643 (description "@code{geopy} is a Python client for several popular geocoding
2644 web services. @code{geopy} makes it easy for Python developers to locate the
2645 coordinates of addresses, cities, countries, and landmarks across the globe
2646 using third-party geocoders and other data sources.")
2647 (license license:expat)))
2649 (define-public gplates
2655 (uri "https://www.earthbyte.org/download/8421/")
2656 (file-name (string-append name "-" version ".tar.bz2"))
2659 "0lrcmcxc924ixddii8cyglqlwwxvk7f00g4yzbss5i3fgcbh8n96"))))
2660 (build-system cmake-build-system)
2662 `(#:configure-flags (list "-DBoost_NO_BOOST_CMAKE=ON")
2663 #:tests? #f)) ;no test target
2674 ("python-3" ,python-3)
2675 ("python-numpy" ,python-numpy)
2678 ("qtxmlpatterns" ,qtxmlpatterns)
2681 (home-page "https://www.gplates.org")
2682 (synopsis "Plate tectonics simulation program")
2683 (description "GPlates is a plate tectonics program. Manipulate
2684 reconstructions of geological and paleogeographic features through geological
2685 time. Interactively visualize vector, raster and volume data.")
2686 (license license:gpl2+)))