gnu: QGIS: Build without QtWebKit.
[jackhill/guix/guix.git] / gnu / packages / geo.scm
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 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>
21 ;;;
22 ;;; This file is part of GNU Guix.
23 ;;;
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.
28 ;;;
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.
33 ;;;
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/>.
36
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 image)
86 #:use-module (gnu packages image-processing)
87 #:use-module (gnu packages icu4c)
88 #:use-module (gnu packages java)
89 #:use-module (gnu packages kde)
90 #:use-module (gnu packages lua)
91 #:use-module (gnu packages maths)
92 #:use-module (gnu packages multiprecision)
93 #:use-module (gnu packages pcre)
94 #:use-module (gnu packages pdf)
95 #:use-module (gnu packages perl)
96 #:use-module (gnu packages photo)
97 #:use-module (gnu packages pkg-config)
98 #:use-module (gnu packages protobuf)
99 #:use-module (gnu packages pulseaudio)
100 #:use-module (gnu packages python)
101 #:use-module (gnu packages python-build)
102 #:use-module (gnu packages python-check)
103 #:use-module (gnu packages python-crypto)
104 #:use-module (gnu packages python-science)
105 #:use-module (gnu packages python-web)
106 #:use-module (gnu packages python-xyz)
107 #:use-module (gnu packages qt)
108 #:use-module (gnu packages readline)
109 #:use-module (gnu packages swig)
110 #:use-module (gnu packages sqlite)
111 #:use-module (gnu packages textutils)
112 #:use-module (gnu packages time)
113 #:use-module (gnu packages web)
114 #:use-module (gnu packages webkit)
115 #:use-module (gnu packages wxwidgets)
116 #:use-module (gnu packages xml)
117 #:use-module (gnu packages xorg))
118
119 (define-public memphis
120 (package
121 (name "memphis")
122 (version "0.2.3")
123 (source
124 (origin
125 (method git-fetch)
126 (uri
127 (git-reference
128 (url "https://github.com/jiuka/memphis")
129 (commit version)))
130 (file-name (git-file-name name version))
131 (sha256
132 (base32 "068c3943pgbpfjq44pmvn5fmkh005ak5aa67vvrq3fn487c6w54q"))))
133 (build-system glib-or-gtk-build-system)
134 (outputs '("out" "doc"))
135 (arguments
136 `(#:configure-flags
137 (list
138 "--disable-static"
139 "--enable-gtk-doc"
140 "--enable-vala"
141 (string-append "--with-html-dir="
142 (assoc-ref %outputs "doc")
143 "/share/gtk-doc/html"))
144 #:phases
145 (modify-phases %standard-phases
146 (add-after 'unpack 'patch-autogen
147 (lambda _
148 (substitute* "autogen.sh"
149 (("\\./configure \"\\$@\"")
150 ""))
151 #t))
152 (add-after 'patch-autogen 'patch-docbook-xml
153 (lambda* (#:key inputs #:allow-other-keys)
154 (with-directory-excursion "docs/reference"
155 (substitute* "libmemphis-docs.sgml"
156 (("http://www.oasis-open.org/docbook/xml/4.3/")
157 (string-append (assoc-ref inputs "docbook-xml")
158 "/xml/dtd/docbook/"))))
159 #t)))))
160 (native-inputs
161 `(("autoconf" ,autoconf)
162 ("automake" ,automake)
163 ("docbook-xml" ,docbook-xml-4.3)
164 ("gobject-introspection" ,gobject-introspection)
165 ("gtk-doc" ,gtk-doc/stable)
166 ("libtool" ,libtool)
167 ("pkg-config" ,pkg-config)
168 ("python" ,python-wrapper)
169 ("seed" ,seed)
170 ("vala" ,vala)))
171 (inputs
172 (list expat glib))
173 (propagated-inputs
174 (list cairo))
175 (synopsis "Map-rendering for OpenSteetMap")
176 (description "Memphis is a map-rendering application and a library for
177 OpenStreetMap written in C using eXpat, Cairo and GLib.")
178 (home-page "http://trac.openstreetmap.ch/trac/memphis/")
179 (license license:lgpl2.1+)))
180
181 (define-public geos
182 (package
183 (name "geos")
184 (version "3.8.1")
185 (source (origin
186 (method url-fetch)
187 (uri (string-append "http://download.osgeo.org/geos/geos-"
188 version
189 ".tar.bz2"))
190 (sha256
191 (base32
192 "1xqpmr10xi0n9sj47fbwc89qb0yr9imh4ybk0jsxpffy111syn22"))))
193 (build-system gnu-build-system)
194 (arguments `(#:phases
195 (modify-phases %standard-phases
196 (add-after
197 'unpack 'patch-test-shebangs
198 (lambda _
199 (substitute* '("tests/xmltester/testrunner.sh"
200 "tests/geostest/testrunner.sh")
201 (("/bin/sh") (which "sh")))
202 #t)))))
203 (inputs
204 (list glib))
205 (home-page "https://geos.osgeo.org/")
206 (synopsis "Geometry Engine for Geographic Information Systems")
207 (description
208 "GEOS provides a spatial object model and fundamental geometric
209 functions. It is a C++ port of the Java Topology Suite (JTS). As such,
210 it aims to contain the complete functionality of JTS in C++. This
211 includes all the OpenGIS Simple Features for SQL spatial predicate
212 functions and spatial operators, as well as specific JTS enhanced
213 topology functions.")
214 (license (list license:lgpl2.1+ ; Main distribution.
215 license:zlib ; tests/xmltester/tinyxml/*
216 license:public-domain)))) ; include/geos/timeval.h
217
218 (define-public gnome-maps
219 (package
220 (name "gnome-maps")
221 (version "41.2")
222 (source (origin
223 (method url-fetch)
224 (uri (string-append "mirror://gnome/sources/" name "/"
225 (version-major version) "/"
226 name "-" version ".tar.xz"))
227 (sha256
228 (base32
229 "037xmkmcmcw87vb1c1s3y225m8757k331cvk1m8cshf6mx61p0l1"))))
230 (build-system meson-build-system)
231 (arguments
232 `(#:glib-or-gtk? #t
233 #:phases
234 (modify-phases %standard-phases
235 (add-after 'unpack 'skip-gtk-update-icon-cache
236 ;; Don't create 'icon-theme.cache'.
237 (lambda _
238 (substitute* "meson_post_install.py"
239 (("gtk-update-icon-cache") "true"))))
240 (add-after 'unpack 'patch-dbus-service
241 (lambda* (#:key outputs #:allow-other-keys)
242 (substitute* "data/org.gnome.Maps.service.in"
243 (("@pkgdatadir@/org.gnome.Maps")
244 (string-append (assoc-ref outputs "out")
245 "/bin/gnome-maps")))))
246 (add-after 'install 'wrap
247 (lambda* (#:key inputs outputs #:allow-other-keys)
248 (let ((out (assoc-ref outputs "out"))
249 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
250 (geocode-glib-path (string-append
251 (assoc-ref inputs "geocode-glib")
252 "/lib"))
253 (goa-path (string-append
254 (assoc-ref inputs "gnome-online-accounts:lib")
255 "/lib"))
256 (gdk-pixbuf-path (string-append
257 (assoc-ref inputs "gdk-pixbuf")
258 "/lib"))
259 (webkitgtk-path (string-append
260 (assoc-ref inputs "webkitgtk")
261 "/lib")))
262 (wrap-program (string-append out "/bin/gnome-maps")
263 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
264
265 ;; There seems to be no way to embed the path of
266 ;; libgoa-1.0.so.0, libwebkit2gtk-4.0.so.37,
267 ;; libgdk_pixbuf-2.0.so, libjavascriptcoregtk-4.0.so.18, and
268 ;; libgeocode-glib.so.0
269 `("LD_LIBRARY_PATH" ":" prefix (,goa-path
270 ,webkitgtk-path
271 ,gdk-pixbuf-path
272 ,geocode-glib-path)))
273 #t))))))
274 (native-inputs
275 `(("gettext" ,gettext-minimal)
276 ("gobject-introspection" ,gobject-introspection)
277 ("pkg-config" ,pkg-config)))
278 (inputs
279 `(("evolution-data-server" ,evolution-data-server)
280 ("folks" ,folks)
281 ("libchamplain" ,libchamplain)
282 ("libgee" ,libgee)
283 ("libhandy" ,libhandy)
284 ("libsecret" ,libsecret)
285 ("libsoup" ,libsoup-minimal-2)
286 ("libgweather" ,libgweather)
287 ("libxml2" ,libxml2)
288 ("librsvg" ,librsvg)
289 ("glib-networking" ,glib-networking)
290 ("geoclue" ,geoclue)
291 ("geocode-glib" ,geocode-glib)
292 ("gfbgraph" ,gfbgraph)
293 ("gjs" ,gjs)
294 ("glib" ,glib)
295 ("gnome-online-accounts:lib" ,gnome-online-accounts "lib")
296 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
297 ("gtk+" ,gtk+)
298 ("rest" ,rest)
299 ("webkitgtk" ,webkitgtk-with-libsoup2)))
300 (synopsis "Graphical map viewer and wayfinding program")
301 (description "GNOME Maps is a graphical map viewer. It uses map data from
302 the OpenStreetMap project. It can provide directions for walking, bicycling,
303 and driving.")
304 (home-page "https://wiki.gnome.org/Apps/Maps")
305 (license license:gpl2+)))
306
307 (define-public libgeotiff
308 (package
309 (name "libgeotiff")
310 (version "1.5.1")
311 (source
312 (origin
313 (method url-fetch)
314 (uri (string-append "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-"
315 version ".tar.gz"))
316 (patches (search-patches
317 ;; See libgeotiff 1.5.1 issue
318 ;; https://github.com/OSGeo/libgeotiff/issues/22
319 "libgeotiff-adapt-test-script-for-proj-6.2.patch"))
320 (sha256
321 (base32 "0b31mlzcv5b1y7jdvb7p0pa3xradrg3x5g32ym911lbhq4rrgsgr"))
322 (modules '((guix build utils)))
323 (snippet
324 '(begin
325 ;; Remove .csv files, distributed from EPSG under a restricted
326 ;; license. See LICENSE for full license text.
327 (for-each delete-file (find-files "." "\\.csv$"))
328 #t))))
329 (build-system gnu-build-system)
330 (inputs
331 (list libjpeg-turbo libtiff zlib))
332 (propagated-inputs
333 (list ;; libgeotiff headers include proj headers, so ensure those are available.
334 proj))
335 (arguments
336 `(#:configure-flags
337 (list "--disable-static"
338 "--with-zlib" "--with-jpeg"
339 (string-append "--with-libtiff=" (assoc-ref %build-inputs "libtiff")))))
340 (synopsis "Library for handling GeoTIFF (geographic enabled TIFF)")
341 (description "libgeotiff is a library on top of libtiff for reading and
342 writing GeoTIFF information tags.")
343 (home-page "https://trac.osgeo.org/geotiff/")
344 ;; This is a mixture of various contributions under different licenses.
345 ;; Note that the EPSG database is NOT "free to use" as the LICENSE file
346 ;; states, as its commercial redistribution is restricted. Hence, we have
347 ;; removed it from the package.
348 (license (list license:public-domain
349 license:x11
350 license:bsd-3
351 (license:non-copyleft "file://LICENSE"
352 "See LICENSE in the distribution.")))))
353
354 (define-public librasterlite2
355 (package
356 (name "librasterlite2")
357 (version "1.1.0-beta1")
358 (source
359 (origin
360 (method url-fetch)
361 (uri (string-append
362 "https://www.gaia-gis.it/gaia-sins/librasterlite2-sources/"
363 "librasterlite2-" version ".tar.gz"))
364 (sha256
365 (base32
366 "1x24gqp4hsq97c31ncwxblab0x0863q8v1z42jil7lvsq3glqa7p"))))
367 (build-system gnu-build-system)
368 (native-inputs
369 (list pkg-config))
370 (inputs
371 (list cairo
372 curl
373 freetype
374 freexl
375 giflib
376 libgeotiff
377 libjpeg-turbo
378 libpng
379 librttopo
380 libspatialite
381 libtiff
382 libwebp
383 libxml2
384 lz4
385 minizip
386 openjpeg
387 proj
388 sqlite
389 `(,zstd "lib")))
390 (synopsis "Library to work with huge raster coverages using a SpatiaLite")
391 (description
392 "librasterlite2 is a library that stores and retrieves huge raster
393 coverages using a SpatiaLite DBMS.")
394 (home-page "https://www.gaia-gis.it/fossil/librasterlite2/index")
395 ;; For the genuine librasterlite-sources holds:
396 ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked.
397 ;; Files under src/control_points are from GRASS
398 ;; and are licensed under GPL2+ only.
399 ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak.
400 ;; The tools supporting the library (both rl2tool and wmslite) are
401 ;; licensed under the GPL v3 (or any subsequent version) terms.
402 ;; The test/*.svg files are placed in the public domain, except for
403 ;; test/Car_Yellow.svg which is licensed under the Free Art License 1.3.
404 (license (list license:gpl2+
405 license:gpl3+
406 license:lal1.3
407 license:lgpl2.1+
408 license:mpl1.1
409 license:public-domain))))
410
411 (define-public librttopo
412 (package
413 (name "librttopo")
414 (version "1.1.0")
415 (source
416 (origin
417 (method git-fetch)
418 (uri (git-reference
419 (url "https://git.osgeo.org/gitea/rttopo/librttopo")
420 (commit (string-append "librttopo-" version))))
421 (file-name (git-file-name name version))
422 (sha256
423 (base32 "0h7lzlkn9g4xky6h81ndy0aa6dxz8wb6rnl8v3987jy1i6pr072p"))))
424 (build-system gnu-build-system)
425 (arguments
426 `(#:phases
427 (modify-phases %standard-phases
428 (add-after 'unpack 'patch-autogen
429 (lambda _
430 (let ((autoconf (which "autoconf"))
431 (autoheader (which "autoheader"))
432 (aclocal (which "aclocal"))
433 (automake (which "automake"))
434 (libtoolize (which "libtoolize")))
435 (substitute* "autogen.sh"
436 (("`which autoconf 2>/dev/null`") autoconf)
437 (("`which autoheader 2>/dev/null`") autoheader)
438 (("ACLOCAL=.*$")
439 (string-append "ACLOCAL=" aclocal "\n"))
440 (("AUTOMAKE=.*$")
441 (string-append "AUTOMAKE=" automake "\n"))
442 (("LIBTOOLIZE=.*$")
443 (string-append "LIBTOOLIZE=" libtoolize "\n"))))
444 #t)))))
445 (native-inputs
446 (list autoconf automake libtool pkg-config))
447 (inputs
448 (list geos))
449 (synopsis "Library to handle SQL/MM topologies")
450 (description
451 "The RT Topology Library exposes an API to create and manage standard
452 (ISO 13249 aka SQL/MM) topologies using user-provided data stores.")
453 (home-page "https://git.osgeo.org/gitea/rttopo/librttopo")
454 (license license:gpl2+)))
455
456 (define-public libspatialite
457 (package
458 (name "libspatialite")
459 (version "5.0.1")
460 (source
461 (origin
462 (method url-fetch)
463 (uri (string-append "https://www.gaia-gis.it/gaia-sins/libspatialite-"
464 version ".tar.gz"))
465 (sha256
466 (base32
467 "164y82rw2lrp5glfc0rkn7n6xvx5dvlgmh7bb7815067251wkjzf"))))
468 (build-system gnu-build-system)
469 (native-inputs
470 (list pkg-config))
471 (inputs
472 (list freexl
473 geos
474 librttopo
475 libxml2
476 minizip
477 proj
478 sqlite))
479 (arguments
480 `(#:configure-flags
481 '("--enable-rttopo=yes")
482 #:phases
483 (modify-phases %standard-phases
484 ;; 1 test is failing, ignore it:
485 (add-after 'unpack 'ignore-broken-tests
486 (lambda _
487 (substitute* '("test/Makefile.in")
488 (("check_wms\\$\\(EXEEXT\\) check_drop_rename\\$\\(EXEEXT\\) ")
489 "check_wms$(EXEEXT) ")))))))
490 (synopsis "Extend SQLite to support Spatial SQL capabilities")
491 (description
492 "SpatiaLite is a library intended to extend the SQLite core to support
493 fully fledged Spatial SQL capabilities.")
494 (home-page "https://www.gaia-gis.it/fossil/libspatialite/index")
495 ;; For the genuine libspatialite-sources holds:
496 ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked.
497 ;; Files under src/control_points are from GRASS
498 ;; and are licensed under GPL2+ only.
499 ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak.
500 (license (list license:gpl2+
501 license:lgpl2.1+
502 license:mpl1.1
503 license:public-domain))))
504
505 (define-public proj
506 (package
507 (name "proj")
508 (version "7.2.1")
509 (source
510 (origin
511 (method url-fetch)
512 (uri (string-append "http://download.osgeo.org/proj/proj-"
513 version ".tar.gz"))
514 (sha256
515 (base32
516 "050apzdn0isxpsblys1shrl9ccli5vd32kgswlgx1imrbwpg915k"))))
517 (build-system cmake-build-system)
518 (arguments
519 `(#:configure-flags '("-DUSE_EXTERNAL_GTEST=ON")
520 #:phases
521 (modify-phases %standard-phases
522 (add-after 'unpack 'fix-version
523 (lambda _
524 (substitute* "CMakeLists.txt"
525 (("MAJOR 7 MINOR 2 PATCH 0") "MAJOR 7 MINOR 2 PATCH 1")))))))
526 (inputs
527 (list curl libjpeg-turbo libtiff sqlite))
528 (native-inputs
529 (list googletest pkg-config))
530 (home-page "https://proj.org/")
531 (synopsis "Coordinate transformation software")
532 (description
533 "Proj is a generic coordinate transformation software that transforms
534 geospatial coordinates from one @acronym{CRS, coordinate reference system}
535 to another. This includes cartographic projections as well as geodetic
536 transformations. Proj includes command line applications for easy
537 conversion of coordinates from text files or directly from user input.
538 In addition, Proj also exposes an application programming interface that
539 lets developers use the functionality of Proj in their own software.")
540 (license (list license:expat
541 ;; src/projections/patterson.cpp
542 license:asl2.0
543 ;; src/geodesic.*, src/tests/geodtest.cpp
544 license:x11))))
545
546 (define-public proj.4
547 (package
548 (name "proj.4")
549 (version "4.9.3")
550 (source (origin
551 (method url-fetch)
552 (uri (string-append "http://download.osgeo.org/proj/proj-"
553 version ".tar.gz"))
554 (sha256
555 (base32
556 "1xw5f427xk9p2nbsj04j6m5zyjlyd66sbvl2bkg8hd1kx8pm9139"))))
557 (build-system gnu-build-system)
558 (arguments
559 `(#:phases
560 (modify-phases %standard-phases
561 (add-after 'unpack 'patch-test-paths
562 (lambda _
563 (substitute* '("nad/test27"
564 "nad/test83"
565 "nad/testvarious"
566 "nad/testdatumfile"
567 "nad/testflaky"
568 "nad/testIGNF")
569 (("/bin/rm") (which "rm")))
570 #t))
571 ;; Precision problems on i686 and other platforms. See:
572 ;; https://web.archive.org/web/20151006134301/http://trac.osgeo.org/proj/ticket/255
573 ;; Disable failing test.
574 (add-after 'patch-test-paths 'ignore-failing-tests
575 (lambda _
576 (substitute* '("nad/Makefile.in")
577 (("\tPROJ_LIB.*" all) (string-append "#" all)))
578 #t)))))
579 (inputs
580 (list glib))
581 (home-page "https://proj.org/")
582 (synopsis "Cartographic Projections Library")
583 (description
584 "Proj.4 is a library for converting coordinates between cartographic
585 projections.")
586 (license (list license:expat
587 ;; src/PJ_patterson.c
588 license:asl2.0
589 ;; src/geodesic.c/h
590 license:x11
591 ;; Embedded EPSG database.
592 (license:non-copyleft "http://www.epsg.org/TermsOfUse")
593 ;; cmake/*
594 license:boost1.0))))
595
596 (define-public python-pyproj
597 (package
598 (name "python-pyproj")
599 (version "3.2.1")
600 (source
601 (origin
602 (method url-fetch)
603 (uri (pypi-uri "pyproj" version))
604 (sha256
605 (base32
606 "0xrqpy708qlyd7nqjra0dl7nvkqzaj9w0v7wq4j5pxazha9n14sa"))))
607 (build-system python-build-system)
608 (arguments
609 `(#:phases
610 (modify-phases %standard-phases
611 (add-after 'unpack 'set-proj-path
612 (lambda* (#:key inputs #:allow-other-keys)
613 (let ((proj (assoc-ref inputs "proj")))
614 (setenv "PROJ_DIR" proj)
615 (substitute* "pyproj/datadir.py"
616 (("(internal_datadir = ).*$" all var)
617 (string-append var "Path(\"" proj "/share/proj\")\n")))))))))
618 (inputs
619 (list proj))
620 (propagated-inputs
621 (list python-certifi))
622 (native-inputs
623 (list python-cython python-numpy python-pandas python-pytest
624 python-xarray))
625 (home-page "https://github.com/pyproj4/pyproj")
626 (synopsis
627 "Python interface to PROJ")
628 (description
629 "This package provides a Python interface to PROJ, a cartographic
630 projections and coordinate transformations library.")
631 (license license:expat)))
632
633 (define-public python-fiona
634 (package
635 (name "python-fiona")
636 (version "1.8.20")
637 (source
638 (origin
639 (method url-fetch)
640 (uri (pypi-uri "Fiona" version))
641 (sha256
642 (base32
643 "0fql7i7dg1xpbadmk8d26dwp91v7faixxc4wq14zg0kvhp9041d7"))))
644 (build-system python-build-system)
645 (arguments
646 `(#:phases
647 (modify-phases %standard-phases
648 (add-before 'check 'remove-local-fiona
649 (lambda _
650 ; This would otherwise interfere with finding the installed
651 ; fiona when running tests.
652 (delete-file-recursively "fiona")))
653 (replace 'check
654 (lambda* (#:key tests? inputs outputs #:allow-other-keys)
655 (add-installed-pythonpath inputs outputs)
656 (setenv "GDAL_ENABLE_DEPRECATED_DRIVER_GTM" "YES")
657 (when tests?
658 (invoke "pytest"
659 "-m" "not network and not wheel"
660 ;; FIXME: Find why the
661 ;; test_no_append_driver_cannot_append[PCIDSK]
662 ;; test is failing.
663 "-k" "not test_no_append_driver_cannot_append")))))))
664 (inputs
665 (list gdal))
666 (propagated-inputs
667 (list python-attrs
668 python-certifi
669 python-click
670 python-click-plugins
671 python-cligj
672 python-munch
673 python-setuptools
674 python-six
675 python-pytz))
676 (native-inputs
677 (list gdal ; for gdal-config
678 python-boto3
679 python-cython
680 python-pytest
681 python-pytest-cov))
682 (home-page "https://github.com/Toblerity/Fiona")
683 (synopsis
684 "Fiona reads and writes spatial data files")
685 (description
686 "Fiona is GDAL’s neat and nimble vector API for Python programmers.
687 Fiona is designed to be simple and dependable. It focuses on reading
688 and writing data in standard Python IO style and relies upon familiar
689 Python types and protocols such as files, dictionaries, mappings, and
690 iterators instead of classes specific to OGR. Fiona can read and write
691 real-world data using multi-layered GIS formats and zipped virtual file
692 systems and integrates readily with other Python GIS packages such as
693 pyproj, Rtree, and Shapely.")
694 (license license:bsd-3)))
695
696 (define-public python-geopandas
697 (package
698 (name "python-geopandas")
699 (version "0.10.2")
700 (source
701 (origin
702 (method url-fetch)
703 (uri (pypi-uri "geopandas" version))
704 (sha256
705 (base32
706 "1nvim2i47ap1zdwy6kxydskf1cir5g4ij8124wvmrqij0zklggzg"))))
707 (build-system python-build-system)
708 (arguments
709 '(#:phases
710 (modify-phases %standard-phases
711 (replace 'check
712 (lambda* (#:key tests? #:allow-other-keys)
713 (when tests?
714 (invoke "pytest"
715 ; Disable test that fails with
716 ; NotImplementedError in pandas.
717 "-k" "not test_fillna_no_op_returns_copy"
718 ; Disable tests that require internet access.
719 "-m" "not web")))))))
720 (propagated-inputs
721 (list python-fiona python-pandas python-pyproj python-shapely))
722 (native-inputs
723 (list python-pytest))
724 (home-page "http://geopandas.org")
725 (synopsis "Geographic pandas extensions")
726 (description "The goal of GeoPandas is to make working with
727 geospatial data in Python easier. It combines the capabilities of
728 Pandas and Shapely, providing geospatial operations in Pandas and a
729 high-level interface to multiple geometries to Shapely. GeoPandas
730 enables you to easily do operations in Python that would otherwise
731 require a spatial database such as PostGIS.")
732 (license license:bsd-3)))
733
734 (define-public mapnik
735 (package
736 (name "mapnik")
737 (version "3.0.18")
738 (source
739 (origin
740 (method url-fetch)
741 (uri (string-append "https://github.com/mapnik/mapnik/releases/download/v"
742 version "/mapnik-v" version ".tar.bz2"))
743 (sha256
744 (base32
745 "06frcikaj2mgz3abfk5h0z4j3hbksi0zikwjngbjv4p5f3pwxf8q"))))
746 (build-system scons-build-system)
747 (inputs
748 (list boost
749 cairo
750 freetype
751 harfbuzz
752 icu4c
753 libjpeg-turbo
754 libpng
755 libtiff
756 libwebp
757 libxml2
758 proj.4
759 sqlite
760 zlib))
761 (native-inputs
762 (list pkg-config))
763 (arguments
764 `(#:scons ,scons-python2
765 #:scons-flags
766 (list "CC=gcc"
767 (string-append "PREFIX=" %output)
768 (string-append "CUSTOM_LDFLAGS=-Wl,-rpath=" %output "/lib"))))
769 (home-page "https://mapnik.org/")
770 (synopsis "Toolkit for developing mapping applications")
771 (description "Mapnik is a toolkit for developing mapping applications. It
772 is basically a collection of geographic objects like maps, layers,
773 datasources, features, and geometries. At its core is a C++ shared library
774 providing algorithms and patterns for spatial data access and visualization.
775 The library does not rely on any specific windowing system and can be deployed
776 to any server environment. It is intended to play fair in a multi-threaded
777 environment and is aimed primarily, but not exclusively, at web-based
778 development.")
779 (license (list license:lgpl2.1+
780 ;; demo/viewer, demo/python/rundemo.py
781 license:gpl2+
782 ;; deps/boost, deps/mapbox, deps/agg/include/agg_conv_offset.h
783 license:boost1.0
784 ;; deps/mapnik/sparsehash
785 license:bsd-3
786 ;; deps/agg
787 (license:non-copyleft "file://deps/agg/copying")))))
788
789 (define-public spatialite-gui
790 (package
791 (name "spatialite-gui")
792 (version "2.1.0-beta1")
793 (source
794 (origin
795 (method url-fetch)
796 (uri (string-append
797 "https://www.gaia-gis.it/gaia-sins/spatialite-gui-sources/"
798 "spatialite_gui-" version ".tar.gz"))
799 (sha256
800 (base32 "0cyv4cycl073p9lnnnglcb72qn71g8h9g5zn4gzw7swcy5nxjj5s"))))
801 (build-system gnu-build-system)
802 (native-inputs
803 (list pkg-config))
804 (inputs
805 (list curl
806 freexl
807 geos
808 giflib
809 libjpeg-turbo
810 librasterlite2
811 librttopo
812 libspatialite
813 libwebp
814 libxlsxwriter
815 libxml2
816 lz4
817 minizip
818 openjpeg
819 postgresql
820 proj
821 sqlite
822 virtualpg
823 wxwidgets
824 `(,zstd "lib")))
825 (arguments
826 `(#:phases (modify-phases %standard-phases
827 (add-after 'unpack 'fix-gui
828 (lambda _
829 ;; Fix for the GUI not showing up.
830 (substitute* "Main.cpp"
831 (("Hide\\(\\);") ""))
832 #t)))))
833 (synopsis "Graphical user interface for SpatiaLite")
834 (description "Spatialite-gui provides a visual interface for viewing and
835 maintaining a spatialite database. You can easily see the structure of the
836 tables and data contents using point and click functions, many of which
837 construct common SQL queries, or craft your own SQL queries.")
838 (home-page "https://www.gaia-gis.it/fossil/spatialite_gui/index")
839 (license license:gpl3+)))
840
841 (define-public gdal
842 (package
843 (name "gdal")
844 (version "3.3.3")
845 (source (origin
846 (method url-fetch)
847 (uri (string-append
848 "http://download.osgeo.org/gdal/" version "/gdal-"
849 version ".tar.gz"))
850 (sha256
851 (base32
852 "0nk09lws1hk873yn5f4wzqfvr82gm4hw3gq8w9g1h0kvf6j5x4i8"))
853 (modules '((guix build utils)))
854 (snippet
855 `(begin
856 ;; TODO: frmts contains a lot more bundled code.
857 (for-each delete-file-recursively
858 ;; bundled code
859 '("frmts/png/libpng"
860 "frmts/gif/giflib"
861 "frmts/jpeg/libjpeg"
862 "frmts/jpeg/libjpeg12"
863 "frmts/gtiff/libtiff"
864 "frmts/gtiff/libgeotiff"
865 "frmts/zlib"
866 "ogr/ogrsf_frmts/geojson/libjson"))))))
867 (build-system gnu-build-system)
868 (arguments
869 `(#:tests? #f
870 #:configure-flags
871 (let-syntax ((with (syntax-rules ()
872 ((_ option input)
873 (string-append option "="
874 (assoc-ref %build-inputs input))))))
875 (list
876 ;; TODO: --with-pcidsk, --with-pcraster
877 (with "--with-freexl" "freexl")
878 (with "--with-libjson-c" "json-c")
879 (with "--with-png" "libpng")
880 (with "--with-webp" "libwebp")
881 (with "--with-gif" "giflib")
882 (with "--with-jpeg" "libjpeg-turbo")
883 (with "--with-libtiff" "libtiff")
884 (with "--with-geotiff" "libgeotiff")
885 (with "--with-libz" "zlib")
886 (with "--with-expat" "expat")
887 (with "--with-sqlite3" "sqlite")
888 "--with-pcre"))
889 #:phases
890 (modify-phases %standard-phases
891 (add-before 'build 'fix-path
892 (lambda _
893 (substitute* "frmts/mrf/mrf_band.cpp"
894 (("\"../zlib/zlib.h\"") "<zlib.h>")))))))
895 (inputs
896 (list expat
897 freexl
898 geos
899 giflib
900 json-c
901 libgeotiff
902 libjpeg-turbo
903 libpng
904 libtiff
905 libwebp
906 netcdf
907 pcre
908 postgresql ; libpq
909 proj
910 sqlite
911 zlib))
912 (native-inputs
913 (list pkg-config))
914 (home-page "https://gdal.org/")
915 (synopsis "Raster and vector geospatial data format library")
916 (description "GDAL is a translator library for raster and vector geospatial
917 data formats. As a library, it presents a single raster abstract data model
918 and single vector abstract data model to the calling application for all
919 supported formats. It also comes with a variety of useful command line
920 utilities for data translation and processing.")
921 (license (list
922 ;; general license
923 license:expat
924 ;; frmts/gtiff/tif_float.c, frmts/pcraster/libcsf,
925 ;; ogr/ogrsf_frmts/dxf/intronurbs.cpp, frmts/pdf/pdfdataset.cpp
926 ;; frmts/mrf/
927 license:bsd-3
928 ;; frmts/hdf4/hdf-eos/*
929 ;; similar to the expat license, but without guarantee exclusion
930 (license:non-copyleft "file://frmts/hdf4/hdf-eos/README")
931 ;; frmts/grib/degrib/
932 license:public-domain ; with guarantee exclusion
933 ;; port/cpl_minizip*
934 ;; Some bsd-inspired license
935 (license:non-copyleft "file://port/LICENCE_minizip")
936 ;; alg/internal_libqhull
937 ;; Some 5-clause license
938 (license:non-copyleft "file://alg/internal_libqhull/COPYING.txt")
939 ;; frmts/mrf/libLERC
940 license:asl2.0))))
941
942 (define-public python-gdal
943 (package (inherit gdal)
944 (name "python-gdal")
945 (build-system python-build-system)
946 (arguments
947 '(#:tests? #f ; no tests
948 #:phases
949 (modify-phases %standard-phases
950 (add-before 'build 'chdir
951 (lambda _
952 (chdir "swig/python")
953 #t)))))
954 (native-inputs '())
955 (propagated-inputs
956 (list python-numpy))
957 (inputs
958 (list gdal))
959 (synopsis "GDAL (Geospatial Data Abstraction Library) python bindings")))
960
961 (define-public python-pyshp
962 (package
963 (name "python-pyshp")
964 (version "2.1.3")
965 (source
966 (origin
967 (method git-fetch)
968 (uri (git-reference
969 (url "https://github.com/GeospatialPython/pyshp")
970 (commit version)))
971 (file-name (git-file-name name version))
972 (sha256
973 (base32 "0jsraqzq82pw19wvx84x7w5cs8agr44a9b5y0jjw540wim4xa73r"))))
974 (build-system python-build-system)
975 (arguments
976 `(#:phases
977 (modify-phases %standard-phases
978 (replace 'check
979 (lambda* (#:key tests? #:allow-other-keys)
980 (when tests?
981 ;; This is the only test file.
982 (invoke "python" "-m" "pytest" "test_shapefile.py")))))))
983 (native-inputs
984 (list python-pytest python-pytest-runner))
985 (home-page "https://github.com/GeospatialPython/pyshp")
986 (synopsis "Read/write support for ESRI Shapefile format")
987 (description
988 "The Python Shapefile Library (PyShp) reads and writes ESRI Shapefiles.")
989 (license license:expat)))
990
991 (define-public python-cartopy
992 (package
993 (name "python-cartopy")
994 ;; This is a post-release fix that adds build_ext to setup.py.
995 (version "0.19.0.post1")
996 (source
997 (origin
998 (method url-fetch)
999 (uri (pypi-uri "Cartopy" version))
1000 (sha256
1001 (base32 "0xnm8z3as3hriivdfd26s6vn5b63gb46x6vxw6gh1mwfm5rlg2sb"))))
1002 (build-system python-build-system)
1003 (arguments
1004 `(#:phases
1005 (modify-phases %standard-phases
1006 (replace 'check
1007 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1008 (when tests?
1009 (add-installed-pythonpath inputs outputs)
1010 (invoke "python" "-m" "pytest" "--pyargs" "cartopy"
1011 ;; These tests require online data.
1012 "-m" "not natural_earth and not network"
1013 ;; This one too but it's not marked as such.
1014 "-k" "not test_gridliner_labels_bbox_style")))))))
1015 (propagated-inputs
1016 (list python-matplotlib
1017 python-numpy
1018 python-pykdtree
1019 python-pyshp
1020 python-scipy
1021 python-shapely))
1022 (inputs
1023 (list geos proj))
1024 (native-inputs
1025 (list python-cython python-flufl-lock python-pytest))
1026 (home-page "https://scitools.org.uk/cartopy/docs/latest/")
1027 (synopsis "Cartographic library for visualisation")
1028 (description
1029 "Cartopy is a Python package designed to make drawing maps for data
1030 analysis and visualisation easy.
1031
1032 It features:
1033
1034 @itemize
1035 @item object oriented projection definitions
1036 @item point, line, polygon and image transformations between projections
1037 @item integration to expose advanced mapping in Matplotlib with a simple and
1038 intuitive interface
1039 @item powerful vector data handling by integrating shapefile reading with
1040 Shapely capabilities
1041 @end itemize")
1042 (license license:lgpl3+)))
1043
1044 (define-public postgis
1045 (package
1046 (name "postgis")
1047 (version "3.2.0")
1048 (source (origin
1049 (method url-fetch)
1050 (uri (string-append "https://download.osgeo.org/postgis/source/postgis-"
1051 version ".tar.gz"))
1052 (sha256
1053 (base32
1054 "1zbwa15rsvr05rmcidk21q3amndd0q4df4psp3zhqz4lqraf3fbs"))))
1055 (build-system gnu-build-system)
1056 (arguments
1057 `(#:tests? #f
1058 #:make-flags
1059 (list (string-append "datadir=" (assoc-ref %outputs "out") "/share")
1060 (string-append "docdir="(assoc-ref %outputs "out") "/share/doc")
1061 (string-append "pkglibdir="(assoc-ref %outputs "out") "/lib")
1062 (string-append "bindir=" (assoc-ref %outputs "out") "/bin"))
1063 #:phases
1064 (modify-phases %standard-phases
1065 (add-before 'build 'fix-install-path
1066 (lambda* (#:key outputs #:allow-other-keys)
1067 (substitute* '("raster/loader/Makefile" "raster/scripts/python/Makefile")
1068 (("\\$\\(DESTDIR\\)\\$\\(PGSQL_BINDIR\\)")
1069 (string-append (assoc-ref outputs "out") "/bin"))))))))
1070 (inputs
1071 (list gdal
1072 geos
1073 giflib
1074 json-c
1075 libjpeg-turbo
1076 libxml2
1077 pcre
1078 postgresql
1079 protobuf-c
1080 proj))
1081 (native-inputs
1082 (list perl pkg-config))
1083 (home-page "https://postgis.net")
1084 (synopsis "Spatial database extender for PostgreSQL")
1085 (description "PostGIS is a spatial database extender for PostgreSQL
1086 object-relational database. It adds support for geographic objects allowing
1087 location queries to be run in SQL. This package provides a PostgreSQL
1088 extension.")
1089 (license (list
1090 ;; General license
1091 license:gpl2+
1092 ;; loader/dbfopen, safileio.*, shapefil.h, shpopen.c
1093 license:expat
1094 ;; loader/getopt.*
1095 license:public-domain
1096 ;; doc/xsl
1097 license:bsd-3 ; files only say "BSD"
1098 ;; doc
1099 license:cc-by-sa3.0))))
1100
1101 (define-public tegola
1102 (package
1103 (name "tegola")
1104 (version "0.7.0")
1105 (source (origin
1106 (method url-fetch)
1107 (uri (string-append
1108 "https://github.com/go-spatial/tegola/archive/v"
1109 version ".tar.gz"))
1110 (file-name (string-append name "-" version ".tar.gz"))
1111 (sha256
1112 (base32
1113 "09vnzxfn0r70kmd776kcdfqxhzdj11syxa0b27z4ci1k367v7viw"))))
1114 (build-system go-build-system)
1115 (arguments
1116 `(#:import-path "github.com/go-spatial/tegola/cmd/tegola"
1117 #:unpack-path "github.com/go-spatial/tegola"
1118 #:phases
1119 (modify-phases %standard-phases
1120 (add-before 'build 'set-version
1121 (lambda _
1122 (with-directory-excursion "src/github.com/go-spatial/tegola"
1123 (substitute* '("cmd/tegola/cmd/root.go"
1124 "cmd/tegola_lambda/main.go")
1125 (("version not set") ,version)))
1126 #t)))))
1127 (home-page "https://tegola.io")
1128 (synopsis "Vector tile server for maps")
1129 (description "Tegola is a free vector tile server written in Go. Tegola
1130 takes geospatial data and slices it into vector tiles that can be efficiently
1131 delivered to any client.")
1132 (license (list
1133 license:expat
1134 ;; Some packages in vendor have other licenses
1135 license:asl2.0
1136 license:bsd-2
1137 license:bsd-3
1138 license:wtfpl2))))
1139
1140 (define-public imposm3
1141 (package
1142 (name "imposm3")
1143 (version "0.11.1")
1144 (source
1145 (origin
1146 (method url-fetch)
1147 (uri (string-append "https://github.com/omniscale/imposm3/archive/v"
1148 version ".tar.gz"))
1149 (file-name (string-append name "-" version ".tar.gz"))
1150 (sha256
1151 (base32
1152 "1w7b221z5k9254zn01imycxkyw62xigqizhwvrgxqmq1m9r5410l"))))
1153 (build-system go-build-system)
1154 (arguments
1155 `(#:import-path "github.com/omniscale/imposm3/cmd/imposm"
1156 #:unpack-path "github.com/omniscale/imposm3"
1157 #:phases
1158 (modify-phases %standard-phases
1159 (add-before 'build 'set-version
1160 (lambda _
1161 (substitute* "src/github.com/omniscale/imposm3/version.go"
1162 (("0.0.0-dev") ,version))
1163 #t)))))
1164 (inputs
1165 (list geos leveldb))
1166 (home-page "https://imposm.org/")
1167 (synopsis "OpenStreetMap importer for PostGIS")
1168 (description "Imposm is an importer for OpenStreetMap data. It reads PBF
1169 files and imports the data into PostgreSQL/PostGIS databases. It is designed
1170 to create databases that are optimized for rendering/tile/map-services.")
1171 (license (list
1172 license:asl2.0
1173 ;; Some dependencies in vendor have different licenses
1174 license:expat
1175 license:bsd-2
1176 license:bsd-3))))
1177
1178 (define-public libosmium
1179 (package
1180 (name "libosmium")
1181 (version "2.17.2")
1182 (source
1183 (origin
1184 (method git-fetch)
1185 (uri (git-reference
1186 (url "https://github.com/osmcode/libosmium")
1187 (commit (string-append "v" version))))
1188 (file-name (git-file-name name version))
1189 (sha256
1190 (base32 "0xgwicnzlyr8pcpgx528xrzh7g6rjfd7f80bi30478fnp8mq8rzr"))))
1191 (build-system cmake-build-system)
1192 (propagated-inputs
1193 (list boost
1194 bzip2
1195 expat
1196 gdal
1197 geos
1198 lz4
1199 proj
1200 protozero
1201 sparsehash
1202 utfcpp
1203 zlib))
1204 (native-inputs
1205 (list doxygen))
1206 (home-page "https://osmcode.org/libosmium/")
1207 (synopsis "C++ library for working with OpenStreetMap data")
1208 (description "Libosmium is a fast and flexible C++ library for working with
1209 OpenStreetMap data.")
1210 (license license:boost1.0)))
1211
1212 (define-public osm2pgsql
1213 (package
1214 (name "osm2pgsql")
1215 (version "1.5.1")
1216 (source
1217 (origin
1218 (method git-fetch)
1219 (uri (git-reference
1220 (url "https://github.com/openstreetmap/osm2pgsql")
1221 (commit version)))
1222 (file-name (git-file-name name version))
1223 (sha256
1224 (base32 "0i18mskcs087dn3f3h9n7j0wafn8502m0h13mrjwin38xsz0crfj"))
1225 (modules '((guix build utils)))
1226 (snippet
1227 '(begin
1228 (delete-file-recursively "contrib/protozero")
1229 (delete-file-recursively "contrib/libosmium")
1230 #t))))
1231 (build-system cmake-build-system)
1232 (arguments
1233 `(#:tests? #f; tests fail because we need to setup a database
1234 #:configure-flags
1235 (list (string-append "-DOSMIUM_INCLUDE_DIR="
1236 (assoc-ref %build-inputs "libosmium")
1237 "/include")
1238 (string-append "-DPROTOZERO_INCLUDE_DIR="
1239 (assoc-ref %build-inputs "protozero")
1240 "/include"))))
1241 (inputs
1242 (list boost
1243 bzip2
1244 expat
1245 libosmium
1246 lua
1247 postgresql
1248 proj
1249 protozero
1250 zlib))
1251 (native-inputs
1252 (list python python-psycopg2))
1253 (home-page "https://github.com/openstreetmap/osm2pgsql")
1254 (synopsis "OSM data importer to postgresql")
1255 (description "Osm2pgsql is a tool for loading OpenStreetMap data into a
1256 PostgreSQL / PostGIS database suitable for applications like rendering into a
1257 map, geocoding with Nominatim, or general analysis.")
1258 (license license:gpl2+)))
1259
1260 (define-public tippecanoe
1261 (package
1262 (name "tippecanoe")
1263 (version "1.36.0")
1264 (source
1265 (origin
1266 (method git-fetch)
1267 (uri (git-reference
1268 (url "https://github.com/mapbox/tippecanoe")
1269 (commit version)))
1270 (file-name (git-file-name name version))
1271 (sha256
1272 (base32 "0lbmhly4ivnqc6qk1k3sdqvsg6x3nfd8gnjx846bhqj4wag3f88m"))))
1273 (build-system gnu-build-system)
1274 (arguments
1275 `(#:phases
1276 (modify-phases %standard-phases (delete 'configure))
1277 #:test-target "test"
1278 #:make-flags
1279 (list (string-append "CC=" ,(cc-for-target))
1280 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1281 (inputs
1282 (list perl sqlite zlib))
1283 (home-page "https://github.com/mapbox/tippecanoe")
1284 (synopsis "Vector tile server for maps")
1285 (description "Tippecanoe creates scale-independent view of data, so that
1286 the texture and density of features is visible at every zoom level, instead of
1287 dropping features at lower levels.")
1288 (license license:bsd-2)))
1289
1290 (define-public osmctools
1291 (package
1292 (name "osmctools")
1293 (version "0.9")
1294 (source
1295 (origin
1296 (method git-fetch)
1297 (uri (git-reference
1298 (url "https://gitlab.com/osm-c-tools/osmctools")
1299 (commit version)))
1300 (file-name (git-file-name name version))
1301 (sha256
1302 (base32
1303 "1m8d3r1q1v05pkr8k9czrmb4xjszw6hvgsf3kn9pf0v14gpn4r8f"))))
1304 (build-system gnu-build-system)
1305 (native-inputs
1306 (list autoconf automake))
1307 (inputs
1308 (list zlib))
1309 (home-page "https://gitlab.com/osm-c-tools/osmctools")
1310 (synopsis "Tools to convert, filter and update OpenStreetMap data files")
1311 (description "This project contains a few tools which are used in the
1312 OpenStreetMap project. They can be used to convert, filter and update
1313 OpenStreetMap data files.")
1314 (license license:agpl3)))
1315
1316 (define-public osm-gps-map
1317 (package
1318 (name "osm-gps-map")
1319 (version "1.1.0")
1320 (source
1321 (origin
1322 (method url-fetch)
1323 (uri (string-append
1324 "https://github.com/nzjrs/osm-gps-map/releases/download/"
1325 version "/osm-gps-map-" version ".tar.gz"))
1326 (sha256
1327 (base32
1328 "11imsf4cz1dpxdjh178k2s29axmq86rkfg1pqmn7incyxmjzhbwg"))))
1329 (build-system gnu-build-system)
1330 (native-inputs
1331 (list gnome-common gtk-doc/stable pkg-config))
1332 (inputs
1333 (list cairo glib gobject-introspection gtk+ libsoup-minimal-2))
1334 (home-page "https://nzjrs.github.io/osm-gps-map/")
1335 (synopsis "GTK+ widget for displaying OpenStreetMap tiles")
1336 (description
1337 "This package provides a GTK+ widget (and Python bindings) that when
1338 given GPS coordinates,draws a GPS track, and points of interest on a moving
1339 map display. Downloads map data from a number of websites, including
1340 @url{https://www.openstreetmap.org}.")
1341 (license license:gpl2+)))
1342
1343 (define-public xygrib
1344 (package
1345 (name "xygrib")
1346 (version "1.2.6.1")
1347 (source (origin
1348 (method git-fetch)
1349 (uri (git-reference
1350 (url "https://github.com/opengribs/XyGrib")
1351 (commit (string-append "v" version))))
1352 (file-name (git-file-name name version))
1353 (patches (search-patches "xygrib-fix-finding-data.patch"))
1354 (sha256
1355 (base32
1356 "0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia"))
1357 (modules '((guix build utils)))
1358 (snippet
1359 '(begin
1360 (delete-file-recursively "data/fonts")
1361 ;; Fixes compilation, can be removed with the next release.
1362 ;; Upstream link: https://github.com/opengribs/XyGrib/pull/255
1363 (substitute* "src/SkewT.h"
1364 (("QMessageBox>") "QMessageBox>\n#include <QPainterPath>"))
1365 #t))))
1366 (build-system cmake-build-system)
1367 (arguments
1368 `(#:configure-flags (list "-DGNU_PACKAGE=ON")
1369
1370 #:phases
1371 (modify-phases %standard-phases
1372 (add-after 'unpack 'patch-directories
1373 (lambda* (#:key inputs #:allow-other-keys)
1374 (let ((jpeg (assoc-ref inputs "openjpeg"))
1375 (font (assoc-ref inputs "font-liberation")))
1376 (substitute* "CMakeLists.txt"
1377 ;; Skip looking for the static library.
1378 (("\"libnova.a\"") ""))
1379 ;; Don't use the bundled font-liberation.
1380 (substitute* "src/util/Font.cpp"
1381 (("Util::pathFonts\\(\\)\\+\"liberation-fonts/\"")
1382 (string-append "\"" font "/share/fonts/truetype/\"")))
1383 (substitute* "src/util/Util.h"
1384 (("pathData\\(\\)\\+\"data/fonts/\"")
1385 (string-append "\"" font "/share/fonts/\"")))))))
1386 #:tests? #f)) ; no tests
1387 (native-inputs
1388 (list qttools))
1389 (inputs
1390 (list bzip2
1391 font-liberation
1392 libnova
1393 libpng
1394 openjpeg
1395 proj
1396 qtbase-5
1397 zlib))
1398 (native-search-paths
1399 (list (search-path-specification
1400 (variable "XDG_DATA_DIRS")
1401 (files '("share")))))
1402 (synopsis "Weather Forecast Visualization")
1403 (description
1404 "XyGrib is a Grib file reader and visualizes meteorological data providing
1405 an off-line capability to analyse weather forecasts or hindcasts. It is
1406 intended to be used as a capable weather work station for anyone with a serious
1407 interest in examining weather. This would include members of the sailing
1408 community, private and sport aviators, farmers, weather buffs and many more.
1409 XyGrib is the continuation of the zyGrib software package with a new team of
1410 volunteers.")
1411 (home-page "https://opengribs.org")
1412 (license license:gpl3+)))
1413
1414 (define-public libspatialindex
1415 (package
1416 (name "libspatialindex")
1417 (version "1.9.3")
1418 (source
1419 (origin
1420 (method url-fetch)
1421 (uri (string-append "https://github.com/libspatialindex/libspatialindex/"
1422 "releases/download/" version "/spatialindex-src-"
1423 version ".tar.bz2"))
1424 (sha256
1425 (base32
1426 "02n5vjcyk04w0djidyp21hfbxfpbbara8ifd9nml6158rwqr8lja"))))
1427 (build-system cmake-build-system)
1428 (home-page "https://libspatialindex.org")
1429 (synopsis "Spatial indexing library")
1430 (description "The purpose of this library is to provide:
1431
1432 @itemize
1433 @item An extensible framework that will support robust spatial indexing
1434 methods.
1435 @item Support for sophisticated spatial queries. Range, point location,
1436 nearest neighbor and k-nearest neighbor as well as parametric queries (defined
1437 by spatial constraints) should be easy to deploy and run.
1438 @item Easy to use interfaces for inserting, deleting and updating information.
1439 @item Wide variety of customization capabilities. Basic index and storage
1440 characteristics like the page size, node capacity, minimum fan-out, splitting
1441 algorithm, etc. should be easy to customize.
1442 @item Index persistence. Internal memory and external memory structures
1443 should be supported. Clustered and non-clustered indices should be easy to be
1444 persisted.
1445 @end itemize
1446 ")
1447 (license license:expat)))
1448
1449 (define-public python-rtree
1450 (package
1451 (name "python-rtree")
1452 (version "0.9.7")
1453 (source
1454 (origin
1455 (method url-fetch)
1456 (uri (pypi-uri "Rtree" version))
1457 (sha256
1458 (base32 "0gna530vy6rh76035cqh7i2lx199cvxjrzjczg9rm6k96k5751xy"))))
1459 (build-system python-build-system)
1460 (arguments
1461 `(#:phases
1462 (modify-phases %standard-phases
1463 (add-after 'unpack 'find-libspatialindex
1464 (lambda* (#:key inputs #:allow-other-keys)
1465 (setenv "SPATIALINDEX_C_LIBRARY"
1466 (string-append (assoc-ref inputs "libspatialindex")
1467 "/lib/libspatialindex.so"))))
1468 (replace 'check
1469 (lambda* (#:key inputs outputs tests? #:allow-other-keys)
1470 (when tests?
1471 (add-installed-pythonpath inputs outputs)
1472 (invoke "python" "-m" "pytest")))))))
1473 (native-inputs
1474 (list python-numpy python-pytest python-wheel))
1475 (inputs
1476 (list libspatialindex))
1477 (home-page "https://github.com/Toblerity/rtree")
1478 (synopsis "R-Tree spatial index for Python GIS")
1479 (description
1480 "RTree is a Python package with bindings for @code{libspatialindex}.")
1481 (license license:expat)))
1482
1483 (define-public java-jmapviewer
1484 (package
1485 (name "java-jmapviewer")
1486 (version "2.13")
1487 (source (origin
1488 (method url-fetch)
1489 (uri (string-append "https://svn.openstreetmap.org/applications/"
1490 "viewer/jmapviewer/releases/" version
1491 "/JMapViewer-" version "-Source.zip"))
1492 (sha256
1493 (base32
1494 "0sy6r5fkbb9bclw0is6gwnbzz627m7pjfnsqydxz58pbndakkhrv"))))
1495 (build-system ant-build-system)
1496 (native-inputs
1497 (list unzip))
1498 (arguments
1499 `(#:build-target "pack"
1500 #:tests? #f; No tests
1501 #:phases
1502 (modify-phases %standard-phases
1503 (add-before 'build 'clean
1504 (lambda* _
1505 (invoke "ant" "clean")))
1506 (replace 'install
1507 (lambda* (#:key outputs #:allow-other-keys)
1508 (let ((dir (string-append (assoc-ref outputs "out") "/share/java/")))
1509 (mkdir-p dir)
1510 (copy-file "JMapViewer.jar" (string-append dir "JMapViewer.jar"))
1511 #t))))))
1512 (home-page "https://wiki.openstreetmap.org/wiki/JMapViewer")
1513 (synopsis "OSM map integration in Java")
1514 (description "JMapViewer is a Java component which easily
1515 integrates an OSM map view into your Java application. It is maintained as
1516 an independent project by the JOSM team.")
1517 (license license:gpl2)))
1518
1519 (define-public java-opening-hours-parser
1520 (package
1521 (name "java-opening-hours-parser")
1522 (version "0.23.0")
1523 (source (origin
1524 (method git-fetch)
1525 (uri (git-reference
1526 (url "https://github.com/simonpoole/OpeningHoursParser")
1527 (commit version)))
1528 (file-name (git-file-name name version))
1529 (sha256
1530 (base32
1531 "0yhbd2ix6h506aljh0jkrnp28m4xcqdcdpnqm30fn08kawdgxgsh"))))
1532 (build-system ant-build-system)
1533 (arguments
1534 `(#:jar-name "java-opening-hours-parser.jar"
1535 #:source-dir "src/main/java"
1536 #:phases
1537 (modify-phases %standard-phases
1538 (add-before 'build 'copy-resources
1539 (lambda _
1540 (copy-recursively "src/main/resources" "build/classes")
1541 #t))
1542 (add-before 'build 'generate-parser
1543 (lambda* _
1544 (let* ((dir "src/main/java/ch/poole/openinghoursparser")
1545 (file (string-append dir "/OpeningHoursParser.jj")))
1546 (invoke "javacc" "-DEBUG_PARSER=false"
1547 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1548 "-GRAMMAR_ENCODING=UTF-8"
1549 (string-append "-OUTPUT_DIRECTORY=" dir)
1550 file))
1551 #t)))))
1552 (inputs
1553 (list java-jetbrains-annotations))
1554 (native-inputs
1555 (list javacc java-junit java-hamcrest-core))
1556 (home-page "https://github.com/simonpoole/OpeningHoursParser")
1557 (synopsis "Java parser for the OpenStreetMap opening hour format")
1558 (description "This is a very simplistic parser for string values according
1559 to the OSM opening hours specification.")
1560 (license license:expat)))
1561
1562 (define-public josm
1563 (package
1564 (name "josm")
1565 (version "18360")
1566 (source (origin
1567 (method svn-fetch)
1568 (uri (svn-reference
1569 (url "https://josm.openstreetmap.de/svn/trunk")
1570 (revision (string->number version))
1571 (recursive? #f)))
1572 (sha256
1573 (base32
1574 "0j7fhzh6hs2b5r1a3d1xpy6f5r6q1kh79bck28raang8ldd754c6"))
1575 (file-name (string-append name "-" version "-checkout"))
1576 (modules '((guix build utils)))
1577 (snippet
1578 '(begin
1579 (for-each delete-file (find-files "." ".*.jar$"))
1580 #t))))
1581 (build-system ant-build-system)
1582 (native-inputs
1583 (list javacc))
1584 (inputs
1585 (list java-commons-jcs
1586 java-commons-compress
1587 java-jmapviewer
1588 java-jsonp-api
1589 java-jsonp-impl ; runtime dependency
1590 java-jsr305
1591 java-metadata-extractor
1592 java-opening-hours-parser
1593 java-openjfx-media
1594 java-signpost-core
1595 java-svg-salamander))
1596 (arguments
1597 `(#:tests? #f
1598 #:jar-name "josm.jar"
1599 #:phases
1600 (modify-phases %standard-phases
1601 (add-after 'unpack 'rm-build.xml
1602 (lambda* _
1603 (delete-file "build.xml")
1604 #t))
1605 (add-before 'build 'fix-revision
1606 (lambda* _
1607 (with-output-to-file "REVISION.XML"
1608 (lambda _
1609 (display
1610 (string-append "<info><entry><commit revision=\"" ,version "\">"
1611 "<date>1970-01-01 00:00:00 +0000</date>"
1612 "</commit></entry></info>"))))
1613 #t))
1614 (add-before 'build 'fix-jcs
1615 (lambda _
1616 ;; This version of JOSM uses an unreleased version of commons-jcs,
1617 ;; which has renamed its classes to another namespace. Rename them
1618 ;; back so they can be used with our version of jcs.
1619 (substitute* (find-files "." ".*.java$")
1620 (("jcs3") "jcs")
1621 (("ICache.NAME_COMPONENT_DELIMITER") "\":\""))
1622 #t))
1623 (add-before 'build 'fix-classpath
1624 (lambda* (#:key inputs #:allow-other-keys)
1625 (setenv "CLASSPATH"
1626 (string-join
1627 (filter
1628 (lambda (s)
1629 (let ((source (assoc-ref inputs "source")))
1630 (not (equal? (substring s 0 (string-length source))
1631 source))))
1632 (string-split (getenv "CLASSPATH") #\:))
1633 ":"))
1634 #t))
1635 (add-before 'build 'generate-parser
1636 (lambda* _
1637 (let* ((dir "src/org/openstreetmap/josm/gui/mappaint/mapcss")
1638 (out (string-append dir "/parsergen"))
1639 (file (string-append dir "/MapCSSParser.jj")))
1640 (mkdir-p "src/org/openstreetmap/josm/gui/mappaint/mapcss/parsergen")
1641 (invoke "javacc" "-DEBUG_PARSER=false"
1642 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1643 "-GRAMMAR_ENCODING=UTF-8"
1644 (string-append "-OUTPUT_DIRECTORY=" out)
1645 file))
1646 #t))
1647 (add-after 'build 'generate-epsg
1648 (lambda _
1649 (system* "javac" "scripts/BuildProjectionDefinitions.java"
1650 "-cp" "build/classes")
1651 (mkdir-p "data/projection")
1652 (with-output-to-file "data/projection/custom-epsg"
1653 (lambda _ (display "")))
1654 (invoke "java" "-cp" "build/classes:scripts:."
1655 "BuildProjectionDefinitions" ".")
1656 #t))
1657 (add-after 'generate-epsg 'copy-resources
1658 (lambda _
1659 (copy-recursively "resources" "build/classes")
1660 #t))
1661 (add-before 'install 'regenerate-jar
1662 (lambda _
1663 ;; We need to regenerate the jar file to add data.
1664 (delete-file "build/jar/josm.jar")
1665 (invoke "jar" "-cf" "build/jar/josm.jar" "-C"
1666 "build/classes" ".")
1667 #t))
1668 (add-before 'build 'copy-revision
1669 (lambda _
1670 (mkdir-p "build/classes")
1671 (with-output-to-file "build/classes/REVISION"
1672 (lambda _
1673 (display
1674 (string-append "Revision: " ,version "\n"
1675 "Is-Local-Build: true\n"
1676 "Build-Date: 1970-01-01 00:00:00 +0000\n"))))
1677 #t))
1678 (add-after 'install 'install-share-directories
1679 (lambda* (#:key outputs #:allow-other-keys)
1680 (let ((out (assoc-ref outputs "out"))
1681 (share-directories '("applications" "icons" "man" "menu"
1682 "metainfo" "mime" "pixmaps"))
1683 (desktop "org.openstreetmap.josm.desktop"))
1684 (for-each (lambda (directory)
1685 (copy-recursively (string-append
1686 "native/linux/tested/usr/share/"
1687 directory)
1688 (string-append
1689 out "/share/" directory)))
1690 share-directories)
1691 (substitute* (string-append out "/share/applications/" desktop)
1692 (("josm-MainApplication") "josm-gui-MainApplication")))
1693 #t))
1694 (add-after 'install 'install-bin
1695 (lambda* (#:key outputs inputs #:allow-other-keys)
1696 (let* ((out (assoc-ref outputs "out"))
1697 (bin (string-append out "/bin")))
1698 (mkdir-p bin)
1699 (with-output-to-file (string-append bin "/josm")
1700 (lambda _
1701 (display
1702 (string-append "#!/bin/sh\n"
1703 (assoc-ref inputs "jdk") "/bin/java"
1704 " -cp " out "/share/java/josm.jar:"
1705 (getenv "CLASSPATH")
1706 " org.openstreetmap.josm.gui.MainApplication"))))
1707 (chmod (string-append bin "/josm") #o755))
1708 #t)))))
1709 (home-page "https://josm.openstreetmap.de")
1710 (synopsis "OSM editor")
1711 (description "JOSM is an extensible editor for OpenStreetMap (OSM). It
1712 supports loading GPX tracks, background imagery and OSM data from local
1713 sources as well as from online sources and allows editing the OSM data (nodes,
1714 ways, and relations) and their metadata tags.")
1715 (license license:gpl2+)))
1716
1717 (define-public libmaxminddb
1718 (package
1719 (name "libmaxminddb")
1720 (version "1.4.3")
1721 (source
1722 (origin
1723 (method url-fetch)
1724 (uri (string-append "https://github.com/maxmind/libmaxminddb"
1725 "/releases/download/" version "/"
1726 "/libmaxminddb-" version ".tar.gz"))
1727 (sha256
1728 (base32 "0fd4a4sxiiwzbd5h74wl1ijnb7xybjyybb7q41vdq3w8nk3zdzd5"))))
1729 (build-system gnu-build-system)
1730 (arguments
1731 `(#:make-flags
1732 (list ,(string-append "CC=" (cc-for-target)))))
1733 (native-inputs
1734 (list perl))
1735 (home-page "https://maxmind.github.io/libmaxminddb/")
1736 (synopsis "C library for the MaxMind DB file format")
1737 (description "The libmaxminddb library provides a C library for reading
1738 MaxMind DB files, including the GeoIP2 databases from MaxMind. The MaxMind DB
1739 format is a custom, but open, binary format designed to facilitate fast
1740 lookups of IP addresses while allowing flexibility in the type of data
1741 associated with an address.")
1742 (license license:asl2.0)))
1743
1744 (define-public python-maxminddb
1745 (package
1746 (name "python-maxminddb")
1747 (version "1.5.1")
1748 (source
1749 (origin
1750 (method url-fetch)
1751 (uri (pypi-uri "maxminddb" version))
1752 (sha256
1753 (base32
1754 "0y9giw81k4wdmpryr4k42w50z292mf364a6vs1vxf83ksc9ig6j4"))))
1755 (build-system python-build-system)
1756 (arguments
1757 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1758 (inputs
1759 (list libmaxminddb))
1760 (home-page "https://www.maxmind.com/")
1761 (synopsis "Reader for the MaxMind DB format")
1762 (description "MaxMind DB is a binary file format that stores data indexed
1763 by IP address subnets (IPv4 or IPv6). This is a Python module for reading
1764 MaxMind DB files.")
1765 (license license:asl2.0)))
1766
1767 (define-public python-geoip2
1768 (package
1769 (name "python-geoip2")
1770 (version "2.9.0")
1771 (source
1772 (origin
1773 (method url-fetch)
1774 (uri (pypi-uri "geoip2" version))
1775 (sha256
1776 (base32
1777 "1w7cay5q6zawjzivqbwz5cqx1qbdjw6kbriccb7l46p7b39fkzzp"))))
1778 (build-system python-build-system)
1779 (arguments
1780 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1781 (inputs
1782 (list python-maxminddb python-requests))
1783 (home-page "https://www.maxmind.com/")
1784 (synopsis "MaxMind GeoIP2 API")
1785 (description "Provides an API for the GeoIP2 web services and databases.
1786 The API also works with MaxMind’s free GeoLite2 databases.")
1787 (license license:asl2.0)))
1788
1789 (define-public routino
1790 (package
1791 (name "routino")
1792 (version "3.3.3")
1793 (source
1794 (origin
1795 (method url-fetch)
1796 (uri (string-append "http://www.routino.org/download/routino-"
1797 version ".tgz"))
1798 (sha256
1799 (base32 "1xa7l2bjn832nk6bc7b481nv8hd2gj41jwhg0d2qy10lqdvjpn5b"))))
1800 (build-system gnu-build-system)
1801 (native-inputs
1802 (list perl))
1803 (inputs
1804 (list bzip2 xz zlib))
1805 (arguments
1806 `(#:test-target "test"
1807 #:phases
1808 (modify-phases %standard-phases
1809 (replace 'configure
1810 (lambda* (#:key outputs #:allow-other-keys)
1811 (substitute* "Makefile.conf"
1812 (("prefix=/usr/local")
1813 (string-append "prefix=" (assoc-ref outputs "out")))
1814 (("LDFLAGS_LDSO=-Wl,-R\\.")
1815 "LDFLAGS_LDSO=-Wl,-R$(libdir)")
1816 (("#CFLAGS\\+=-DUSE_XZ")
1817 "CFLAGS+=-DUSE_XZ")
1818 (("#LDFLAGS\\+=-llzma")
1819 "LDFLAGS+=-llzma"))
1820 #t)))))
1821 (synopsis "Routing application for OpenStreetMap data")
1822 (description
1823 "Routino is an application for finding a route between two points
1824 using the dataset of topographical information collected by
1825 @url{https://www.OpenStreetMap.org}.")
1826 (home-page "https://www.routino.org/")
1827 (license license:agpl3+)))
1828
1829 (define-public qmapshack
1830 (package
1831 (name "qmapshack")
1832 (version "1.16.1")
1833 (source
1834 (origin
1835 (method git-fetch)
1836 (uri (git-reference
1837 (url "https://github.com/Maproom/qmapshack")
1838 (commit (string-append "V_" version))))
1839 (file-name (git-file-name name version))
1840 (sha256
1841 (base32 "184fqmsfzr3b333ssizjk6gvv7mncmygq8dj5r7rsvs5md26z2ys"))))
1842 (build-system qt-build-system)
1843 (native-inputs
1844 (list pkg-config qttools))
1845 (inputs
1846 (list gdal
1847 libjpeg-turbo
1848 proj
1849 qtbase-5
1850 qtdeclarative
1851 qtlocation
1852 qtwebchannel
1853 qtwebengine
1854 quazip
1855 routino
1856 sqlite ; See wrap phase
1857 zlib))
1858 (arguments
1859 `(#:tests? #f
1860 #:phases
1861 (modify-phases %standard-phases
1862 (add-after 'unpack 'fix-cmake-modules
1863 (lambda* (#:key inputs #:allow-other-keys)
1864 (substitute* "CMakeLists.txt"
1865 (("find_package\\(Qt5PrintSupport REQUIRED\\)" all)
1866 (string-append all "\nfind_package(Qt5Positioning REQUIRED)")))
1867 (substitute* "cmake/Modules/FindROUTINO.cmake"
1868 (("/usr/local")
1869 (assoc-ref inputs "routino"))))))))
1870 (synopsis "GPS mapping application")
1871 (description
1872 "QMapShack can be used to plan your next outdoor trip or to visualize and
1873 archive all the GPS recordings of your past trips. It is the successor of the
1874 QLandkarte GT application.")
1875 (home-page "https://github.com/Maproom/qmapshack/wiki")
1876 (license license:gpl3+)))
1877
1878 (define-public readosm
1879 (package
1880 (name "readosm")
1881 (version "1.1.0a")
1882 (source
1883 (origin
1884 (method url-fetch)
1885 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1886 "readosm-" version ".tar.gz"))
1887 (sha256
1888 (base32 "0igif2bxf4dr82glxz9gyx5mmni0r2dsnx9p9k6pxv3c4lfhaz6v"))))
1889 (build-system gnu-build-system)
1890 (inputs
1891 (list expat zlib))
1892 (synopsis "Data extractor for OpenStreetMap files")
1893 (description
1894 "ReadOSM is a library to extract valid data from within an OpenStreetMap
1895 input file (in @code{.osm} or @code{.osm.pbf} format).")
1896 (home-page "https://www.gaia-gis.it/fossil/readosm/index")
1897 (license (list license:gpl2+
1898 license:lgpl2.1+
1899 license:mpl1.1))))
1900
1901 (define-public shapelib
1902 (package
1903 (name "shapelib")
1904 (version "1.5.0")
1905 (source
1906 (origin
1907 (method git-fetch)
1908 (uri (git-reference
1909 (url "https://github.com/OSGeo/shapelib")
1910 (commit (string-append "v" version))))
1911 (file-name (git-file-name name version))
1912 (sha256
1913 (base32 "1lzch0jf6yqhw391phhafzw4ghmiz98zkf698h4fmq109fa2vhqd"))))
1914 (build-system gnu-build-system)
1915 (native-inputs
1916 (list autoconf automake libtool))
1917 (home-page "http://shapelib.maptools.org/")
1918 (synopsis "Provides C library to write and update ESRI Shapefiles")
1919 (description
1920 "The Shapefile C Library provides the ability to write simple C programs
1921 for reading, writing and updating (to a limited extent) ESRI Shapefiles, and the
1922 associated attribute file (@file{.dbf}).")
1923 (license license:gpl2+)))
1924
1925 (define-public spatialite-tools
1926 (package
1927 (name "spatialite-tools")
1928 (version "5.0.1")
1929 (source
1930 (origin
1931 (method url-fetch)
1932 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1933 "spatialite-tools-" version ".tar.gz"))
1934 (sha256
1935 (base32 "070p6pg541wvwb28wkn7k0z1qdyirik2qc2jpj4pf0vzx02w414n"))))
1936 (build-system gnu-build-system)
1937 (native-inputs
1938 (list pkg-config))
1939 (inputs
1940 (list expat
1941 freexl
1942 geos
1943 librttopo
1944 libspatialite
1945 libxml2
1946 minizip
1947 proj
1948 readosm
1949 sqlite))
1950 (synopsis "Collection of command line tools for SpatiaLite")
1951 (description
1952 "@code{spatialite-tools} is a collection of Command Line Interface (CLI)
1953 tools supporting SpatiaLite.")
1954 (home-page "https://www.gaia-gis.it/fossil/spatialite-tools/index")
1955 (license license:gpl3+)))
1956
1957 (define-public virtualpg
1958 (package
1959 (name "virtualpg")
1960 (version "2.0.1")
1961 (source
1962 (origin
1963 (method url-fetch)
1964 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1965 "virtualpg-" version ".tar.gz"))
1966 (sha256
1967 (base32 "12z0l7368r4116ljzg7nljy5hf425r11vxc540w79wlzikmynamy"))))
1968 (build-system gnu-build-system)
1969 (inputs
1970 (list postgresql sqlite))
1971 (synopsis "Allow SQLite/SpatiaLite to access PostgreSQL/PostGIS tables")
1972 (description
1973 "VirtualPG is a dynamic extension for the SQLite DBMS. It implements
1974 the VirtualPostgres driver, allowing to directly exchange data between SQLite
1975 and PostgreSQL; if SpatiaLite is available even PostGIS geometries can be
1976 exchanged form one Spatial DBMS and the other.")
1977 (home-page "https://www.gaia-gis.it/fossil/virtualpg/index")
1978 (license (list license:gpl2+
1979 license:lgpl2.1+
1980 license:mpl1.1))))
1981
1982 (define-public opencpn
1983 (package
1984 (name "opencpn")
1985 (version "5.2.4")
1986 (source
1987 (origin
1988 (method git-fetch)
1989 (uri (git-reference
1990 (url "https://github.com/OpenCPN/OpenCPN")
1991 (commit (string-append "v" version))))
1992 (file-name (git-file-name name version))
1993 (sha256
1994 (base32 "0ffx0lmz1mp5433zqyxigy4qqav32xprpagd66krvihkyvqp2y6y"))))
1995 (build-system cmake-build-system)
1996 (native-inputs
1997 `(("gettext" ,gettext-minimal)
1998 ("pkg-config" ,pkg-config)))
1999 (inputs
2000 (list bzip2
2001 cairo
2002 curl
2003 glu
2004 gtk+
2005 libarchive
2006 libelf
2007 libexif
2008 libsndfile
2009 lz4
2010 mesa
2011 pango
2012 portaudio
2013 sqlite
2014 tinyxml
2015 wxsvg
2016 wxwidgets
2017 xz
2018 zlib))
2019 (arguments
2020 `(#:configure-flags '("-DOCPN_USE_BUNDLED_LIBS=OFF"
2021 "-DOCPN_ENABLE_PORTAUDIO=ON"
2022 "-DOCPN_ENABLE_SNDFILE=ON"
2023 "-DOCPN_BUNDLE_TCDATA=ON"
2024 "-DOCPN_BUNDLE_GSHHS=ON")
2025 #:tests? #f ; No tests defined
2026 #:phases
2027 (modify-phases %standard-phases
2028 (add-after 'unpack 'fix-build
2029 (lambda* (#:key inputs #:allow-other-keys)
2030 (substitute* "CMakeLists.txt"
2031 (("wx-32.c; cc")
2032 "wx-32.c; gcc")
2033 (("\"/bin/sh\" \"-c\"")
2034 (string-append "\"" (which "bash") "\" \"-c\""))
2035 (("include\\(TargetSetup\\)")
2036 "set(PKG_TARGET \"guix\")\nset(PKG_TARGET_VERSION 1)")))))))
2037 (synopsis "Chart plotter and marine GPS navigation software")
2038 (description
2039 "OpenCPN is a chart plotter and marine navigation software designed to be
2040 used at the helm station of your boat while underway. Chart a course and
2041 track your position right from your laptop.")
2042 (home-page "https://opencpn.org/")
2043 (license (list license:asl2.0
2044 license:cc0
2045 license:bsd-2
2046 license:bsd-3
2047 license:expat
2048 license:gpl3+
2049 license:lgpl2.1+
2050 license:lgpl3+
2051 license:sgifreeb2.0
2052 license:zlib))))
2053
2054 (define-public openorienteering-mapper
2055 (package
2056 (name "openorienteering-mapper")
2057 (version "0.9.5")
2058 (source (origin
2059 (method git-fetch)
2060 (uri (git-reference
2061 (url "https://github.com/OpenOrienteering/mapper")
2062 (commit (string-append "v" version))))
2063 (file-name (git-file-name name version))
2064 (sha256
2065 (base32
2066 "11b578h8f3q9yvphbjhqmy2w1cfc9skslzawypqmc3k44v24aj0s"))))
2067 (build-system cmake-build-system)
2068 (arguments
2069 `(#:tests? #f
2070 #:configure-flags
2071 (list
2072 "-DLICENSING_PROVIDER:BOOL=OFF"
2073 "-DMapper_MANUAL_QTHELP:BOOL=OFF")))
2074 (inputs
2075 `(("clipper" ,clipper)
2076 ("cups" ,cups)
2077 ("gdal" ,gdal)
2078 ("proj" ,proj)
2079 ("qtbase" ,qtbase-5)
2080 ("qtimageformats" ,qtimageformats)
2081 ("qtlocation" ,qtlocation)
2082 ("qtsensors" ,qtsensors)
2083 ("zlib" ,zlib)))
2084 (native-inputs
2085 `(("doxygen" ,doxygen)
2086 ("qttools" ,qttools)))
2087 (home-page "https://www.openorienteering.org/apps/mapper/")
2088 (synopsis "OpenOrienteering Mapper (OOM)")
2089 (description
2090 "OpenOrienteering Mapper is a software for creating maps for the
2091 orienteering sport.")
2092 (license license:gpl3+)))
2093
2094 (define-public grass
2095 (let* ((version "7.8.6")
2096 (majorminor (string-join (list-head (string-split version #\.) 2) ""))
2097 (grassxx (string-append "grass" majorminor)))
2098 (package
2099 (name "grass")
2100 (version version)
2101 (source
2102 (origin
2103 (method url-fetch)
2104 (uri (string-append "https://grass.osgeo.org/" grassxx
2105 "/source/grass-" version ".tar.gz"))
2106 (sha256
2107 (base32 "1glk74ly3j0x8ymn4jp73s6y8qv7p3g5nv4gvb6l9qqplyq1fpnq"))))
2108 (build-system gnu-build-system)
2109 (inputs
2110 `(("bzip2" ,bzip2)
2111 ("cairo" ,cairo)
2112 ("fftw" ,fftw)
2113 ("freetype" ,freetype)
2114 ("gdal" ,gdal)
2115 ("geos" ,geos)
2116 ("glu" ,glu)
2117 ("lapack" ,lapack)
2118 ("libpng" ,libpng)
2119 ("libtiff" ,libtiff)
2120 ("mesa" ,mesa)
2121 ("mariadb-dev" ,mariadb "dev")
2122 ("mariadb-lib" ,mariadb "lib")
2123 ("netcdf" ,netcdf)
2124 ("openblas" ,openblas)
2125 ("perl" ,perl)
2126 ("postgresql" ,postgresql)
2127 ("proj" ,proj)
2128 ("python" ,python)
2129 ("python-dateutil" ,python-dateutil)
2130 ("python-numpy" ,python-numpy)
2131 ("python-wxpython" ,python-wxpython)
2132 ("readline" ,readline)
2133 ("sqlite" ,sqlite)
2134 ("wxwidgets" ,wxwidgets)
2135 ("zlib" ,zlib)
2136 ("zstd" ,zstd "lib")))
2137 (native-inputs
2138 `(("bash" ,bash-minimal)
2139 ("bison" ,bison)
2140 ("flex" ,flex)
2141 ("pkg-config" ,pkg-config)))
2142 (arguments
2143 `(#:tests? #f ; No tests
2144 #:modules ((guix build gnu-build-system)
2145 ((guix build python-build-system) #:prefix python:)
2146 (guix build utils))
2147 #:imported-modules (,@%gnu-build-system-modules
2148 (guix build python-build-system))
2149 #:phases
2150 (modify-phases %standard-phases
2151 (replace 'configure
2152 (lambda* (#:key inputs outputs #:allow-other-keys)
2153 (let ((shell (search-input-file inputs "/bin/bash")))
2154 (setenv "SHELL" shell)
2155 (setenv "CONFIG_SHELL" shell)
2156 (setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl,"
2157 (assoc-ref outputs "out")
2158 "/" ,grassxx "/lib")))
2159 (invoke "./configure"
2160 (string-append "--prefix="
2161 (assoc-ref outputs "out"))
2162 "--with-blas"
2163 "--with-bzlib"
2164 (string-append "--with-freetype-includes="
2165 (assoc-ref inputs "freetype")
2166 "/include/freetype2")
2167 (string-append "--with-freetype-libs="
2168 (assoc-ref inputs "freetype")
2169 "/lib")
2170 "--with-geos"
2171 "--with-lapack"
2172 "--with-mysql"
2173 (string-append "--with-mysql-includes="
2174 (assoc-ref inputs "mariadb-dev")
2175 "/include/mysql")
2176 (string-append "--with-mysql-libs="
2177 (assoc-ref inputs "mariadb-lib")
2178 "/lib")
2179 "--with-netcdf"
2180 "--with-postgres"
2181 (string-append "--with-proj-share="
2182 (assoc-ref inputs "proj")
2183 "/share/proj")
2184 "--with-pthread"
2185 "--with-readline"
2186 "--with-sqlite"
2187 "--with-wxwidgets")))
2188 (add-after 'install 'install-links
2189 (lambda* (#:key outputs #:allow-other-keys)
2190 ;; Put links for includes and libraries in the standard places.
2191 (let* ((out (assoc-ref outputs "out"))
2192 (dir (string-append out "/" ,grassxx)))
2193 (symlink (string-append dir "/include")
2194 (string-append out "/include"))
2195 (symlink (string-append dir "/lib")
2196 (string-append out "/lib")))
2197 #t))
2198 (add-after 'install-links 'python:wrap
2199 (assoc-ref python:%standard-phases 'wrap))
2200 (add-after 'python:wrap 'wrap-with-python-interpreter
2201 (lambda* (#:key outputs #:allow-other-keys)
2202 (let ((out (assoc-ref outputs "out")))
2203 (wrap-program (string-append out "/bin/" ,grassxx)
2204 `("GRASS_PYTHON" = (,(which "python3"))))
2205 #t))))))
2206 (synopsis "GRASS Geographic Information System")
2207 (description
2208 "GRASS (Geographic Resources Analysis Support System), is a Geographic
2209 Information System (GIS) software suite used for geospatial data management and
2210 analysis, image processing, graphics and maps production, spatial modeling, and
2211 visualization.")
2212 (home-page "https://grass.osgeo.org/")
2213 (license license:gpl2+))))
2214
2215 (define-public saga
2216 (package
2217 (name "saga")
2218 (version "7.9.0")
2219 (source
2220 (origin
2221 (method url-fetch)
2222 (uri (string-append "mirror://sourceforge/saga-gis/SAGA%20-%20"
2223 (version-major version) "/SAGA%20-%20" version
2224 "/saga-" version ".tar.gz"))
2225 (sha256
2226 (base32 "1n051yxxkylly0k9rlkx2ih3j2lf9d4csg00sm7161r7nhjvggd1"))))
2227 (build-system gnu-build-system)
2228 (native-inputs
2229 (list pkg-config swig))
2230 (inputs
2231 (list curl
2232 fftw
2233 gdal
2234 hdf5
2235 jasper
2236 libharu
2237 libtiff
2238 opencv
2239 postgresql
2240 proj
2241 python
2242 qhull
2243 unixodbc
2244 vigra
2245 wxwidgets))
2246 (arguments
2247 '(#:configure-flags '("--enable-python")))
2248 (synopsis "System for Automated Geoscientific Analyses")
2249 (description
2250 "SAGA (System for Automated Geoscientific Analyses) is a Geographic
2251 Information System (GIS) software. It has been designed for an easy and
2252 effective implementation of spatial algorithms and it offers a comprehensive,
2253 growing set of geoscientific methods.")
2254 (home-page "http://www.saga-gis.org")
2255 (license (list license:gpl2+ license:lgpl2.1+))))
2256
2257 (define-public qgis
2258 (package
2259 (name "qgis")
2260 (version "3.16.3")
2261 (source
2262 (origin
2263 (method url-fetch)
2264 (uri (string-append "https://qgis.org/downloads/qgis-"
2265 version ".tar.bz2"))
2266 (sha256
2267 (base32 "012dv8dcg7w4lf6k37i41wialwhi0kpkxw2dnq19yqqk35632mzx"))))
2268 (build-system cmake-build-system)
2269 (arguments
2270 `(#:modules ((guix build cmake-build-system)
2271 ((guix build python-build-system) #:prefix python:)
2272 (guix build qt-utils)
2273 (guix build utils))
2274 #:imported-modules (,@%cmake-build-system-modules
2275 (guix build python-build-system)
2276 (guix build qt-utils))
2277 #:configure-flags
2278 '("-DWITH_QTWEBKIT=NO")
2279 #:phases
2280 (modify-phases %standard-phases
2281 ;; Configure correct path to PyQt5 SIP directory
2282 (add-after 'unpack 'configure-pyqt5-sip-path
2283 (lambda* (#:key inputs #:allow-other-keys)
2284 (substitute* "cmake/FindPyQt5.py"
2285 (("sip_dir = cfg.default_sip_dir")
2286 (string-append "sip_dir = \""
2287 (assoc-ref inputs "python-pyqt+qscintilla")
2288 "/share/sip\""))
2289 ;; Fix building with python-sip@5.
2290 ;;
2291 ;; The reason for this is that python-sip@5 introduces some
2292 ;; changes such as a new build system 'sip-build' as well as the
2293 ;; use of the path "/lib/pythonX.X/site-packages/*/bindings/"
2294 ;; instead of "/share/sip/" for .sip files. However, we do not
2295 ;; actually use that those yet. QGIS detects SIP5 and assumes we
2296 ;; are, messing up the build. The long term solution is to fully
2297 ;; upgrade SIP, use sip-build and fix all failing packages, but
2298 ;; for now I just want to get the build working.
2299 ((".pyqt_sip_dir...os.path.join.*,")
2300 (string-append "'pyqt_sip_dir': \""
2301 (assoc-ref inputs "python-pyqt+qscintilla")
2302 "/share/sip" "\",")))
2303 (substitute* (list "scripts/prepare_commit.sh"
2304 "scripts/qstringfixup.sh"
2305 "scripts/release.pl"
2306 "scripts/runtests_local_travis_config.sh"
2307 "scripts/sip_include.sh"
2308 "scripts/sipdiff"
2309 "scripts/sipify_all.sh"
2310 "scripts/spell_check/check_spelling.sh"
2311 "scripts/spell_check/spell_test.sh"
2312 "scripts/verify_indentation.sh"
2313 "tests/code_layout/test_banned_keywords.sh"
2314 "tests/code_layout/test_licenses.sh"
2315 "tests/code_layout/test_shellcheck.sh"
2316 "tests/code_layout/test_sip_include.sh"
2317 "tests/code_layout/test_sipfiles.sh"
2318 "tests/code_layout/test_sipify.sh")
2319 (("\\$\\(git rev-parse --show-toplevel\\)")
2320 (getcwd)))
2321 (substitute* "tests/code_layout/test_sip_include.sh"
2322 (("^REV=.*") "REV=currentrev\n"))
2323 #t))
2324 (replace 'check
2325 (lambda* (#:key inputs tests? #:allow-other-keys)
2326 (when tests?
2327 (setenv "HOME" "/tmp")
2328 (system "Xvfb :1 &")
2329 (setenv "DISPLAY" ":1")
2330 (setenv "TRAVIS" "true")
2331 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
2332 (invoke "ctest"
2333 "-E" (string-join
2334 '(;; Disable tests that require network access
2335 "qgis_filedownloader"
2336 ;; TODO: Find why the following tests fail
2337 "ProcessingGdalAlgorithmsRasterTest"
2338 "ProcessingGdalAlgorithmsVectorTest"
2339 "ProcessingGrass7AlgorithmsImageryTest"
2340 "ProcessingGrass7AlgorithmsRasterTest"
2341 "ProcessingGrass7AlgorithmsVectorTest"
2342 "ProcessingOtbAlgorithmsTest"
2343 "ProcessingQgisAlgorithmsTestPt1"
2344 "ProcessingQgisAlgorithmsTestPt2"
2345 "ProcessingQgisAlgorithmsTestPt3"
2346 "ProcessingQgisAlgorithmsTestPt4"
2347 "PyCoreAdittions"
2348 "PyQgsAnnotation"
2349 "PyQgsAppStartup"
2350 "PyQgsAuthBasicMethod"
2351 "PyQgsAuthenticationSystem"
2352 "PyQgsAuxiliaryStorage"
2353 "PyQgsDBManagerGpkg"
2354 "PyQgsDBManagerSpatialite"
2355 "PyQgsDataItem"
2356 "PyQgsFieldValidator"
2357 "PyQgsFileUtils"
2358 "PyQgsGeometryTest"
2359 "PyQgsImageCache"
2360 "PyQgsImportIntoPostGIS"
2361 "PyQgsLayerDependencies"
2362 "PyQgsLayerMetadata"
2363 "PyQgsLayout"
2364 "PyQgsLayoutExporter"
2365 "PyQgsLayoutHtml"
2366 "PyQgsLayoutLegend"
2367 "PyQgsLayoutMapGrid"
2368 "PyQgsMapLayer"
2369 "PyQgsMetadataBase"
2370 "PyQgsOGRProvider"
2371 "PyQgsOGRProviderGpkg"
2372 "PyQgsOapifProvider"
2373 "PyQgsPalLabelingLayout"
2374 "PyQgsProject"
2375 "PyQgsProviderConnectionGpkg"
2376 "PyQgsProviderConnectionPostgres"
2377 "PyQgsProviderConnectionSpatialite"
2378 "PyQgsPythonProvider"
2379 "PyQgsRasterLayer"
2380 "PyQgsRulebasedRenderer"
2381 "PyQgsSelectiveMasking"
2382 "PyQgsSettings"
2383 "PyQgsShapefileProvider"
2384 "PyQgsSpatialiteProvider"
2385 "PyQgsSvgCache"
2386 "PyQgsSymbolExpressionVariables"
2387 "PyQgsTextRenderer"
2388 "PyQgsVectorFileWriter"
2389 "PyQgsVectorLayer"
2390 "PyQgsVectorLayerUtils"
2391 "PyQgsVirtualLayerProvider"
2392 "PyQgsWFSProvider"
2393 "qgis_arcgisrestutilstest"
2394 "qgis_authmanagertest"
2395 "qgis_compositionconvertertest"
2396 "qgis_coordinatereferencesystemtest"
2397 "qgis_expressiontest"
2398 "qgis_fontmarkertest"
2399 "qgis_geometrycheckstest"
2400 "qgis_geometrytest"
2401 "qgis_gpsinformationwidget"
2402 "qgis_grassprovidertest7"
2403 "qgis_imagecachetest"
2404 "qgis_labelingenginetest"
2405 "qgis_layouthtmltest"
2406 "qgis_layoutlabeltest"
2407 "qgis_layoutmanualtabletest"
2408 "qgis_layoutmapgridtest"
2409 "qgis_layoutmaptest"
2410 "qgis_layoutmultiframetest"
2411 "qgis_layoutpicturetest"
2412 "qgis_layouttabletest"
2413 "qgis_layouttest"
2414 "qgis_mapdevicepixelratiotest"
2415 "qgis_maprendererjobtest"
2416 "qgis_ogrproviderguitest"
2417 "qgis_painteffecttest"
2418 "qgis_pallabelingtest"
2419 "qgis_processingtest"
2420 "qgis_rasterlayertest"
2421 "qgis_shellcheck"
2422 "qgis_sip_include"
2423 "qgis_sip_uptodate"
2424 "qgis_sipify"
2425 "qgis_styletest"
2426 "qgis_svgmarkertest"
2427 "qgis_taskmanagertest"
2428 "qgis_wcsprovidertest"
2429 "qgis_ziplayertest")
2430 "|")))))
2431 (add-after 'install 'wrap-python
2432 (assoc-ref python:%standard-phases 'wrap))
2433 (add-after 'wrap-python 'wrap-qt
2434 (lambda* (#:key outputs inputs #:allow-other-keys)
2435 (let ((out (assoc-ref outputs "out")))
2436 (wrap-qt-program "qgis" #:output out #:inputs inputs))
2437 #t))
2438 (add-after 'wrap-qt 'wrap-gis
2439 (lambda* (#:key inputs outputs #:allow-other-keys)
2440 ;; TODO: Find if there is a way to get SAGA to work.
2441 ;; Currently QGIS says "version of SAGA not supported".
2442 ;; Disable it for now.
2443 (let* ((out (assoc-ref outputs "out"))
2444 ;;(saga (string-append (assoc-ref inputs "saga") "/bin"))
2445 (grass-version ,(package-version grass))
2446 (grass-majorminor (string-join
2447 (list-head
2448 (string-split grass-version #\.) 2)
2449 ""))
2450 (grass (string-append (assoc-ref inputs "grass")
2451 "/grass" grass-majorminor)))
2452 (wrap-program (string-append out "/bin/qgis")
2453 ;;`("PATH" ":" prefix (,saga))
2454 `("QGIS_PREFIX_PATH" = (,out))
2455 `("GISBASE" = (,grass))))
2456 #t)))))
2457 (inputs
2458 (list exiv2
2459 expat
2460 gdal
2461 geos
2462 gpsbabel
2463 grass
2464 gsl
2465 hdf5
2466 libspatialindex
2467 libspatialite
2468 libxml2
2469 libzip
2470 netcdf
2471 postgresql
2472 proj
2473 protobuf
2474 python
2475 python-chardet
2476 python-dateutil
2477 python-future
2478 python-gdal
2479 python-jinja2
2480 python-numpy
2481 python-owslib
2482 python-psycopg2
2483 python-pygments
2484 python-pyqt+qscintilla
2485 python-pytz
2486 python-pyyaml
2487 python-requests
2488 python-sip
2489 python-six
2490 python-urllib3
2491 qca
2492 qscintilla
2493 qtbase-5
2494 qtdeclarative
2495 qtkeychain
2496 qtlocation
2497 qtserialport
2498 qtsvg
2499 qwt
2500 ;;("saga" ,saga)
2501 sqlite))
2502 (native-inputs
2503 (list bison
2504 flex
2505 perl
2506 perl-yaml-tiny
2507 pkg-config
2508 python-mock
2509 python-nose2
2510 qttools
2511 shellcheck
2512 xorg-server-for-tests))
2513 (home-page "https://qgis.org")
2514 (synopsis "Geographical information system")
2515 (description "QGIS is an easy to use Geographical Information
2516 System (GIS). It is a GIS data viewer and editor. QGIS supports a number of
2517 raster and vector data formats, with new support easily added using the plugin
2518 architecture.")
2519 (license
2520 (list
2521 license:asl1.1
2522 license:asl2.0
2523 license:bsd-2
2524 license:bsd-3
2525 license:boost1.0
2526 license:cc-by3.0
2527 license:cc-by4.0
2528 license:cc-by-sa3.0
2529 license:cc-by-sa4.0
2530 (license:fsdg-compatible "https://www.deviantart.com/elvensword")
2531 (license:fsf-free "file://debian/copyright" "Go Squared")
2532 license:expat
2533 license:fdl1.2+
2534 (license:fsf-free
2535 "https://www.deviantart.com/webgoddess/art/Reddish-Inspired-Gradients-42208824")
2536 (license:fsf-free
2537 "file://debian/copyright"
2538 "QT-Commercial or LGPL-2.1 with Digia Qt LGPL Exception 1.1 or GPL-3")
2539 license:gpl2
2540 license:gpl2+
2541 license:gpl3
2542 license:gpl3+
2543 license:isc
2544 license:lgpl2.0+
2545 license:lgpl2.1
2546 license:lgpl2.1+
2547 license:lgpl3
2548 (license:non-copyleft "file://debian/copyright" "BSD-like-gist")
2549 (license:non-copyleft "file://debian/copyright" "Jim Mossman Attribution")
2550 (license:non-copyleft
2551 "https://www.ncl.ucar.edu/Download/NCL_source_license.shtml"
2552 "NCL Source Code License")
2553 license:ogl-psi1.0
2554 license:opl1.0+
2555 license:public-domain
2556 license:qwt1.0))))
2557
2558 (define-public python-geographiclib
2559 (package
2560 (name "python-geographiclib")
2561 (version "1.50")
2562 (source
2563 (origin
2564 (method url-fetch)
2565 (uri (pypi-uri "geographiclib" version))
2566 (sha256
2567 (base32
2568 "0cn6ap5fkh3mkfa57l5b44z3gvz7j6lpmc9rl4g2jny2gvp4dg8j"))))
2569 (build-system python-build-system)
2570 (home-page "https://geographiclib.sourceforge.io/1.50/python/")
2571 (synopsis "Python geodesic routines from GeographicLib")
2572 (description
2573 "This is a python implementation of the geodesic routines in GeographicLib.")
2574 (license license:expat)))
2575
2576 (define-public python-geopy
2577 (package
2578 (name "python-geopy")
2579 (version "2.0.0")
2580 (source
2581 (origin
2582 (method url-fetch)
2583 (uri (pypi-uri "geopy" version))
2584 (sha256
2585 (base32
2586 "0fx0cv0kgbvynpmjgsvq2fpsyngd5idiscdn8pd5201f1ngii3mq"))))
2587 (build-system python-build-system)
2588 (propagated-inputs
2589 (list python-geographiclib))
2590 (native-inputs
2591 (list python-async-generator
2592 python-coverage
2593 python-flake8
2594 python-isort
2595 python-pytest
2596 python-pytest-aiohttp
2597 python-readme-renderer
2598 python-pytz))
2599 (home-page "https://github.com/geopy/geopy")
2600 (synopsis "Geocoding library for Python")
2601 (description "@code{geopy} is a Python client for several popular geocoding
2602 web services. @code{geopy} makes it easy for Python developers to locate the
2603 coordinates of addresses, cities, countries, and landmarks across the globe
2604 using third-party geocoders and other data sources.")
2605 (license license:expat)))
2606
2607 (define-public gplates
2608 (package
2609 (name "gplates")
2610 (version "2.3.0")
2611 (source (origin
2612 (method url-fetch)
2613 (uri "https://www.earthbyte.org/download/8421/")
2614 (file-name (string-append name "-" version ".tar.bz2"))
2615 (sha256
2616 (base32
2617 "0lrcmcxc924ixddii8cyglqlwwxvk7f00g4yzbss5i3fgcbh8n96"))))
2618 (build-system cmake-build-system)
2619 (arguments
2620 `(#:configure-flags (list "-DBoost_NO_BOOST_CMAKE=ON")
2621 #:tests? #f)) ;no test target
2622 (inputs
2623 `(("boost" ,boost)
2624 ("cgal" ,cgal)
2625 ("gdal" ,gdal)
2626 ("glew" ,glew)
2627 ("glu" ,glu)
2628 ("gmp" ,gmp)
2629 ("mesa" ,mesa)
2630 ("mpfr" ,mpfr)
2631 ("proj" ,proj)
2632 ("python-3" ,python-3)
2633 ("python-numpy" ,python-numpy)
2634 ("qt" ,qtbase-5)
2635 ("qtsvg" ,qtsvg)
2636 ("qtxmlpatterns" ,qtxmlpatterns)
2637 ("qwt" ,qwt)
2638 ("zlib" ,zlib)))
2639 (home-page "https://www.gplates.org")
2640 (synopsis "Plate tectonics simulation program")
2641 (description "GPlates is a plate tectonics program. Manipulate
2642 reconstructions of geological and paleogeographic features through geological
2643 time. Interactively visualize vector, raster and volume data.")
2644 (license license:gpl2+)))