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