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, 2022 Marius Bakke <marius@gnu.org>
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, 2022 Nikolay Korotkiy <sikmir@disroot.org>
21 ;;; Copyright © 2022 Roman Scherer <roman.scherer@burningswell.com>
22 ;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
24 ;;; This file is part of GNU Guix.
26 ;;; GNU Guix is free software; you can redistribute it and/or modify it
27 ;;; under the terms of the GNU General Public License as published by
28 ;;; the Free Software Foundation; either version 3 of the License, or (at
29 ;;; your option) any later version.
31 ;;; GNU Guix is distributed in the hope that it will be useful, but
32 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
33 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34 ;;; GNU General Public License for more details.
36 ;;; You should have received a copy of the GNU General Public License
37 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39 (define-module (gnu packages geo)
40 #:use-module (guix build-system ant)
41 #:use-module (guix build-system cmake)
42 #:use-module (guix build-system glib-or-gtk)
43 #:use-module (guix build-system gnu)
44 #:use-module (guix build-system go)
45 #:use-module (guix build-system meson)
46 #:use-module (guix build-system python)
47 #:use-module (guix build-system qt)
48 #:use-module (guix build-system scons)
49 #:use-module (guix build-system r)
50 #:use-module (guix gexp)
51 #:use-module (guix download)
52 #:use-module (guix git-download)
53 #:use-module (guix svn-download)
54 #:use-module ((guix licenses) #:prefix license:)
55 #:use-module (guix packages)
56 #:use-module (guix utils)
57 #:use-module (gnu packages)
58 #:use-module (gnu packages algebra)
59 #:use-module (gnu packages astronomy)
60 #:use-module (gnu packages audio)
61 #:use-module (gnu packages autotools)
62 #:use-module (gnu packages backup)
63 #:use-module (gnu packages bash)
64 #:use-module (gnu packages bison)
65 #:use-module (gnu packages boost)
66 #:use-module (gnu packages build-tools)
67 #:use-module (gnu packages check)
68 #:use-module (gnu packages cmake)
69 #:use-module (gnu packages compression)
70 #:use-module (gnu packages cpp)
71 #:use-module (gnu packages cups)
72 #:use-module (gnu packages curl)
73 #:use-module (gnu packages databases)
74 #:use-module (gnu packages datastructures)
75 #:use-module (gnu packages docbook)
76 #:use-module (gnu packages documentation)
77 #:use-module (gnu packages elf)
78 #:use-module (gnu packages flex)
79 #:use-module (gnu packages fonts)
80 #:use-module (gnu packages fontutils)
81 #:use-module (gnu packages gettext)
82 #:use-module (gnu packages gl)
83 #:use-module (gnu packages glib)
84 #:use-module (gnu packages gnome)
85 #:use-module (gnu packages gps)
86 #:use-module (gnu packages graphics)
87 #:use-module (gnu packages gtk)
88 #:use-module (gnu packages haskell-apps)
89 #:use-module (gnu packages haskell-xyz)
90 #:use-module (gnu packages image)
91 #:use-module (gnu packages image-processing)
92 #:use-module (gnu packages icu4c)
93 #:use-module (gnu packages java)
94 #:use-module (gnu packages kde)
95 #:use-module (gnu packages libusb)
96 #:use-module (gnu packages linux)
97 #:use-module (gnu packages lua)
98 #:use-module (gnu packages maths)
99 #:use-module (gnu packages multiprecision)
100 #:use-module (gnu packages pcre)
101 #:use-module (gnu packages pdf)
102 #:use-module (gnu packages perl)
103 #:use-module (gnu packages photo)
104 #:use-module (gnu packages pkg-config)
105 #:use-module (gnu packages pretty-print)
106 #:use-module (gnu packages protobuf)
107 #:use-module (gnu packages pulseaudio)
108 #:use-module (gnu packages python)
109 #:use-module (gnu packages python-build)
110 #:use-module (gnu packages python-check)
111 #:use-module (gnu packages python-crypto)
112 #:use-module (gnu packages python-science)
113 #:use-module (gnu packages python-web)
114 #:use-module (gnu packages python-xyz)
115 #:use-module (gnu packages qt)
116 #:use-module (gnu packages readline)
117 #:use-module (gnu packages swig)
118 #:use-module (gnu packages sqlite)
119 #:use-module (gnu packages textutils)
120 #:use-module (gnu packages time)
121 #:use-module (gnu packages tls)
122 #:use-module (gnu packages web)
123 #:use-module (gnu packages webkit)
124 #:use-module (gnu packages wxwidgets)
125 #:use-module (gnu packages xml)
126 #:use-module (gnu packages xorg))
135 "https://code.mpimet.mpg.de/attachments/download/26823/cdo-"
139 "1khdbd5cmnn7qm6hcqg4md5wbq14fs6brrns8b3g18diqgqvpvpd"))))
140 (build-system gnu-build-system)
142 (list #:configure-flags
143 #~(list (string-append "--with-netcdf="
144 #$(this-package-input "netcdf")))))
149 (home-page "https://code.mpimet.mpg.de/projects/cdo")
150 (synopsis "Climate data operators")
151 (description "@acronym{CDO, Climate Data Operators} is a collection of command-line
152 operators to manipulate and analyse climate and NWP model data. Supported
153 data formats are GRIB 1/2, netCDF 3/4, SERVICE, EXTRA and IEG. There are more
154 than 600 operators available.")
155 (license license:bsd-3)))
157 (define-public memphis
166 (url "https://github.com/jiuka/memphis")
168 (file-name (git-file-name name version))
170 (base32 "068c3943pgbpfjq44pmvn5fmkh005ak5aa67vvrq3fn487c6w54q"))))
171 (build-system glib-or-gtk-build-system)
172 (outputs '("out" "doc"))
179 (string-append "--with-html-dir="
180 (assoc-ref %outputs "doc")
181 "/share/gtk-doc/html"))
183 (modify-phases %standard-phases
184 (add-after 'unpack 'patch-autogen
186 (substitute* "autogen.sh"
187 (("\\./configure \"\\$@\"")
190 (add-after 'patch-autogen 'patch-docbook-xml
191 (lambda* (#:key inputs #:allow-other-keys)
192 (with-directory-excursion "docs/reference"
193 (substitute* "libmemphis-docs.sgml"
194 (("http://www.oasis-open.org/docbook/xml/4.3/")
195 (string-append (assoc-ref inputs "docbook-xml")
196 "/xml/dtd/docbook/"))))
199 `(("autoconf" ,autoconf)
200 ("automake" ,automake)
201 ("docbook-xml" ,docbook-xml-4.3)
202 ("gobject-introspection" ,gobject-introspection)
203 ("gtk-doc" ,gtk-doc/stable)
205 ("pkg-config" ,pkg-config)
206 ("python" ,python-wrapper)
213 (synopsis "Map-rendering for OpenSteetMap")
214 (description "Memphis is a map-rendering application and a library for
215 OpenStreetMap written in C using eXpat, Cairo and GLib.")
216 (home-page "http://trac.openstreetmap.ch/trac/memphis/")
217 (license license:lgpl2.1+)))
225 (uri (string-append "http://download.osgeo.org/geos/geos-"
230 "12l59pxawyizmc4wn20dvjn7aifqwkim4ysmc78h91mayjmqravr"))))
231 (build-system cmake-build-system)
232 (arguments `(#:phases
233 (modify-phases %standard-phases
235 'unpack 'patch-test-shebangs
237 (substitute* '("tests/xmltester/testrunner.sh"
238 "tests/geostest/testrunner.sh")
239 (("/bin/sh") (which "sh"))))))))
242 (home-page "https://libgeos.org/")
243 (synopsis "Geometry Engine for Geographic Information Systems")
245 "GEOS provides a spatial object model and fundamental geometric
246 functions. It is a C++ port of the Java Topology Suite (JTS). As such,
247 it aims to contain the complete functionality of JTS in C++. This
248 includes all the OpenGIS Simple Features for SQL spatial predicate
249 functions and spatial operators, as well as specific JTS enhanced
250 topology functions.")
251 (license (list license:lgpl2.1+ ; Main distribution.
252 license:zlib ; tests/xmltester/tinyxml/*
253 license:public-domain)))) ; include/geos/timeval.h
255 (define-public gnome-maps
258 (version "43.0") ;for libsoup 3 support
261 (uri (string-append "mirror://gnome/sources/" name "/"
262 (version-major version) "/"
263 name "-" version ".tar.xz"))
266 "1r1l6ajs6zz316m8zac5r0l3qgdv616xh376bfn2fflcnz7wys08"))))
267 (build-system meson-build-system)
273 #~(modify-phases %standard-phases
274 (add-after 'unpack 'skip-cache-and-database-updates
276 (substitute* "meson.build"
277 (("([a-z_]*): true" all option)
278 (cond ; cond rather than match saves an import
279 ((member option '("gtk_update_icon_cache"
280 "update_desktop_database"))
281 (string-append option ": false"))
283 (add-after 'unpack 'patch-dbus-service
285 (substitute* "data/org.gnome.Maps.service.in"
286 (("@pkgdatadir@/org.gnome.Maps")
287 (string-append #$output "/bin/gnome-maps")))))
288 (add-after 'install 'wrap
290 (wrap-program (string-append #$output "/bin/gnome-maps")
291 `("GI_TYPELIB_PATH" ":" prefix (,(getenv "GI_TYPELIB_PATH")))))))))
293 (list gettext-minimal
295 gobject-introspection
299 evolution-data-server
306 gnome-online-accounts
307 gsettings-desktop-schemas
318 pango-next ;TODO: remove when it's the default
321 (synopsis "Graphical map viewer and wayfinding program")
322 (description "GNOME Maps is a graphical map viewer. It uses map data from
323 the OpenStreetMap project. It can provide directions for walking, bicycling,
325 (home-page "https://wiki.gnome.org/Apps/Maps")
326 (license license:gpl2+)))
328 (define-public libgeotiff
335 (uri (string-append "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-"
338 (base32 "1mjmgv48x51ppax5dnb6lq7z600czxll53bx6jbzqwd4m93i7aq5"))
339 (modules '((guix build utils)))
342 ;; Remove .csv files, distributed from EPSG under a restricted
343 ;; license. See LICENSE for full license text.
344 (for-each delete-file (find-files "." "\\.csv$"))
346 (build-system gnu-build-system)
348 (list libjpeg-turbo libtiff zlib))
350 (list ;; libgeotiff headers include proj headers, so ensure those are available.
354 (list "--disable-static"
355 "--with-zlib" "--with-jpeg"
356 (string-append "--with-libtiff=" (assoc-ref %build-inputs "libtiff")))))
357 (synopsis "Library for handling GeoTIFF (geographic enabled TIFF)")
358 (description "libgeotiff is a library on top of libtiff for reading and
359 writing GeoTIFF information tags.")
360 (home-page "https://trac.osgeo.org/geotiff/")
361 ;; This is a mixture of various contributions under different licenses.
362 ;; Note that the EPSG database is NOT "free to use" as the LICENSE file
363 ;; states, as its commercial redistribution is restricted. Hence, we have
364 ;; removed it from the package.
365 (license (list license:public-domain
368 (license:non-copyleft "file://LICENSE"
369 "See LICENSE in the distribution.")))))
371 (define-public librasterlite2
373 (name "librasterlite2")
374 (version "1.1.0-beta1")
379 "https://www.gaia-gis.it/gaia-sins/librasterlite2-sources/"
380 "librasterlite2-" version ".tar.gz"))
383 "1x24gqp4hsq97c31ncwxblab0x0863q8v1z42jil7lvsq3glqa7p"))))
384 (build-system gnu-build-system)
407 (synopsis "Library to work with huge raster coverages using a SpatiaLite")
409 "librasterlite2 is a library that stores and retrieves huge raster
410 coverages using a SpatiaLite DBMS.")
411 (home-page "https://www.gaia-gis.it/fossil/librasterlite2/index")
412 ;; For the genuine librasterlite-sources holds:
413 ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked.
414 ;; Files under src/control_points are from GRASS
415 ;; and are licensed under GPL2+ only.
416 ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak.
417 ;; The tools supporting the library (both rl2tool and wmslite) are
418 ;; licensed under the GPL v3 (or any subsequent version) terms.
419 ;; The test/*.svg files are placed in the public domain, except for
420 ;; test/Car_Yellow.svg which is licensed under the Free Art License 1.3.
421 (license (list license:gpl2+
426 license:public-domain))))
428 (define-public librttopo
436 (url "https://git.osgeo.org/gitea/rttopo/librttopo")
437 (commit (string-append "librttopo-" version))))
438 (file-name (git-file-name name version))
440 (base32 "0h7lzlkn9g4xky6h81ndy0aa6dxz8wb6rnl8v3987jy1i6pr072p"))))
441 (build-system gnu-build-system)
444 (modify-phases %standard-phases
445 (add-after 'unpack 'patch-autogen
447 (let ((autoconf (which "autoconf"))
448 (autoheader (which "autoheader"))
449 (aclocal (which "aclocal"))
450 (automake (which "automake"))
451 (libtoolize (which "libtoolize")))
452 (substitute* "autogen.sh"
453 (("`which autoconf 2>/dev/null`") autoconf)
454 (("`which autoheader 2>/dev/null`") autoheader)
456 (string-append "ACLOCAL=" aclocal "\n"))
458 (string-append "AUTOMAKE=" automake "\n"))
460 (string-append "LIBTOOLIZE=" libtoolize "\n"))))
463 (list autoconf automake libtool pkg-config))
466 (synopsis "Library to handle SQL/MM topologies")
468 "The RT Topology Library exposes an API to create and manage standard
469 (ISO 13249 aka SQL/MM) topologies using user-provided data stores.")
470 (home-page "https://git.osgeo.org/gitea/rttopo/librttopo")
471 (license license:gpl2+)))
473 (define-public libspatialite
475 (name "libspatialite")
480 (uri (string-append "https://www.gaia-gis.it/gaia-sins/libspatialite-"
484 "164y82rw2lrp5glfc0rkn7n6xvx5dvlgmh7bb7815067251wkjzf"))))
485 (build-system gnu-build-system)
498 '("--enable-rttopo=yes")
499 ;; FIXME: Several tests fail with Proj 9.
502 (modify-phases %standard-phases
503 ;; 1 test is failing, ignore it:
504 (add-after 'unpack 'ignore-broken-tests
506 (substitute* '("test/Makefile.in")
507 (("check_wms\\$\\(EXEEXT\\) check_drop_rename\\$\\(EXEEXT\\) ")
508 "check_wms$(EXEEXT) ")))))))
509 (synopsis "Extend SQLite to support Spatial SQL capabilities")
511 "SpatiaLite is a library intended to extend the SQLite core to support
512 fully fledged Spatial SQL capabilities.")
513 (home-page "https://www.gaia-gis.it/fossil/libspatialite/index")
514 ;; For the genuine libspatialite-sources holds:
515 ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked.
516 ;; Files under src/control_points are from GRASS
517 ;; and are licensed under GPL2+ only.
518 ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak.
519 (license (list license:gpl2+
522 license:public-domain))))
531 (uri (string-append "http://download.osgeo.org/proj/proj-"
535 "0593vd9sac0c98j1f4rammd90d4xnhygbr6d49i8il6ajjdj7cl1"))))
536 (build-system cmake-build-system)
537 (native-inputs (list googletest pkg-config))
538 (propagated-inputs (list curl libtiff sqlite)) ;required by proj.pc
539 (home-page "https://proj.org/")
540 (synopsis "Coordinate transformation software")
542 "Proj is a generic coordinate transformation software that transforms
543 geospatial coordinates from one @acronym{CRS, coordinate reference system}
544 to another. This includes cartographic projections as well as geodetic
545 transformations. Proj includes command line applications for easy
546 conversion of coordinates from text files or directly from user input.
547 In addition, Proj also exposes an application programming interface that
548 lets developers use the functionality of Proj in their own software.")
549 (license (list license:expat
550 ;; src/projections/patterson.cpp
552 ;; src/geodesic.*, src/tests/geodtest.cpp
555 ; This is the last version of proj that provides the old proj.4 API.
556 (define-public proj-7
557 (package (inherit proj)
562 (uri (string-append "http://download.osgeo.org/proj/proj-"
566 "050apzdn0isxpsblys1shrl9ccli5vd32kgswlgx1imrbwpg915k"))))
568 `(#:configure-flags '("-DUSE_EXTERNAL_GTEST=ON")
570 (modify-phases %standard-phases
571 (add-after 'unpack 'fix-version
573 (substitute* "CMakeLists.txt"
574 (("MAJOR 7 MINOR 2 PATCH 0") "MAJOR 7 MINOR 2 PATCH 1")))))))))
576 (define-public proj.4
582 (uri (string-append "http://download.osgeo.org/proj/proj-"
586 "1xw5f427xk9p2nbsj04j6m5zyjlyd66sbvl2bkg8hd1kx8pm9139"))))
587 (build-system gnu-build-system)
590 (modify-phases %standard-phases
591 (add-after 'unpack 'patch-test-paths
593 (substitute* '("nad/test27"
599 (("/bin/rm") (which "rm")))
601 ;; Precision problems on i686 and other platforms. See:
602 ;; https://web.archive.org/web/20151006134301/http://trac.osgeo.org/proj/ticket/255
603 ;; Disable failing test.
604 (add-after 'patch-test-paths 'ignore-failing-tests
606 (substitute* '("nad/Makefile.in")
607 (("\tPROJ_LIB.*" all) (string-append "#" all)))
611 (home-page "https://proj.org/")
612 (synopsis "Cartographic Projections Library")
614 "Proj.4 is a library for converting coordinates between cartographic
616 (license (list license:expat
617 ;; src/PJ_patterson.c
621 ;; Embedded EPSG database.
622 (license:non-copyleft "http://www.epsg.org/TermsOfUse")
626 (define-public python-pyproj
628 (name "python-pyproj")
633 (uri (pypi-uri "pyproj" version))
636 "1gjg63irs44djyqbp9gg7s02d0y5i9cd1a83phyzp5fcj56y3n5k"))))
637 (build-system python-build-system)
640 (modify-phases %standard-phases
641 (add-after 'unpack 'set-proj-path
642 (lambda* (#:key inputs #:allow-other-keys)
643 (let ((proj (assoc-ref inputs "proj")))
644 (setenv "PROJ_DIR" proj)
645 (substitute* "pyproj/datadir.py"
646 (("(internal_datadir = ).*$" all var)
647 (string-append var "Path(\"" proj "/share/proj\")\n")))))))))
651 (list python-certifi))
653 (list python-cython python-numpy python-pandas python-pytest
655 (home-page "https://github.com/pyproj4/pyproj")
657 "Python interface to PROJ")
659 "This package provides a Python interface to PROJ, a cartographic
660 projections and coordinate transformations library.")
661 (license license:expat)))
663 (define-public python-fiona
665 (name "python-fiona")
670 (uri (pypi-uri "Fiona" version))
673 "0fql7i7dg1xpbadmk8d26dwp91v7faixxc4wq14zg0kvhp9041d7"))))
674 (build-system python-build-system)
677 (modify-phases %standard-phases
678 (add-before 'check 'remove-local-fiona
680 ; This would otherwise interfere with finding the installed
681 ; fiona when running tests.
682 (delete-file-recursively "fiona")))
684 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
685 (add-installed-pythonpath inputs outputs)
686 (setenv "GDAL_ENABLE_DEPRECATED_DRIVER_GTM" "YES")
689 "-m" "not network and not wheel"
690 ;; FIXME: Find why the
691 ;; test_no_append_driver_cannot_append[PCIDSK]
693 "-k" "not test_no_append_driver_cannot_append")))))))
707 (list gdal ; for gdal-config
712 (home-page "https://github.com/Toblerity/Fiona")
714 "Fiona reads and writes spatial data files")
716 "Fiona is GDAL’s neat and nimble vector API for Python programmers.
717 Fiona is designed to be simple and dependable. It focuses on reading
718 and writing data in standard Python IO style and relies upon familiar
719 Python types and protocols such as files, dictionaries, mappings, and
720 iterators instead of classes specific to OGR. Fiona can read and write
721 real-world data using multi-layered GIS formats and zipped virtual file
722 systems and integrates readily with other Python GIS packages such as
723 pyproj, Rtree, and Shapely.")
724 (license license:bsd-3)))
726 (define-public python-geopandas
728 (name "python-geopandas")
733 (uri (pypi-uri "geopandas" version))
736 "1nvim2i47ap1zdwy6kxydskf1cir5g4ij8124wvmrqij0zklggzg"))))
737 (build-system python-build-system)
740 (modify-phases %standard-phases
742 (lambda* (#:key tests? #:allow-other-keys)
745 ; Disable tests that fail due to incompatibilities
746 ; with our pandas version.
749 "not test_getitem_invalid"
750 " and not test_value_counts"
751 " and not test_setitem_invalid"
752 " and not test_insert_invalid")
753 ; Disable tests that require internet access.
754 "-m" "not web")))))))
756 (list python-fiona python-pandas python-pyproj python-shapely))
758 (list python-pytest))
759 (home-page "http://geopandas.org")
760 (synopsis "Geographic pandas extensions")
761 (description "The goal of GeoPandas is to make working with
762 geospatial data in Python easier. It combines the capabilities of
763 Pandas and Shapely, providing geospatial operations in Pandas and a
764 high-level interface to multiple geometries to Shapely. GeoPandas
765 enables you to easily do operations in Python that would otherwise
766 require a spatial database such as PostGIS.")
767 (license license:bsd-3)))
769 (define-public python-osmnx
771 (name "python-osmnx")
775 ; Fetch from github as the pypi package is missing the tests dir.
778 (url "https://github.com/gboeing/osmnx")
779 (commit (string-append "v" version))))
780 (file-name (git-file-name name version))
782 (base32 "1n8qjn184p5a2s3j6x6iyc1i7p3l3xnbqqxm6ajwgwv6j5fw1d5a"))))
783 (build-system python-build-system)
786 (modify-phases %standard-phases
788 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
790 (add-installed-pythonpath inputs outputs)
791 ; TODO: Disable network tests
792 (invoke "pytest" "tests"
795 ;; The following tests require network access.
796 "not test_geocode_to_gdf"
797 " and not test_stats"
798 " and not test_osm_xml"
799 " and not test_elevation"
800 " and not test_routing"
801 " and not test_plots"
802 " and not test_find_nearest"
803 " and not test_api_endpoints"
804 " and not test_graph_save_load"
805 " and not test_graph_from_functions"
806 " and not test_geometries"))))))))
819 (list python-numpy python-pytest))
820 (home-page "https://github.com/gboeing/osmnx")
822 "Retrieve, model, analyze, and visualize OpenStreetMap street networks")
824 "OSMnx is a Python library that lets you download geospatial data
825 from OpenStreetMap and model, project, visualize, and analyze real-world
826 street networks and any other geospatial geometries. You can download
827 and model walkable, drivable, or bikeable urban networks with a single
828 line of Python code then easily analyze and visualize them. You can
829 just as easily download and work with other infrastructure types,
830 amenities/points of interest, building footprints, elevation data,
831 street bearings/orientations, and speed/travel time.")
832 (license license:expat)))
834 (define-public mapnik
835 ;; There hasn't been a release since early 2021, and it fails to build with
837 (let ((commit "81103491b467e17218140f50bc0bb9dc8c1f0317")
841 (version (git-version "3.1.0" revision commit))
846 (url "https://github.com/mapnik/mapnik")
848 ;; TODO: Un-bundle mapbox dependencies (not yet packaged).
849 (recursive? #t))) ;for mapbox dependencies and test data
850 (file-name (git-file-name name version))
852 (base32 "094nam57bdd5nak88qy33z2p3kjahk3vk2nk56m5jkcr5d3hlnx2"))))
853 (build-system qt-build-system)
856 #:cmake cmake ;for FIND_PACKAGE_ARGS
858 #~(list (string-append "-DCMAKE_CXX_FLAGS=-I"
859 #$(this-package-native-input "catch2")
862 #~(modify-phases %standard-phases
863 (add-after 'unpack 'use-system-catch2
865 (substitute* "test/CMakeLists.txt"
866 (("GIT_TAG.*v2.13.7" all)
867 (string-append all "\n"
868 " FIND_PACKAGE_ARGS NAMES Catch2"))
869 (("^include.*Catch2_SOURCE_DIR.*contrib/Catch.cmake.*")
870 "include(Catch)\n"))))
871 (add-after 'unpack 'disable-problematic-tests
873 ;; The 'ogr' test fails for unknown reasons. Mark it as
874 ;; expected to fail (see:
875 ;; https://github.com/mapnik/mapnik/issues/4329).
876 (substitute* "test/unit/datasource/ogr.cpp"
877 (("TEST_CASE\\(\"ogr\"" all)
878 (string-append all ", \"[!shouldfail]\""))))))))
898 (home-page "https://mapnik.org/")
899 (synopsis "Toolkit for developing mapping applications")
900 (description "Mapnik is a toolkit for developing mapping applications. It
901 is basically a collection of geographic objects like maps, layers,
902 datasources, features, and geometries. At its core is a C++ shared library
903 providing algorithms and patterns for spatial data access and visualization.
904 The library does not rely on any specific windowing system and can be deployed
905 to any server environment. It is intended to play fair in a multi-threaded
906 environment and is aimed primarily, but not exclusively, at web-based
908 (license (list license:lgpl2.1+
909 ;; demo/viewer, demo/python/rundemo.py
911 ;; deps/boost, deps/mapbox, deps/agg/include/agg_conv_offset.h
913 ;; deps/mapnik/sparsehash
916 (license:non-copyleft "file://deps/agg/copying"))))))
918 (define-public spatialite-gui
920 (name "spatialite-gui")
921 (version "2.1.0-beta1")
926 "https://www.gaia-gis.it/gaia-sins/spatialite-gui-sources/"
927 "spatialite_gui-" version ".tar.gz"))
929 (base32 "0cyv4cycl073p9lnnnglcb72qn71g8h9g5zn4gzw7swcy5nxjj5s"))))
930 (build-system gnu-build-system)
955 `(#:phases (modify-phases %standard-phases
956 (add-after 'unpack 'fix-gui
958 ;; Fix for the GUI not showing up.
959 (substitute* "Main.cpp"
960 (("Hide\\(\\);") ""))
962 (synopsis "Graphical user interface for SpatiaLite")
963 (description "Spatialite-gui provides a visual interface for viewing and
964 maintaining a spatialite database. You can easily see the structure of the
965 tables and data contents using point and click functions, many of which
966 construct common SQL queries, or craft your own SQL queries.")
967 (home-page "https://www.gaia-gis.it/fossil/spatialite_gui/index")
968 (license license:gpl3+)))
977 "http://download.osgeo.org/gdal/" version "/gdal-"
981 "1l93q7xf6qx9ck5axfkf3ygmvclxkvrjd8x00ckn7j0d0750ci3w"))
982 (modules '((guix build utils)))
985 ;; TODO: frmts contains a lot more bundled code.
986 (for-each delete-file-recursively
991 "frmts/jpeg/libjpeg12"
992 "frmts/gtiff/libtiff"
993 "frmts/gtiff/libgeotiff"
995 "ogr/ogrsf_frmts/geojson/libjson"))))))
996 (build-system cmake-build-system)
1000 (list "-DGDAL_USE_INTERNAL_LIBS=WHEN_NO_EXTERNAL"
1001 "-DGDAL_USE_JPEG12_INTERNAL=OFF")))
1024 (home-page "https://gdal.org/")
1025 (synopsis "Raster and vector geospatial data format library")
1026 (description "GDAL is a translator library for raster and vector geospatial
1027 data formats. As a library, it presents a single raster abstract data model
1028 and single vector abstract data model to the calling application for all
1029 supported formats. It also comes with a variety of useful command line
1030 utilities for data translation and processing.")
1034 ;; frmts/gtiff/tif_float.c, frmts/pcraster/libcsf,
1035 ;; ogr/ogrsf_frmts/dxf/intronurbs.cpp, frmts/pdf/pdfdataset.cpp
1038 ;; frmts/hdf4/hdf-eos/*
1039 ;; similar to the expat license, but without guarantee exclusion
1040 (license:non-copyleft "file://frmts/hdf4/hdf-eos/README")
1041 ;; frmts/grib/degrib/
1042 license:public-domain ; with guarantee exclusion
1043 ;; port/cpl_minizip*
1044 ;; Some bsd-inspired license
1045 (license:non-copyleft "file://port/LICENCE_minizip")
1046 ;; alg/internal_libqhull
1047 ;; Some 5-clause license
1048 (license:non-copyleft "file://alg/internal_libqhull/COPYING.txt")
1049 ;; frmts/mrf/libLERC
1052 (define-public python-gdal
1053 (package (inherit gdal)
1054 (name "python-gdal")
1055 (build-system python-build-system)
1057 '(#:tests? #f ; no tests
1059 (modify-phases %standard-phases
1060 (add-before 'build 'chdir
1062 (chdir "swig/python")
1066 (list python-numpy))
1069 (synopsis "GDAL (Geospatial Data Abstraction Library) python bindings")))
1071 (define-public python-pyshp
1073 (name "python-pyshp")
1079 (url "https://github.com/GeospatialPython/pyshp")
1081 (file-name (git-file-name name version))
1083 (base32 "0jsraqzq82pw19wvx84x7w5cs8agr44a9b5y0jjw540wim4xa73r"))))
1084 (build-system python-build-system)
1087 (modify-phases %standard-phases
1089 (lambda* (#:key tests? #:allow-other-keys)
1091 ;; This is the only test file.
1092 (invoke "python" "-m" "pytest" "test_shapefile.py")))))))
1094 (list python-pytest python-pytest-runner))
1095 (home-page "https://github.com/GeospatialPython/pyshp")
1096 (synopsis "Read/write support for ESRI Shapefile format")
1098 "The Python Shapefile Library (PyShp) reads and writes ESRI Shapefiles.")
1099 (license license:expat)))
1101 (define-public python-cartopy
1103 (name "python-cartopy")
1104 ;; This is a post-release fix that adds build_ext to setup.py.
1109 (uri (pypi-uri "Cartopy" version))
1111 (base32 "01lhnkhw22jp6hnrs5qvgkq4fqcni2sx7ydiyv8w8xxx5wpglq0d"))))
1112 (build-system python-build-system)
1115 (modify-phases %standard-phases
1117 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1119 (add-installed-pythonpath inputs outputs)
1120 (invoke "python" "-m" "pytest" "--pyargs" "cartopy"
1121 ;; These tests require online data.
1122 "-m" "not natural_earth and not network"
1123 ;; This one too but it's not marked as such.
1124 "-k" "not test_gridliner_labels_bbox_style")))))))
1126 (list python-matplotlib
1135 ;; cartopy's setup.py looks for the proj executable.
1136 ;; Not sure if it actually makes use of it since it
1137 ;; probably uses proj only through pyproj.
1140 (list python-cython python-flufl-lock python-pytest))
1141 (home-page "https://scitools.org.uk/cartopy/docs/latest/")
1142 (synopsis "Cartographic library for visualisation")
1144 "Cartopy is a Python package designed to make drawing maps for data
1145 analysis and visualisation easy.
1150 @item object oriented projection definitions
1151 @item point, line, polygon and image transformations between projections
1152 @item integration to expose advanced mapping in Matplotlib with a simple and
1154 @item powerful vector data handling by integrating shapefile reading with
1155 Shapely capabilities
1157 (license license:lgpl3+)))
1159 (define-public postgis
1165 (uri (string-append "https://download.osgeo.org/postgis/source/postgis-"
1169 "0gl9d6xy2an82ldb9sixz5blyngjryq8m3509fr38ffawvfniazv"))))
1170 (build-system gnu-build-system)
1174 (list (string-append "datadir=" (assoc-ref %outputs "out") "/share")
1175 (string-append "docdir="(assoc-ref %outputs "out") "/share/doc")
1176 (string-append "pkglibdir="(assoc-ref %outputs "out") "/lib")
1177 (string-append "bindir=" (assoc-ref %outputs "out") "/bin"))
1179 (modify-phases %standard-phases
1180 (add-before 'build 'fix-install-path
1181 (lambda* (#:key outputs #:allow-other-keys)
1182 (substitute* '("raster/loader/Makefile" "raster/scripts/python/Makefile")
1183 (("\\$\\(DESTDIR\\)\\$\\(PGSQL_BINDIR\\)")
1184 (string-append (assoc-ref outputs "out") "/bin"))))))))
1198 (list perl pkg-config))
1199 (home-page "https://postgis.net")
1200 (synopsis "Spatial database extender for PostgreSQL")
1201 (description "PostGIS is a spatial database extender for PostgreSQL
1202 object-relational database. It adds support for geographic objects allowing
1203 location queries to be run in SQL. This package provides a PostgreSQL
1208 ;; loader/dbfopen, safileio.*, shapefil.h, shpopen.c
1211 license:public-domain
1213 license:bsd-3 ; files only say "BSD"
1215 license:cc-by-sa3.0))))
1217 (define-public tegola
1224 "https://github.com/go-spatial/tegola/archive/v"
1226 (file-name (string-append name "-" version ".tar.gz"))
1229 "09vnzxfn0r70kmd776kcdfqxhzdj11syxa0b27z4ci1k367v7viw"))))
1230 (build-system go-build-system)
1232 `(#:import-path "github.com/go-spatial/tegola/cmd/tegola"
1233 #:unpack-path "github.com/go-spatial/tegola"
1235 (modify-phases %standard-phases
1236 (add-before 'build 'set-version
1238 (with-directory-excursion "src/github.com/go-spatial/tegola"
1239 (substitute* '("cmd/tegola/cmd/root.go"
1240 "cmd/tegola_lambda/main.go")
1241 (("version not set") ,version)))
1243 (home-page "https://tegola.io")
1244 (synopsis "Vector tile server for maps")
1245 (description "Tegola is a free vector tile server written in Go. Tegola
1246 takes geospatial data and slices it into vector tiles that can be efficiently
1247 delivered to any client.")
1250 ;; Some packages in vendor have other licenses
1256 (define-public imposm3
1263 (uri (string-append "https://github.com/omniscale/imposm3/archive/v"
1265 (file-name (string-append name "-" version ".tar.gz"))
1268 "1w7b221z5k9254zn01imycxkyw62xigqizhwvrgxqmq1m9r5410l"))))
1269 (build-system go-build-system)
1271 `(#:import-path "github.com/omniscale/imposm3/cmd/imposm"
1272 #:unpack-path "github.com/omniscale/imposm3"
1274 (modify-phases %standard-phases
1275 (add-before 'build 'set-version
1277 (substitute* "src/github.com/omniscale/imposm3/version.go"
1278 (("0.0.0-dev") ,version))
1281 (list geos leveldb))
1282 (home-page "https://imposm.org/")
1283 (synopsis "OpenStreetMap importer for PostGIS")
1284 (description "Imposm is an importer for OpenStreetMap data. It reads PBF
1285 files and imports the data into PostgreSQL/PostGIS databases. It is designed
1286 to create databases that are optimized for rendering/tile/map-services.")
1289 ;; Some dependencies in vendor have different licenses
1294 (define-public libosmium
1302 (url "https://github.com/osmcode/libosmium")
1303 (commit (string-append "v" version))))
1304 (file-name (git-file-name name version))
1306 (base32 "0fh57mpii1ksacwfx5rz213j896aklib53jbybld2i517q2mmxr0"))))
1307 (build-system cmake-build-system)
1322 (home-page "https://osmcode.org/libosmium/")
1323 (synopsis "C++ library for working with OpenStreetMap data")
1324 (description "Libosmium is a fast and flexible C++ library for working with
1325 OpenStreetMap data.")
1326 (license license:boost1.0)))
1328 (define-public osmium-tool
1330 (name "osmium-tool")
1336 (url "https://github.com/osmcode/osmium-tool")
1337 (commit (string-append "v" version))))
1338 (file-name (git-file-name name version))
1340 (base32 "0zgyqyrs89vch0qnkh9m5xq079sr2wmydy5zz4l8xbysbjf6xry5"))
1341 (modules '((guix build utils)))
1343 ;; Remove bundled libraries.
1344 '(delete-file-recursively "include/rapidjson"))))
1345 (build-system cmake-build-system)
1351 (home-page "https://osmcode.org/osmium-tool/")
1352 (synopsis "Osmium command-line tool")
1353 (description "Command line tool for working with OpenStreetMap data
1354 based on the Osmium library.")
1355 (license license:gpl3+)))
1357 (define-public osm2pgsql
1365 (url "https://github.com/openstreetmap/osm2pgsql")
1367 (file-name (git-file-name name version))
1369 (base32 "15fxr4xq7siy237763l7nswx7v0swr3qzs2h3zkjzgvajw4p6qii"))
1370 (modules '((guix build utils)))
1372 ;; Remove bundled libraries.
1373 '(delete-file-recursively "contrib"))))
1374 (build-system cmake-build-system)
1376 `(#:tests? #f; tests fail because we need to setup a database
1378 (list "-DEXTERNAL_LIBOSMIUM=ON"
1379 "-DEXTERNAL_PROTOZERO=ON"
1381 "-DEXTERNAL_RAPIDJSON=ON")))
1395 (list python python-psycopg2))
1396 (home-page "https://github.com/openstreetmap/osm2pgsql")
1397 (synopsis "OSM data importer to postgresql")
1398 (description "Osm2pgsql is a tool for loading OpenStreetMap data into a
1399 PostgreSQL / PostGIS database suitable for applications like rendering into a
1400 map, geocoding with Nominatim, or general analysis.")
1401 (license license:gpl2+)))
1403 (define-public tippecanoe
1411 (url "https://github.com/mapbox/tippecanoe")
1413 (file-name (git-file-name name version))
1415 (base32 "0lbmhly4ivnqc6qk1k3sdqvsg6x3nfd8gnjx846bhqj4wag3f88m"))))
1416 (build-system gnu-build-system)
1419 (modify-phases %standard-phases (delete 'configure))
1420 #:test-target "test"
1422 (list (string-append "CC=" ,(cc-for-target))
1423 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1425 (list perl sqlite zlib))
1426 (home-page "https://github.com/mapbox/tippecanoe")
1427 (synopsis "Vector tile server for maps")
1428 (description "Tippecanoe creates scale-independent view of data, so that
1429 the texture and density of features is visible at every zoom level, instead of
1430 dropping features at lower levels.")
1431 (license license:bsd-2)))
1433 (define-public osmctools
1441 (url "https://gitlab.com/osm-c-tools/osmctools")
1443 (file-name (git-file-name name version))
1446 "1m8d3r1q1v05pkr8k9czrmb4xjszw6hvgsf3kn9pf0v14gpn4r8f"))))
1447 (build-system gnu-build-system)
1449 (list autoconf automake))
1452 (home-page "https://gitlab.com/osm-c-tools/osmctools")
1453 (synopsis "Tools to convert, filter and update OpenStreetMap data files")
1454 (description "This project contains a few tools which are used in the
1455 OpenStreetMap project. They can be used to convert, filter and update
1456 OpenStreetMap data files.")
1457 (license license:agpl3)))
1459 (define-public osm-gps-map
1461 (name "osm-gps-map")
1467 "https://github.com/nzjrs/osm-gps-map/releases/download/"
1468 version "/osm-gps-map-" version ".tar.gz"))
1471 "11imsf4cz1dpxdjh178k2s29axmq86rkfg1pqmn7incyxmjzhbwg"))))
1472 (build-system gnu-build-system)
1474 (list gnome-common gtk-doc/stable pkg-config))
1476 (list cairo glib gobject-introspection gtk+ libsoup-minimal-2))
1477 (home-page "https://nzjrs.github.io/osm-gps-map/")
1478 (synopsis "GTK+ widget for displaying OpenStreetMap tiles")
1480 "This package provides a GTK+ widget (and Python bindings) that when
1481 given GPS coordinates,draws a GPS track, and points of interest on a moving
1482 map display. Downloads map data from a number of websites, including
1483 @url{https://www.openstreetmap.org}.")
1484 (license license:gpl2+)))
1486 (define-public xygrib
1493 (url "https://github.com/opengribs/XyGrib")
1494 (commit (string-append "v" version))))
1495 (file-name (git-file-name name version))
1496 (patches (search-patches "xygrib-fix-finding-data.patch"))
1499 "0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia"))
1500 (modules '((guix build utils)))
1503 (delete-file-recursively "data/fonts")
1504 ;; Fixes compilation, can be removed with the next release.
1505 ;; Upstream link: https://github.com/opengribs/XyGrib/pull/255
1506 (substitute* "src/SkewT.h"
1507 (("QMessageBox>") "QMessageBox>\n#include <QPainterPath>"))
1509 (build-system cmake-build-system)
1511 `(#:configure-flags (list "-DGNU_PACKAGE=ON")
1514 (modify-phases %standard-phases
1515 (add-after 'unpack 'patch-directories
1516 (lambda* (#:key inputs #:allow-other-keys)
1517 (let ((jpeg (assoc-ref inputs "openjpeg"))
1518 (font (assoc-ref inputs "font-liberation")))
1519 (substitute* "CMakeLists.txt"
1520 ;; Skip looking for the static library.
1521 (("\"libnova.a\"") ""))
1522 ;; Don't use the bundled font-liberation.
1523 (substitute* "src/util/Font.cpp"
1524 (("Util::pathFonts\\(\\)\\+\"liberation-fonts/\"")
1525 (string-append "\"" font "/share/fonts/truetype/\"")))
1526 (substitute* "src/util/Util.h"
1527 (("pathData\\(\\)\\+\"data/fonts/\"")
1528 (string-append "\"" font "/share/fonts/\"")))))))
1529 #:tests? #f)) ; no tests
1541 (native-search-paths
1542 (list (search-path-specification
1543 (variable "XDG_DATA_DIRS")
1544 (files '("share")))))
1545 (synopsis "Weather Forecast Visualization")
1547 "XyGrib is a Grib file reader and visualizes meteorological data providing
1548 an off-line capability to analyse weather forecasts or hindcasts. It is
1549 intended to be used as a capable weather work station for anyone with a serious
1550 interest in examining weather. This would include members of the sailing
1551 community, private and sport aviators, farmers, weather buffs and many more.
1552 XyGrib is the continuation of the zyGrib software package with a new team of
1554 (home-page "https://opengribs.org")
1555 (license license:gpl3+)))
1557 (define-public libspatialindex
1559 (name "libspatialindex")
1564 (uri (string-append "https://github.com/libspatialindex/libspatialindex/"
1565 "releases/download/" version "/spatialindex-src-"
1566 version ".tar.bz2"))
1569 "02n5vjcyk04w0djidyp21hfbxfpbbara8ifd9nml6158rwqr8lja"))))
1570 (build-system cmake-build-system)
1571 (home-page "https://libspatialindex.org")
1572 (synopsis "Spatial indexing library")
1573 (description "The purpose of this library is to provide:
1576 @item An extensible framework that will support robust spatial indexing
1578 @item Support for sophisticated spatial queries. Range, point location,
1579 nearest neighbor and k-nearest neighbor as well as parametric queries (defined
1580 by spatial constraints) should be easy to deploy and run.
1581 @item Easy to use interfaces for inserting, deleting and updating information.
1582 @item Wide variety of customization capabilities. Basic index and storage
1583 characteristics like the page size, node capacity, minimum fan-out, splitting
1584 algorithm, etc. should be easy to customize.
1585 @item Index persistence. Internal memory and external memory structures
1586 should be supported. Clustered and non-clustered indices should be easy to be
1590 (license license:expat)))
1592 (define-public python-rtree
1594 (name "python-rtree")
1599 (uri (pypi-uri "Rtree" version))
1601 (base32 "10lnhf67c9pb0yisxdqmb52dy6lj1za1h9d4p69v0ihk2a138j6h"))))
1602 (build-system python-build-system)
1605 (modify-phases %standard-phases
1606 (add-after 'unpack 'find-libspatialindex
1607 (lambda* (#:key inputs #:allow-other-keys)
1608 (let ((libspatialindex (assoc-ref inputs "libspatialindex")))
1609 (substitute* "rtree/finder.py"
1610 (("find_library\\(\"spatialindex_c\"\\)")
1611 (string-append "\"" libspatialindex
1612 "/lib/libspatialindex_c.so\""))))))
1614 (lambda* (#:key outputs tests? #:allow-other-keys)
1616 (invoke "pytest")))))))
1618 (list python-numpy python-pytest python-wheel))
1620 (list libspatialindex))
1621 (home-page "https://github.com/Toblerity/rtree")
1622 (synopsis "R-Tree spatial index for Python GIS")
1624 "RTree is a Python package with bindings for @code{libspatialindex}.")
1625 (license license:expat)))
1627 (define-public java-jmapviewer
1629 (name "java-jmapviewer")
1633 (uri (string-append "https://svn.openstreetmap.org/applications/"
1634 "viewer/jmapviewer/releases/" version
1635 "/JMapViewer-" version "-Source.zip"))
1638 "0sy6r5fkbb9bclw0is6gwnbzz627m7pjfnsqydxz58pbndakkhrv"))))
1639 (build-system ant-build-system)
1643 `(#:build-target "pack"
1644 #:tests? #f; No tests
1646 (modify-phases %standard-phases
1647 (add-before 'build 'clean
1649 (invoke "ant" "clean")))
1651 (lambda* (#:key outputs #:allow-other-keys)
1652 (let ((dir (string-append (assoc-ref outputs "out") "/share/java/")))
1654 (copy-file "JMapViewer.jar" (string-append dir "JMapViewer.jar"))
1656 (home-page "https://wiki.openstreetmap.org/wiki/JMapViewer")
1657 (synopsis "OSM map integration in Java")
1658 (description "JMapViewer is a Java component which easily
1659 integrates an OSM map view into your Java application. It is maintained as
1660 an independent project by the JOSM team.")
1661 (license license:gpl2)))
1663 (define-public java-opening-hours-parser
1665 (name "java-opening-hours-parser")
1670 (url "https://github.com/simonpoole/OpeningHoursParser")
1672 (file-name (git-file-name name version))
1675 "0yhbd2ix6h506aljh0jkrnp28m4xcqdcdpnqm30fn08kawdgxgsh"))))
1676 (build-system ant-build-system)
1678 `(#:jar-name "java-opening-hours-parser.jar"
1679 #:source-dir "src/main/java"
1681 (modify-phases %standard-phases
1682 (add-before 'build 'copy-resources
1684 (copy-recursively "src/main/resources" "build/classes")
1686 (add-before 'build 'generate-parser
1688 (let* ((dir "src/main/java/ch/poole/openinghoursparser")
1689 (file (string-append dir "/OpeningHoursParser.jj")))
1690 (invoke "javacc" "-DEBUG_PARSER=false"
1691 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1692 "-GRAMMAR_ENCODING=UTF-8"
1693 (string-append "-OUTPUT_DIRECTORY=" dir)
1697 (list java-jetbrains-annotations))
1699 (list javacc java-junit java-hamcrest-core))
1700 (home-page "https://github.com/simonpoole/OpeningHoursParser")
1701 (synopsis "Java parser for the OpenStreetMap opening hour format")
1702 (description "This is a very simplistic parser for string values according
1703 to the OSM opening hours specification.")
1704 (license license:expat)))
1713 (url "https://josm.openstreetmap.de/svn/trunk")
1714 (revision (string->number version))
1718 "0j7fhzh6hs2b5r1a3d1xpy6f5r6q1kh79bck28raang8ldd754c6"))
1719 (file-name (string-append name "-" version "-checkout"))
1720 (modules '((guix build utils)))
1723 (for-each delete-file (find-files "." ".*.jar$"))
1725 (build-system ant-build-system)
1729 (list java-commons-jcs
1730 java-commons-compress
1733 java-jsonp-impl ; runtime dependency
1735 java-metadata-extractor
1736 java-opening-hours-parser
1739 java-svg-salamander))
1742 #:jar-name "josm.jar"
1744 (modify-phases %standard-phases
1745 (add-after 'unpack 'rm-build.xml
1747 (delete-file "build.xml")
1749 (add-before 'build 'fix-revision
1751 (with-output-to-file "REVISION.XML"
1754 (string-append "<info><entry><commit revision=\"" ,version "\">"
1755 "<date>1970-01-01 00:00:00 +0000</date>"
1756 "</commit></entry></info>"))))
1758 (add-before 'build 'fix-jcs
1760 ;; This version of JOSM uses an unreleased version of commons-jcs,
1761 ;; which has renamed its classes to another namespace. Rename them
1762 ;; back so they can be used with our version of jcs.
1763 (substitute* (find-files "." ".*.java$")
1765 (("ICache.NAME_COMPONENT_DELIMITER") "\":\""))
1767 (add-before 'build 'fix-classpath
1768 (lambda* (#:key inputs #:allow-other-keys)
1773 (let ((source (assoc-ref inputs "source")))
1774 (not (equal? (substring s 0 (string-length source))
1776 (string-split (getenv "CLASSPATH") #\:))
1779 (add-before 'build 'generate-parser
1781 (let* ((dir "src/org/openstreetmap/josm/gui/mappaint/mapcss")
1782 (out (string-append dir "/parsergen"))
1783 (file (string-append dir "/MapCSSParser.jj")))
1784 (mkdir-p "src/org/openstreetmap/josm/gui/mappaint/mapcss/parsergen")
1785 (invoke "javacc" "-DEBUG_PARSER=false"
1786 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1787 "-GRAMMAR_ENCODING=UTF-8"
1788 (string-append "-OUTPUT_DIRECTORY=" out)
1791 (add-after 'build 'generate-epsg
1793 (system* "javac" "scripts/BuildProjectionDefinitions.java"
1794 "-cp" "build/classes")
1795 (mkdir-p "data/projection")
1796 (with-output-to-file "data/projection/custom-epsg"
1797 (lambda _ (display "")))
1798 (invoke "java" "-cp" "build/classes:scripts:."
1799 "BuildProjectionDefinitions" ".")
1801 (add-after 'generate-epsg 'copy-resources
1803 (copy-recursively "resources" "build/classes")
1805 (add-before 'install 'regenerate-jar
1807 ;; We need to regenerate the jar file to add data.
1808 (delete-file "build/jar/josm.jar")
1809 (invoke "jar" "-cf" "build/jar/josm.jar" "-C"
1810 "build/classes" ".")
1812 (add-before 'build 'copy-revision
1814 (mkdir-p "build/classes")
1815 (with-output-to-file "build/classes/REVISION"
1818 (string-append "Revision: " ,version "\n"
1819 "Is-Local-Build: true\n"
1820 "Build-Date: 1970-01-01 00:00:00 +0000\n"))))
1822 (add-after 'install 'install-share-directories
1823 (lambda* (#:key outputs #:allow-other-keys)
1824 (let ((out (assoc-ref outputs "out"))
1825 (share-directories '("applications" "icons" "man" "menu"
1826 "metainfo" "mime" "pixmaps"))
1827 (desktop "org.openstreetmap.josm.desktop"))
1828 (for-each (lambda (directory)
1829 (copy-recursively (string-append
1830 "native/linux/tested/usr/share/"
1833 out "/share/" directory)))
1835 (substitute* (string-append out "/share/applications/" desktop)
1836 (("josm-MainApplication") "josm-gui-MainApplication")))
1838 (add-after 'install 'install-bin
1839 (lambda* (#:key outputs inputs #:allow-other-keys)
1840 (let* ((out (assoc-ref outputs "out"))
1841 (bin (string-append out "/bin")))
1843 (with-output-to-file (string-append bin "/josm")
1846 (string-append "#!/bin/sh\n"
1847 (assoc-ref inputs "jdk") "/bin/java"
1848 " -cp " out "/share/java/josm.jar:"
1849 (getenv "CLASSPATH")
1850 " org.openstreetmap.josm.gui.MainApplication"))))
1851 (chmod (string-append bin "/josm") #o755))
1853 (home-page "https://josm.openstreetmap.de")
1854 (synopsis "OSM editor")
1855 (description "JOSM is an extensible editor for OpenStreetMap (OSM). It
1856 supports loading GPX tracks, background imagery and OSM data from local
1857 sources as well as from online sources and allows editing the OSM data (nodes,
1858 ways, and relations) and their metadata tags.")
1859 (license license:gpl2+)))
1861 (define-public libmaxminddb
1863 (name "libmaxminddb")
1868 (uri (string-append "https://github.com/maxmind/libmaxminddb"
1869 "/releases/download/" version "/"
1870 "/libmaxminddb-" version ".tar.gz"))
1872 (base32 "0rw2z7rx8jzgdcgqlmc4wqrsjmiwd8vm5wvvrldy472rghcaq83n"))))
1873 (build-system gnu-build-system)
1876 (list ,(string-append "CC=" (cc-for-target)))))
1879 (home-page "https://maxmind.github.io/libmaxminddb/")
1880 (synopsis "C library for the MaxMind DB file format")
1881 (description "The libmaxminddb library provides a C library for reading
1882 MaxMind DB files, including the GeoIP2 databases from MaxMind. The MaxMind DB
1883 format is a custom, but open, binary format designed to facilitate fast
1884 lookups of IP addresses while allowing flexibility in the type of data
1885 associated with an address.")
1886 (license license:asl2.0)))
1888 (define-public python-maxminddb
1890 (name "python-maxminddb")
1895 (uri (pypi-uri "maxminddb" version))
1898 "1rc4a403r3b4vhmhb03gidd0fmsbvfpbf3qfcw25h4db9zn0fxz3"))))
1899 (build-system python-build-system)
1901 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1903 (list libmaxminddb))
1904 (home-page "https://www.maxmind.com/")
1905 (synopsis "Reader for the MaxMind DB format")
1906 (description "MaxMind DB is a binary file format that stores data indexed
1907 by IP address subnets (IPv4 or IPv6). This is a Python module for reading
1909 (license license:asl2.0)))
1911 (define-public python-geoip2
1913 (name "python-geoip2")
1918 (uri (pypi-uri "geoip2" version))
1921 "1w7cay5q6zawjzivqbwz5cqx1qbdjw6kbriccb7l46p7b39fkzzp"))))
1922 (build-system python-build-system)
1924 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1926 (list python-maxminddb python-requests))
1927 (home-page "https://www.maxmind.com/")
1928 (synopsis "MaxMind GeoIP2 API")
1929 (description "Provides an API for the GeoIP2 web services and databases.
1930 The API also works with MaxMind’s free GeoLite2 databases.")
1931 (license license:asl2.0)))
1933 (define-public routino
1940 (uri (string-append "http://www.routino.org/download/routino-"
1943 (base32 "1xa7l2bjn832nk6bc7b481nv8hd2gj41jwhg0d2qy10lqdvjpn5b"))))
1944 (build-system gnu-build-system)
1948 (list bzip2 xz zlib))
1950 `(#:test-target "test"
1952 (modify-phases %standard-phases
1954 (lambda* (#:key outputs #:allow-other-keys)
1955 (substitute* "Makefile.conf"
1956 (("prefix=/usr/local")
1957 (string-append "prefix=" (assoc-ref outputs "out")))
1958 (("LDFLAGS_LDSO=-Wl,-R\\.")
1959 "LDFLAGS_LDSO=-Wl,-R$(libdir)")
1960 (("#CFLAGS\\+=-DUSE_XZ")
1962 (("#LDFLAGS\\+=-llzma")
1965 (synopsis "Routing application for OpenStreetMap data")
1967 "Routino is an application for finding a route between two points
1968 using the dataset of topographical information collected by
1969 @url{https://www.OpenStreetMap.org}.")
1970 (home-page "https://www.routino.org/")
1971 (license license:agpl3+)))
1973 (define-public qmapshack
1981 (url "https://github.com/Maproom/qmapshack")
1982 (commit (string-append "V_" version))))
1983 (file-name (git-file-name name version))
1985 (base32 "184fqmsfzr3b333ssizjk6gvv7mncmygq8dj5r7rsvs5md26z2ys"))))
1986 (build-system qt-build-system)
1988 (list pkg-config qttools-5))
2001 sqlite ; See wrap phase
2006 (modify-phases %standard-phases
2007 (add-after 'unpack 'fix-cmake-modules
2008 (lambda* (#:key inputs #:allow-other-keys)
2009 (substitute* "CMakeLists.txt"
2010 (("find_package\\(Qt5PrintSupport REQUIRED\\)" all)
2011 (string-append all "\nfind_package(Qt5Positioning REQUIRED)")))
2012 (substitute* "cmake/Modules/FindROUTINO.cmake"
2014 (assoc-ref inputs "routino"))))))))
2015 (synopsis "GPS mapping application")
2017 "QMapShack can be used to plan your next outdoor trip or to visualize and
2018 archive all the GPS recordings of your past trips. It is the successor of the
2019 QLandkarte GT application.")
2020 (home-page "https://github.com/Maproom/qmapshack/wiki")
2021 (license license:gpl3+)))
2023 (define-public readosm
2030 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
2031 "readosm-" version ".tar.gz"))
2033 (base32 "0igif2bxf4dr82glxz9gyx5mmni0r2dsnx9p9k6pxv3c4lfhaz6v"))))
2034 (build-system gnu-build-system)
2037 (synopsis "Data extractor for OpenStreetMap files")
2039 "ReadOSM is a library to extract valid data from within an OpenStreetMap
2040 input file (in @code{.osm} or @code{.osm.pbf} format).")
2041 (home-page "https://www.gaia-gis.it/fossil/readosm/index")
2042 (license (list license:gpl2+
2046 (define-public shapelib
2054 (url "https://github.com/OSGeo/shapelib")
2055 (commit (string-append "v" version))))
2056 (file-name (git-file-name name version))
2058 (base32 "1lzch0jf6yqhw391phhafzw4ghmiz98zkf698h4fmq109fa2vhqd"))))
2059 (build-system gnu-build-system)
2061 (list autoconf automake libtool))
2062 (home-page "http://shapelib.maptools.org/")
2063 (synopsis "Provides C library to write and update ESRI Shapefiles")
2065 "The Shapefile C Library provides the ability to write simple C programs
2066 for reading, writing and updating (to a limited extent) ESRI Shapefiles, and the
2067 associated attribute file (@file{.dbf}).")
2068 (license license:gpl2+)))
2070 (define-public spatialite-tools
2072 (name "spatialite-tools")
2077 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
2078 "spatialite-tools-" version ".tar.gz"))
2080 (base32 "070p6pg541wvwb28wkn7k0z1qdyirik2qc2jpj4pf0vzx02w414n"))))
2081 (build-system gnu-build-system)
2095 (synopsis "Collection of command line tools for SpatiaLite")
2097 "@code{spatialite-tools} is a collection of Command Line Interface (CLI)
2098 tools supporting SpatiaLite.")
2099 (home-page "https://www.gaia-gis.it/fossil/spatialite-tools/index")
2100 (license license:gpl3+)))
2102 (define-public virtualpg
2109 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
2110 "virtualpg-" version ".tar.gz"))
2112 (base32 "12z0l7368r4116ljzg7nljy5hf425r11vxc540w79wlzikmynamy"))))
2113 (build-system gnu-build-system)
2115 (list postgresql sqlite))
2116 (synopsis "Allow SQLite/SpatiaLite to access PostgreSQL/PostGIS tables")
2118 "VirtualPG is a dynamic extension for the SQLite DBMS. It implements
2119 the VirtualPostgres driver, allowing to directly exchange data between SQLite
2120 and PostgreSQL; if SpatiaLite is available even PostGIS geometries can be
2121 exchanged form one Spatial DBMS and the other.")
2122 (home-page "https://www.gaia-gis.it/fossil/virtualpg/index")
2123 (license (list license:gpl2+
2127 (define-public opencpn
2135 (url "https://github.com/OpenCPN/OpenCPN")
2136 (commit (string-append "Release_" version))))
2137 (file-name (git-file-name name version))
2139 (base32 "0g5x45wv3djfjmigk6kgs0i63yp8rs1fbmm4pb15wb3z6dml624y"))))
2140 (build-system cmake-build-system)
2142 `(("gettext" ,gettext-minimal)
2143 ("pkg-config" ,pkg-config)))
2170 `(#:configure-flags '("-DOCPN_USE_BUNDLED_LIBS=OFF"
2171 "-DOCPN_ENABLE_PORTAUDIO=ON"
2172 "-DOCPN_ENABLE_SNDFILE=ON"
2173 "-DOCPN_BUNDLE_TCDATA=ON"
2174 "-DOCPN_BUNDLE_GSHHS=ON")
2175 #:tests? #f ; No tests defined
2177 (modify-phases %standard-phases
2178 (add-after 'unpack 'fix-build
2179 (lambda* (#:key inputs #:allow-other-keys)
2180 (substitute* "CMakeLists.txt"
2183 (("\"/bin/sh\" \"-c\"")
2184 (string-append "\"" (which "bash") "\" \"-c\""))
2185 (("include\\(TargetSetup\\)")
2186 "set(PKG_TARGET \"guix\")\nset(PKG_TARGET_VERSION 1)")))))))
2187 (synopsis "Chart plotter and marine GPS navigation software")
2189 "OpenCPN is a chart plotter and marine navigation software designed to be
2190 used at the helm station of your boat while underway. Chart a course and
2191 track your position right from your laptop.")
2192 (home-page "https://opencpn.org/")
2193 (license (list license:asl2.0
2204 (define-public openorienteering-mapper
2206 (name "openorienteering-mapper")
2211 (url "https://github.com/OpenOrienteering/mapper")
2212 (commit (string-append "v" version))))
2213 (file-name (git-file-name name version))
2216 "11b578h8f3q9yvphbjhqmy2w1cfc9skslzawypqmc3k44v24aj0s"))))
2217 (build-system cmake-build-system)
2222 "-DLICENSING_PROVIDER:BOOL=OFF"
2223 "-DMapper_MANUAL_QTHELP:BOOL=OFF")))
2225 `(("clipper" ,clipper)
2230 ("qtbase" ,qtbase-5)
2231 ("qtimageformats" ,qtimageformats)
2232 ("qtlocation" ,qtlocation)
2233 ("qtsensors" ,qtsensors)
2236 `(("doxygen" ,doxygen)
2237 ("qttools-5" ,qttools-5)))
2238 (home-page "https://www.openorienteering.org/apps/mapper/")
2239 (synopsis "OpenOrienteering Mapper (OOM)")
2241 "OpenOrienteering Mapper is a software for creating maps for the
2242 orienteering sport.")
2243 (license license:gpl3+)))
2245 (define-public grass
2246 (let* ((version "7.8.7")
2247 (majorminor (string-join (list-head (string-split version #\.) 2) ""))
2248 (grassxx (string-append "grass" majorminor)))
2255 (uri (string-append "https://grass.osgeo.org/" grassxx
2256 "/source/grass-" version ".tar.gz"))
2258 (base32 "0sbz0ba9p963phvd0gmvfqq1fg4ixpipzcjbf20ys86qavjppzsg"))))
2259 (build-system gnu-build-system)
2264 ("freetype" ,freetype)
2270 ("libtiff" ,libtiff)
2272 ("mariadb-dev" ,mariadb "dev")
2273 ("mariadb-lib" ,mariadb "lib")
2275 ("openblas" ,openblas)
2277 ("postgresql" ,postgresql)
2280 ("python-dateutil" ,python-dateutil)
2281 ("python-numpy" ,python-numpy)
2282 ("python-wxpython" ,python-wxpython)
2283 ("readline" ,readline)
2285 ("wxwidgets" ,wxwidgets)
2287 ("zstd" ,zstd "lib")))
2289 `(("bash" ,bash-minimal)
2292 ("pkg-config" ,pkg-config)))
2294 `(#:tests? #f ; No tests
2295 #:modules ((guix build gnu-build-system)
2296 ((guix build python-build-system) #:prefix python:)
2298 #:imported-modules (,@%gnu-build-system-modules
2299 (guix build python-build-system))
2301 (modify-phases %standard-phases
2303 (lambda* (#:key inputs outputs #:allow-other-keys)
2304 (let ((shell (search-input-file inputs "/bin/bash")))
2305 (setenv "SHELL" shell)
2306 (setenv "CONFIG_SHELL" shell)
2307 (setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl,"
2308 (assoc-ref outputs "out")
2309 "/" ,grassxx "/lib")))
2310 (invoke "./configure"
2311 (string-append "--prefix="
2312 (assoc-ref outputs "out"))
2315 (string-append "--with-freetype-includes="
2316 (assoc-ref inputs "freetype")
2317 "/include/freetype2")
2318 (string-append "--with-freetype-libs="
2319 (assoc-ref inputs "freetype")
2324 (string-append "--with-mysql-includes="
2325 (assoc-ref inputs "mariadb-dev")
2327 (string-append "--with-mysql-libs="
2328 (assoc-ref inputs "mariadb-lib")
2332 (string-append "--with-proj-share="
2333 (assoc-ref inputs "proj")
2338 "--with-wxwidgets")))
2339 (add-after 'install 'install-links
2340 (lambda* (#:key outputs #:allow-other-keys)
2341 ;; Put links for includes and libraries in the standard places.
2342 (let* ((out (assoc-ref outputs "out"))
2343 (dir (string-append out "/" ,grassxx)))
2344 (symlink (string-append dir "/include")
2345 (string-append out "/include"))
2346 (symlink (string-append dir "/lib")
2347 (string-append out "/lib")))
2349 (add-after 'install-links 'python:wrap
2350 (assoc-ref python:%standard-phases 'wrap))
2351 (add-after 'python:wrap 'wrap-with-python-interpreter
2352 (lambda* (#:key outputs #:allow-other-keys)
2353 (let ((out (assoc-ref outputs "out")))
2354 (wrap-program (string-append out "/bin/" ,grassxx)
2355 `("GRASS_PYTHON" = (,(which "python3"))))
2357 (synopsis "GRASS Geographic Information System")
2359 "GRASS (Geographic Resources Analysis Support System), is a Geographic
2360 Information System (GIS) software suite used for geospatial data management and
2361 analysis, image processing, graphics and maps production, spatial modeling, and
2363 (home-page "https://grass.osgeo.org/")
2364 (license license:gpl2+))))
2373 (uri (string-append "mirror://sourceforge/saga-gis/SAGA%20-%20"
2374 (version-major version) "/SAGA%20-%20" version
2375 "/saga-" version ".tar.gz"))
2377 (base32 "008izjs6gvj09abxf16ssl1xy0ay3ljq4jswbggp6wiiq459minv"))
2378 (modules '((guix build utils)))
2380 '(substitute* "saga-gis/src/tools/docs/docs_pdf/doc_pdf.cpp"
2381 (("^#include <hpdf\\.h>\n" all)
2382 (string-append all "#include <hpdf_version.h>\n"))
2383 (("\\bHPDF_PROJECTING_SCUARE_END\\b")
2384 "HPDF_PROJECTING_SQUARE_END")))))
2385 (build-system cmake-build-system)
2387 (list pkg-config swig))
2407 (modify-phases %standard-phases
2408 (add-before 'configure 'cd-to-source-dir
2410 (chdir "saga-gis"))))))
2411 (synopsis "System for Automated Geoscientific Analyses")
2413 "SAGA (System for Automated Geoscientific Analyses) is a Geographic
2414 Information System (GIS) software. It has been designed for an easy and
2415 effective implementation of spatial algorithms and it offers a comprehensive,
2416 growing set of geoscientific methods.")
2417 (home-page "http://www.saga-gis.org")
2418 (license (list license:gpl2+ license:lgpl2.1+))))
2427 (uri (string-append "https://qgis.org/downloads/qgis-"
2428 version ".tar.bz2"))
2430 (base32 "1hsq3wchsf7db7134fgg9xzzap35q1s4r6649d0krbw80xw5asca"))))
2431 (build-system cmake-build-system)
2433 `(#:modules ((guix build cmake-build-system)
2434 ((guix build python-build-system) #:prefix python:)
2435 (guix build qt-utils)
2437 #:imported-modules (,@%cmake-build-system-modules
2438 (guix build python-build-system)
2439 (guix build qt-utils))
2441 '("-DWITH_QTWEBKIT=NO")
2443 (modify-phases %standard-phases
2444 ;; Configure correct path to PyQt5 SIP directory
2445 (add-after 'unpack 'configure-pyqt5-sip-path
2446 (lambda* (#:key inputs #:allow-other-keys)
2447 (substitute* "cmake/FindPyQt5.py"
2448 (("sip_dir = cfg.default_sip_dir")
2449 (string-append "sip_dir = \""
2450 (assoc-ref inputs "python-pyqt+qscintilla")
2452 ;; Fix building with python-sip@5.
2454 ;; The reason for this is that python-sip@5 introduces some
2455 ;; changes such as a new build system 'sip-build' as well as the
2456 ;; use of the path "/lib/pythonX.X/site-packages/*/bindings/"
2457 ;; instead of "/share/sip/" for .sip files. However, we do not
2458 ;; actually use that those yet. QGIS detects SIP5 and assumes we
2459 ;; are, messing up the build. The long term solution is to fully
2460 ;; upgrade SIP, use sip-build and fix all failing packages, but
2461 ;; for now I just want to get the build working.
2462 (substitute* "cmake/FindPyQt5.cmake"
2463 (("SET\\(PYQT5_SIP_DIR \"\\$\\{Python_SITEARCH\\}/PyQt5/bindings\"\\)")
2464 (string-append "SET(PYQT5_SIP_DIR \""
2465 (assoc-ref inputs "python-pyqt+qscintilla")
2467 (substitute* (list "tests/code_layout/test_qt_imports.sh"
2468 "tests/code_layout/test_qgsscrollarea.sh")
2469 (("\\$\\(git rev-parse --show-toplevel\\)")
2472 (lambda* (#:key inputs tests? #:allow-other-keys)
2474 (setenv "HOME" "/tmp")
2475 (system "Xvfb :1 &")
2476 (setenv "DISPLAY" ":1")
2477 (setenv "TRAVIS" "true")
2478 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
2481 '(;; Disable tests that require network access
2482 "qgis_filedownloader"
2483 ;; TODO: Find why the following tests fail
2484 "ProcessingQgisAlgorithmsTestPt1"
2485 "ProcessingQgisAlgorithmsTestPt2"
2486 "ProcessingQgisAlgorithmsTestPt3"
2487 "ProcessingQgisAlgorithmsTestPt4"
2488 "ProcessingGdalAlgorithmsVectorTest"
2489 "ProcessingGrass7AlgorithmsImageryTest"
2490 "ProcessingGrass7AlgorithmsRasterTestPt1"
2491 "ProcessingGrass7AlgorithmsRasterTestPt2"
2492 "ProcessingGrass7AlgorithmsVectorTest"
2493 "ProcessingOtbAlgorithmsTest"
2494 "test_core_authmanager"
2495 "test_core_compositionconverter"
2496 "test_core_coordinatereferencesystem"
2497 "test_core_gdalutils"
2498 "test_core_labelingengine"
2500 "test_core_layouthtml"
2501 "test_core_layoutlabel"
2502 "test_core_layoutmultiframe"
2503 "test_core_layoutpicture"
2504 "test_core_legendrenderer"
2505 "test_core_networkaccessmanager"
2506 "test_core_rasterfilewriter"
2507 "test_core_tiledownloadmanager"
2509 "test_gui_htmlwidgetwrapper"
2510 "test_gui_filedownloader"
2511 "test_gui_queryresultwidget"
2512 "test_analysis_processingalgspt2"
2513 "test_analysis_processing"
2514 "test_provider_wcsprovider"
2515 "qgis_grassprovidertest7"
2516 "test_app_gpsinformationwidget"
2518 "PyQgsAttributeTableModel"
2519 "PyQgsAuthenticationSystem"
2520 "PyQgsExternalStorageWebDAV"
2521 "PyQgsFieldFormattersTest"
2524 "PyQgsGoogleMapsGeocoder"
2525 "PyQgsHashLineSymbolLayer"
2526 "PyQgsLayoutExporter"
2528 "PyQgsLineSymbolLayers"
2530 "PyQgsNetworkContentFetcherRegistry"
2531 "PyQgsOGRProviderGpkg"
2532 "PyQgsOGRProviderSqlite"
2533 "PyQgsPalLabelingCanvas"
2534 "PyQgsPalLabelingLayout"
2535 "PyQgsPalLabelingPlacement"
2536 "PyQgsProcessExecutable"
2537 "PyQgsProviderConnectionGpkg"
2538 "PyQgsProviderConnectionSpatialite"
2540 "PyQgsSpatialiteProvider"
2541 "PyQgsVectorFileWriter"
2542 "PyQgsVectorLayerEditBuffer"
2543 "PyQgsVectorLayerEditBufferGroup"
2544 "PyQgsVectorLayerProfileGenerator"
2545 "PyQgsVirtualLayerProvider"
2547 "PyQgsWFSProviderGUI"
2548 "PyQgsOapifProvider"
2549 "PyQgsLayerDependencies"
2550 "PyQgsDBManagerGpkg"
2551 "PyQgsDBManagerSpatialite"
2552 "PyQgsAuxiliaryStorage"
2553 "PyQgsSelectiveMasking"
2557 "qgis_sip_uptodate")
2559 (add-after 'install 'wrap-python
2560 (assoc-ref python:%standard-phases 'wrap))
2561 (add-after 'wrap-python 'wrap-qt
2562 (lambda* (#:key outputs inputs #:allow-other-keys)
2563 (let ((out (assoc-ref outputs "out")))
2564 (wrap-qt-program "qgis" #:output out #:inputs inputs))))
2565 (add-after 'wrap-qt 'wrap-gis
2566 (lambda* (#:key inputs outputs #:allow-other-keys)
2567 ;; TODO: Find if there is a way to get SAGA to work.
2568 ;; Currently QGIS says "version of SAGA not supported".
2569 ;; Disable it for now.
2570 (let* ((out (assoc-ref outputs "out"))
2571 ;;(saga (string-append (assoc-ref inputs "saga") "/bin"))
2572 (grass-version ,(package-version grass))
2573 (grass-majorminor (string-join
2575 (string-split grass-version #\.) 2)
2577 (grass (string-append (assoc-ref inputs "grass")
2578 "/grass" grass-majorminor)))
2579 (wrap-program (string-append out "/bin/qgis")
2580 ;;`("PATH" ":" prefix (,saga))
2581 `("QGIS_PREFIX_PATH" = (,out))
2582 `("GISBASE" = (,grass)))))))))
2611 python-pyqt+qscintilla
2641 xorg-server-for-tests))
2642 (home-page "https://qgis.org")
2643 (synopsis "Geographical information system")
2644 (description "QGIS is an easy to use Geographical Information
2645 System (GIS). It is a GIS data viewer and editor. QGIS supports a number of
2646 raster and vector data formats, with new support easily added using the plugin
2659 (license:fsdg-compatible "https://www.deviantart.com/elvensword")
2660 (license:fsf-free "file://debian/copyright" "Go Squared")
2664 "https://www.deviantart.com/webgoddess/art/Reddish-Inspired-Gradients-42208824")
2666 "file://debian/copyright"
2667 "QT-Commercial or LGPL-2.1 with Digia Qt LGPL Exception 1.1 or GPL-3")
2677 (license:non-copyleft "file://debian/copyright" "BSD-like-gist")
2678 (license:non-copyleft "file://debian/copyright" "Jim Mossman Attribution")
2679 (license:non-copyleft
2680 "https://www.ncl.ucar.edu/Download/NCL_source_license.shtml"
2681 "NCL Source Code License")
2684 license:public-domain
2687 (define-public python-geographiclib
2689 (name "python-geographiclib")
2694 (uri (pypi-uri "geographiclib" version))
2697 "0cn6ap5fkh3mkfa57l5b44z3gvz7j6lpmc9rl4g2jny2gvp4dg8j"))))
2698 (build-system python-build-system)
2699 (home-page "https://geographiclib.sourceforge.io/1.50/python/")
2700 (synopsis "Python geodesic routines from GeographicLib")
2702 "This is a python implementation of the geodesic routines in GeographicLib.")
2703 (license license:expat)))
2705 (define-public python-geopy
2707 (name "python-geopy")
2712 (uri (pypi-uri "geopy" version))
2715 "0fx0cv0kgbvynpmjgsvq2fpsyngd5idiscdn8pd5201f1ngii3mq"))))
2716 (build-system python-build-system)
2718 (list python-geographiclib))
2720 (list python-async-generator
2725 python-pytest-aiohttp
2726 python-readme-renderer
2728 (home-page "https://github.com/geopy/geopy")
2729 (synopsis "Geocoding library for Python")
2730 (description "@code{geopy} is a Python client for several popular geocoding
2731 web services. @code{geopy} makes it easy for Python developers to locate the
2732 coordinates of addresses, cities, countries, and landmarks across the globe
2733 using third-party geocoders and other data sources.")
2734 (license license:expat)))
2736 (define-public gplates
2739 ;; Note: use a pre-release to cope with newer Boost, ref
2740 ;; https://discourse.gplates.org/t/compilation-error-with-boost-1-77/452/3
2741 (version "2.3.01-beta.3")
2744 (uri "https://cloudstor.aarnet.edu.au/plus/s\
2745 /ojsYNOyUYE3evNp/download?path=%2F&files=gplates_2.3.1-beta.3_src.zip")
2746 (file-name (string-append name "-" version ".zip"))
2749 "06i87dfab0cq9gdi5mh6sf9wigawpp0d05zbyslv910443i26gwv"))))
2750 (build-system cmake-build-system)
2752 `(#:configure-flags (list "-DBoost_NO_BOOST_CMAKE=ON")
2753 #:tests? #f)) ;no test target
2755 (list unzip)) ;for the beta
2774 (home-page "https://www.gplates.org")
2775 (synopsis "Plate tectonics simulation program")
2776 (description "GPlates is a plate tectonics program. Manipulate
2777 reconstructions of geological and paleogeographic features through geological
2778 time. Interactively visualize vector, raster and volume data.")
2779 (license license:gpl2+)))