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