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