licenses: Add Free Art License 1.3.
[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>
40b3e9da 11;;; Copyright © 2019, 2020, 2021 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>
f33e773c 16;;; Copyright © 2020, 2021 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)
9dea1618 154 ("gtk-doc" ,gtk-doc/stable)
7295171e
RG
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")
f33e773c 427 (version "5.0.1")
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
f33e773c 435 "164y82rw2lrp5glfc0rkn7n6xvx5dvlgmh7bb7815067251wkjzf"))))
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)
109f13c0
FG
445 ("proj" ,proj)
446 ("sqlite" ,sqlite)))
f6c507e1 447 (arguments
b202c702
FG
448 `(#:configure-flags
449 '("--enable-rttopo=yes")
450 #:phases
f6c507e1
BH
451 (modify-phases %standard-phases
452 ;; 3 tests are failing, ignore them:
453 (add-after 'unpack 'ignore-broken-tests
454 (lambda _
455 (substitute* '("test/Makefile.in")
109f13c0 456 (("\tcheck_sql_stmt.* (check_sql_.*)" all tiny) (string-append "\t" tiny))
f6c507e1
BH
457 (("(\tch.*) check_v.*ble2.*$" all vt1) (string-append vt1 " \\\n"))
458 (("\tch.* (check_v.*ble4.*)$" all vt4) (string-append "\t" vt4)))
459 #t)))))
460 (synopsis "Extend SQLite to support Spatial SQL capabilities")
461 (description
462 "SpatiaLite is a library intended to extend the SQLite core to support
463fully fledged Spatial SQL capabilities.")
464 (home-page "https://www.gaia-gis.it/fossil/libspatialite/index")
465 ;; For the genuine libspatialite-sources holds:
466 ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked.
467 ;; Files under src/control_points are from GRASS
468 ;; and are licensed under GPL2+ only.
469 ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak.
470 (license (list license:gpl2+
471 license:lgpl2.1+
472 license:mpl1.1
473 license:public-domain))))
474
3500d7ad
AI
475(define-public proj
476 (package
477 (name "proj")
9147d121 478 (version "6.3.1")
3500d7ad
AI
479 (source
480 (origin
481 (method url-fetch)
482 (uri (string-append "http://download.osgeo.org/proj/proj-"
483 version ".tar.gz"))
484 (sha256
485 (base32
9147d121 486 "1y46ij32j9b4x1kjnnlykcwk3kkjwkg44sfc1ziwm3a3g0ki3q3d"))))
3500d7ad
AI
487 (build-system gnu-build-system)
488 (inputs
489 `(("sqlite" ,sqlite)))
490 (native-inputs
491 `(("pkg-config" ,pkg-config)))
492 (home-page "https://proj.org/")
493 (synopsis "Coordinate transformation software")
494 (description
495 "Proj is a generic coordinate transformation software that transforms
496geospatial coordinates from one coordinate reference system (CRS) to another.
497This includes cartographic projections as well as geodetic transformations.
498PROJ includes command line applications for easy conversion of coordinates
499from text files or directly from user input. In addition, proj also exposes
500an application programming interface that lets developers use the
501functionality of proj in their own software.")
502 (license (list license:expat
503 ;; src/projections/patterson.cpp
504 license:asl2.0
505 ;; src/geodesic.*, src/tests/geodtest.cpp
506 license:x11))))
507
065d0125
BH
508(define-public proj.4
509 (package
510 (name "proj.4")
511 (version "4.9.3")
512 (source (origin
513 (method url-fetch)
514 (uri (string-append "http://download.osgeo.org/proj/proj-"
515 version ".tar.gz"))
516 (sha256
517 (base32
518 "1xw5f427xk9p2nbsj04j6m5zyjlyd66sbvl2bkg8hd1kx8pm9139"))))
519 (build-system gnu-build-system)
520 (arguments
521 `(#:phases
522 (modify-phases %standard-phases
523 (add-after 'unpack 'patch-test-paths
524 (lambda _
525 (substitute* '("nad/test27"
526 "nad/test83"
527 "nad/testvarious"
528 "nad/testdatumfile"
529 "nad/testflaky"
530 "nad/testIGNF")
531 (("/bin/rm") (which "rm")))
532 #t))
533 ;; Precision problems on i686 and other platforms. See:
534 ;; https://web.archive.org/web/20151006134301/http://trac.osgeo.org/proj/ticket/255
535 ;; Disable failing test.
536 (add-after 'patch-test-paths 'ignore-failing-tests
537 (lambda _
538 (substitute* '("nad/Makefile.in")
539 (("\tPROJ_LIB.*" all) (string-append "#" all)))
540 #t)))))
541 (inputs
542 `(("glib" ,glib)))
3fbb7bec 543 (home-page "https://proj.org/")
065d0125
BH
544 (synopsis "Cartographic Projections Library")
545 (description
546 "Proj.4 is a library for converting coordinates between cartographic
547projections.")
548 (license (list license:expat
549 ;; src/PJ_patterson.c
550 license:asl2.0
551 ;; src/geodesic.c/h
552 license:x11
553 ;; Embedded EPSG database.
554 (license:non-copyleft "http://www.epsg.org/TermsOfUse")
555 ;; cmake/*
556 license:boost1.0))))
f2b005f6
AI
557
558(define-public mapnik
559 (package
560 (name "mapnik")
561 (version "3.0.18")
562 (source
563 (origin
564 (method url-fetch)
565 (uri (string-append "https://github.com/mapnik/mapnik/releases/download/v"
566 version "/mapnik-v" version ".tar.bz2"))
567 (sha256
568 (base32
569 "06frcikaj2mgz3abfk5h0z4j3hbksi0zikwjngbjv4p5f3pwxf8q"))))
570 (build-system scons-build-system)
571 (inputs
572 `(("boost" ,boost)
573 ("cairo" ,cairo)
574 ("freetype" ,freetype)
575 ("harfbuzz" ,harfbuzz)
576 ("icu4c" ,icu4c)
577 ("libjpeg-turbo" ,libjpeg-turbo)
578 ("libpng" ,libpng)
579 ("libtiff" ,libtiff)
580 ("libwebp" ,libwebp)
581 ("libxml2" ,libxml2)
582 ("proj.4" ,proj.4)
583 ("sqlite" ,sqlite)
584 ("zlib" ,zlib)))
585 (native-inputs
586 `(("pkg-config" ,pkg-config)))
587 (arguments
588 `(#:scons ,scons-python2
589 #:scons-flags
590 (list "CC=gcc"
591 (string-append "PREFIX=" %output)
592 (string-append "CUSTOM_LDFLAGS=-Wl,-rpath=" %output "/lib"))))
711ebe77 593 (home-page "https://mapnik.org/")
f2b005f6
AI
594 (synopsis "Toolkit for developing mapping applications")
595 (description "Mapnik is a toolkit for developing mapping applications. It
596is basically a collection of geographic objects like maps, layers,
597datasources, features, and geometries. At its core is a C++ shared library
598providing algorithms and patterns for spatial data access and visualization.
599The library does not rely on any specific windowing system and can be deployed
600to any server environment. It is intended to play fair in a multi-threaded
601environment and is aimed primarily, but not exclusively, at web-based
602development.")
603 (license (list license:lgpl2.1+
604 ;; demo/viewer, demo/python/rundemo.py
605 license:gpl2+
606 ;; deps/boost, deps/mapbox, deps/agg/include/agg_conv_offset.h
607 license:boost1.0
608 ;; deps/mapnik/sparsehash
609 license:bsd-3
610 ;; deps/agg
611 (license:non-copyleft "file://deps/agg/copying")))))
612
f25e1e24
AI
613(define-public python2-mapnik
614 (package
615 (name "python2-mapnik")
616 (version "3.0.16")
617 (source
618 (origin
619 (method url-fetch)
620 (uri (string-append "https://github.com/mapnik/python-mapnik/archive/v"
621 version ".tar.gz"))
622 (file-name (string-append name "-" version ".tar.gz"))
623 (sha256
624 (base32
625 "0w7wg72gnwmbjani9sqk42p2jwqkrl9hsdkawahni5m05xsifcb4"))))
626 (build-system python-build-system)
627 (inputs
628 `(("boost" ,boost)
629 ("harfbuzz" ,harfbuzz)
630 ("icu4c" ,icu4c)
631 ("libjpeg-turbo" ,libjpeg-turbo)
632 ("libpng" ,libpng)
633 ("libtiff" ,libtiff)
634 ("libwebp" ,libwebp)
635 ("mapnik" ,mapnik)
636 ("proj.4" ,proj.4)
637 ("python2-pycairo" ,python2-pycairo)))
638 (native-inputs
639 (let ((test-data-input
640 (lambda (repository version hash)
641 (origin
642 (method url-fetch)
643 (uri (string-append "https://github.com/mapnik/" repository
644 "/archive/v" version ".tar.gz"))
645 (file-name (string-append "python-mapnik-" repository
646 "-" version ".tar.gz"))
647 (sha256 (base32 hash))))))
648 `(("python2-nose" ,python2-nose)
649 ;; Test data is released as separate tarballs
650 ("test-data"
651 ,(test-data-input "test-data" "3.0.18"
652 "10cvgn5gxn8ldrszj24zr1vzm5w76kqk4s7bl2zzp5yvkhh8lj1n"))
653 ("test-data-visual"
654 ,(test-data-input "test-data-visual" "3.0.18"
655 "1cb9ghy8sis0w5fkp0dvwxdqqx44rhs9a9w8g9r9i7md1c40r80i")))))
656 (arguments
657 `(#:python ,python-2 ; Python 3 support is incomplete, and the build fails
658 #:phases
659 (modify-phases %standard-phases
660 ;; Unpack test data into the source tree
661 (add-after 'unpack 'unpack-submodules
662 (lambda* (#:key inputs #:allow-other-keys)
663 (let ((unpack (lambda (source target)
664 (with-directory-excursion target
665 (invoke "tar" "xvf" (assoc-ref inputs source)
666 "--strip-components=1")))))
667 (unpack "test-data" "test/data")
668 (unpack "test-data-visual" "test/data-visual"))))
669 ;; Skip failing tests
670 (add-after 'unpack 'skip-tests
671 (lambda _
672 (let ((skipped-tests (list "test_vrt_referring_to_missing_files"
673 "test_unicode_regex_replace"
674 "test_proj_antimeridian_bbox"
675 "test_render_with_scale_factor")))
676 (substitute* "setup.cfg"
677 (("\\[nosetests\\]" all)
678 (string-append all "\nexclude=^("
679 (string-join skipped-tests "|") ")$")))))))))
680 (home-page "https://github.com/mapnik/python-mapnik")
681 (synopsis "Python bindings for Mapnik")
682 (description "This package provides Python bindings for Mapnik.")
683 (license license:lgpl2.1+)))
a2a53274
BH
684
685(define-public spatialite-gui
686 (package
687 (name "spatialite-gui")
688 (version "1.7.1")
689 (source
690 (origin
691 (method url-fetch)
692 (uri (string-append "https://www.gaia-gis.it/gaia-sins/spatialite_gui-"
693 version ".tar.gz"))
694 (sha256
695 (base32
696 "1r05dz9pyc8vsd2wbqxcsracpfbaamz470rcyp2myfpqwznv376b"))))
697 (build-system gnu-build-system)
698 (native-inputs
699 `(("pkg-config" ,pkg-config)))
700 (inputs
701 `(("freexl" ,freexl)
702 ("geos" ,geos)
703 ("libgaiagraphics" ,libgaiagraphics)
e8906d86 704 ("libjpeg-turbo" ,libjpeg-turbo)
a2a53274
BH
705 ("libspatialite" ,libspatialite)
706 ("libxml2" ,libxml2)
707 ("proj.4" ,proj.4)
708 ("sqlite" ,sqlite)
709 ("wxwidgets" ,wxwidgets-2)
710 ("zlib" ,zlib)))
f7f67495
GLV
711 (arguments
712 `(#:phases (modify-phases %standard-phases
713 (add-after 'unpack 'fix-gui
714 (lambda _
715 ;; Fix for the GUI not showing up.
716 (substitute* "Main.cpp"
717 (("Hide\\(\\);") ""))
718 #t)))))
a2a53274
BH
719 (synopsis "Graphical user interface for SpatiaLite")
720 (description "Spatialite-gui provides a visual interface for viewing and
721 maintaining a spatialite database. You can easily see the structure of the
722 tables and data contents using point and click functions, many of which
723 construct common SQL queries, or craft your own SQL queries.")
724 (home-page "https://www.gaia-gis.it/fossil/spatialite_gui/index")
725 (license license:gpl3+)))
3d60f426 726
996e45cb
JL
727(define-public gdal
728 (package
729 (name "gdal")
b45be612 730 (version "3.1.2")
996e45cb
JL
731 (source (origin
732 (method url-fetch)
733 (uri (string-append
734 "http://download.osgeo.org/gdal/" version "/gdal-"
735 version ".tar.gz"))
736 (sha256
737 (base32
b45be612 738 "1p6nmlsr8wbyq350pa6c22vrp98dcsa7yjnqsbhdbp74yj53nw9r"))
996e45cb
JL
739 (modules '((guix build utils)))
740 (snippet
741 `(begin
742 ;; TODO: frmts contains a lot more bundled code.
743 (for-each delete-file-recursively
744 ;; bundled code
745 '("frmts/png/libpng"
746 "frmts/gif/giflib"
747 "frmts/jpeg/libjpeg"
748 "frmts/jpeg/libjpeg12"
749 "frmts/gtiff/libtiff"
750 "frmts/gtiff/libgeotiff"
751 "frmts/zlib"
752 "ogr/ogrsf_frmts/geojson/libjson"))))))
753 (build-system gnu-build-system)
754 (arguments
755 `(#:tests? #f
756 #:configure-flags
757 (let-syntax ((with (syntax-rules ()
758 ((_ option input)
759 (string-append option "="
760 (assoc-ref %build-inputs input))))))
761 (list
762 ;; TODO: --with-pcidsk, --with-pcraster
763 (with "--with-freexl" "freexl")
764 (with "--with-libjson-c" "json-c")
765 (with "--with-png" "libpng")
766 (with "--with-webp" "libwebp")
767 (with "--with-gif" "giflib")
109f022e 768 (with "--with-jpeg" "libjpeg-turbo")
996e45cb
JL
769 (with "--with-libtiff" "libtiff")
770 (with "--with-geotiff" "libgeotiff")
771 (with "--with-libz" "zlib")
0f054356 772 (with "--with-expat" "expat")
838db4fc 773 (with "--with-sqlite3" "sqlite")
996e45cb
JL
774 "--with-pcre"))
775 #:phases
776 (modify-phases %standard-phases
777 (add-before 'build 'fix-path
778 (lambda _
779 (substitute* "frmts/mrf/mrf_band.cpp"
780 (("\"../zlib/zlib.h\"") "<zlib.h>")))))))
781 (inputs
0f054356
AI
782 `(("expat" ,expat)
783 ("freexl" ,freexl)
996e45cb
JL
784 ("geos" ,geos)
785 ("giflib" ,giflib)
786 ("json-c" ,json-c)
787 ("libgeotiff" ,libgeotiff)
788 ("libjpeg-turbo" ,libjpeg-turbo)
789 ("libpng" ,libpng)
790 ("libtiff" ,libtiff)
791 ("libwebp" ,libwebp)
6cde0737 792 ("netcdf" ,netcdf)
996e45cb 793 ("pcre" ,pcre)
1ee58405 794 ("postgresql" ,postgresql) ; libpq
e72557c0 795 ("proj" ,proj)
838db4fc 796 ("sqlite" ,sqlite)
996e45cb 797 ("zlib" ,zlib)))
1ee58405
BH
798 (native-inputs
799 `(("pkg-config" ,pkg-config)))
e7453b3c 800 (home-page "https://gdal.org/")
996e45cb
JL
801 (synopsis "Raster and vector geospatial data format library")
802 (description "GDAL is a translator library for raster and vector geospatial
803data formats. As a library, it presents a single raster abstract data model
804and single vector abstract data model to the calling application for all
805supported formats. It also comes with a variety of useful command line
806utilities for data translation and processing.")
807 (license (list
808 ;; general license
809 license:expat
810 ;; frmts/gtiff/tif_float.c, frmts/pcraster/libcsf,
811 ;; ogr/ogrsf_frmts/dxf/intronurbs.cpp, frmts/pdf/pdfdataset.cpp
812 ;; frmts/mrf/
813 license:bsd-3
814 ;; frmts/hdf4/hdf-eos/*
815 ;; similar to the expat license, but without guarantee exclusion
816 (license:non-copyleft "file://frmts/hdf4/hdf-eos/README")
817 ;; frmts/grib/degrib/
818 license:public-domain ; with guarantee exclusion
819 ;; port/cpl_minizip*
820 ;; Some bsd-inspired license
821 (license:non-copyleft "file://port/LICENCE_minizip")
822 ;; alg/internal_libqhull
823 ;; Some 5-clause license
824 (license:non-copyleft "file://alg/internal_libqhull/COPYING.txt")
825 ;; frmts/mrf/libLERC
826 license:asl2.0))))
2b9be1a6 827
a18a27be
SB
828(define-public python-gdal
829 (package (inherit gdal)
830 (name "python-gdal")
831 (build-system python-build-system)
832 (arguments
833 '(#:tests? #f ; no tests
834 #:phases
835 (modify-phases %standard-phases
836 (add-before 'build 'chdir
837 (lambda _
838 (chdir "swig/python")
839 #t)))))
840 (native-inputs '())
841 (propagated-inputs
842 `(("python-numpy" ,python-numpy)))
843 (inputs
844 `(("gdal" ,gdal)))
845 (synopsis "GDAL (Geospatial Data Abstraction Library) python bindings")))
846
2b9be1a6
JL
847(define-public postgis
848 (package
849 (name "postgis")
47df4633 850 (version "3.1.1")
2b9be1a6
JL
851 (source (origin
852 (method url-fetch)
853 (uri (string-append "https://download.osgeo.org/postgis/source/postgis-"
854 version ".tar.gz"))
855 (sha256
856 (base32
47df4633 857 "0z9a39243fv37mansbbjq5mmxpnhr7xzn8pv92fr7dkdb3psz5hf"))))
2b9be1a6
JL
858 (build-system gnu-build-system)
859 (arguments
860 `(#:tests? #f
861 #:make-flags
862 (list (string-append "datadir=" (assoc-ref %outputs "out") "/share")
863 (string-append "docdir="(assoc-ref %outputs "out") "/share/doc")
864 (string-append "pkglibdir="(assoc-ref %outputs "out") "/lib")
865 (string-append "bindir=" (assoc-ref %outputs "out") "/bin"))
866 #:phases
867 (modify-phases %standard-phases
868 (add-before 'build 'fix-install-path
869 (lambda* (#:key outputs #:allow-other-keys)
870 (substitute* '("raster/loader/Makefile" "raster/scripts/python/Makefile")
871 (("\\$\\(DESTDIR\\)\\$\\(PGSQL_BINDIR\\)")
872 (string-append (assoc-ref outputs "out") "/bin"))))))))
873 (inputs
874 `(("gdal" ,gdal)
875 ("geos" ,geos)
bfffe6d2 876 ("giflib" ,giflib)
75e2c054
AI
877 ("json-c" ,json-c)
878 ("libjpeg" ,libjpeg-turbo)
2b9be1a6
JL
879 ("libxml2" ,libxml2)
880 ("pcre" ,pcre)
881 ("postgresql" ,postgresql)
47df4633 882 ("protobuf-c" ,protobuf-c)
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)
9dea1618 1140 ("gtk-doc" ,gtk-doc/stable)
ee34be73
GLV
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
40b3e9da
EF
1172 '(begin
1173 (delete-file-recursively "data/fonts")
1174 ;; Fixes compilation, can be removed with the next release.
1175 ;; Upstream link: https://github.com/opengribs/XyGrib/pull/255
1176 (substitute* "src/SkewT.h"
1177 (("QMessageBox>") "QMessageBox>\n#include <QPainterPath>"))
1178 #t))))
0f7b8a7f
EF
1179 (build-system cmake-build-system)
1180 (arguments
1181 `(#:phases
1182 (modify-phases %standard-phases
1183 (add-after 'unpack 'patch-directories
1184 (lambda* (#:key inputs #:allow-other-keys)
1185 (let ((jpeg (assoc-ref inputs "openjpeg"))
1186 (font (assoc-ref inputs "font-liberation")))
1187 (substitute* "CMakeLists.txt"
1188 ;; Find libjpeg.
1189 (("/usr") jpeg)
1190 ;; Fix install locations.
1191 (("set\\(PREFIX_BIN.*") "set(PREFIX_BIN \"bin\")\n")
1192 (("set\\(PREFIX_PKGDATA.*") "set(PREFIX_PKGDATA \"share/${PROJECT_NAME}\")\n")
1193 ;; Skip looking for the static library.
1194 (("\"libnova.a\"") ""))
1195 ;; Don't use the bundled font-liberation.
1196 (substitute* "src/util/Font.cpp"
1197 (("Util::pathFonts\\(\\)\\+\"liberation-fonts/\"")
1198 (string-append "\"" font "/share/fonts/truetype/\"")))
1199 (substitute* "src/util/Util.h"
1200 (("pathData\\(\\)\\+\"data/fonts/\"")
1201 (string-append "\"" font "/share/fonts/\""))))
1202 #t)))
1203 #:tests? #f)) ; no tests
1204 (native-inputs
1205 `(("qttools" ,qttools)))
1206 (inputs
1207 `(("bzip2" ,bzip2)
1208 ("font-liberation" ,font-liberation)
1209 ("libnova" ,libnova)
1210 ("libpng" ,libpng)
1211 ("openjpeg" ,openjpeg)
1212 ("proj.4" ,proj.4)
1213 ("qtbase" ,qtbase)
1214 ("zlib" ,zlib)))
1215 (synopsis "Weather Forecast Visualization")
1216 (description
1217 "XyGrib is a Grib file reader and visualizes meteorological data providing
1218an off-line capability to analyse weather forecasts or hindcasts. It is
1219intended to be used as a capable weather work station for anyone with a serious
1220interest in examining weather. This would include members of the sailing
1221community, private and sport aviators, farmers, weather buffs and many more.
1222XyGrib is the continuation of the zyGrib software package with a new team of
1223volunteers.")
1224 (home-page "https://opengribs.org")
1225 (license license:gpl3+)))
41b4b713
1226
1227(define-public libspatialindex
1228 (package
1229 (name "libspatialindex")
1cbe7a3e 1230 (version "1.9.3")
41b4b713
1231 (source
1232 (origin
1233 (method url-fetch)
1cbe7a3e
AI
1234 (uri (string-append "https://github.com/libspatialindex/libspatialindex/"
1235 "releases/download/" version "/spatialindex-src-"
1236 version ".tar.bz2"))
41b4b713
1237 (sha256
1238 (base32
1cbe7a3e
AI
1239 "02n5vjcyk04w0djidyp21hfbxfpbbara8ifd9nml6158rwqr8lja"))))
1240 (build-system cmake-build-system)
41b4b713
1241 (home-page "https://libspatialindex.org")
1242 (synopsis "Spatial indexing library")
1243 (description "The purpose of this library is to provide:
1244
1245@itemize
1246 @item An extensible framework that will support robust spatial indexing
1247methods.
1248 @item Support for sophisticated spatial queries. Range, point location,
1249 nearest neighbor and k-nearest neighbor as well as parametric queries (defined
1250by spatial constraints) should be easy to deploy and run.
1251 @item Easy to use interfaces for inserting, deleting and updating information.
1252 @item Wide variety of customization capabilities. Basic index and storage
1253characteristics like the page size, node capacity, minimum fan-out, splitting
1254algorithm, etc. should be easy to customize.
1255 @item Index persistence. Internal memory and external memory structures
1256should be supported. Clustered and non-clustered indices should be easy to be
1257persisted.
1258@end itemize
1259")
1260 (license license:expat)))
6dd0e41d
JL
1261
1262(define-public java-jmapviewer
1263 (package
1264 (name "java-jmapviewer")
8c8c0c63 1265 (version "2.13")
6dd0e41d
JL
1266 (source (origin
1267 (method url-fetch)
1268 (uri (string-append "https://svn.openstreetmap.org/applications/"
1269 "viewer/jmapviewer/releases/" version
1270 "/JMapViewer-" version "-Source.zip"))
1271 (sha256
1272 (base32
8c8c0c63 1273 "0sy6r5fkbb9bclw0is6gwnbzz627m7pjfnsqydxz58pbndakkhrv"))))
6dd0e41d
JL
1274 (build-system ant-build-system)
1275 (native-inputs
1276 `(("unzip" ,unzip)))
1277 (arguments
1278 `(#:build-target "pack"
1279 #:tests? #f; No tests
1280 #:phases
1281 (modify-phases %standard-phases
1282 (add-before 'build 'clean
1283 (lambda* _
1284 (invoke "ant" "clean")))
1285 (replace 'install
1286 (lambda* (#:key outputs #:allow-other-keys)
1287 (let ((dir (string-append (assoc-ref outputs "out") "/share/java/")))
1288 (mkdir-p dir)
54cc2b4e
BH
1289 (copy-file "JMapViewer.jar" (string-append dir "JMapViewer.jar"))
1290 #t))))))
6dd0e41d
JL
1291 (home-page "https://wiki.openstreetmap.org/wiki/JMapViewer")
1292 (synopsis "OSM map integration in Java")
4042f7f8
VC
1293 (description "JMapViewer is a Java component which easily
1294integrates an OSM map view into your Java application. It is maintained as
6dd0e41d
JL
1295an independent project by the JOSM team.")
1296 (license license:gpl2)))
f041db86 1297
f1abc566
JL
1298(define-public java-opening-hours-parser
1299 (package
1300 (name "java-opening-hours-parser")
1301 (version "0.21.4")
1302 (source (origin
1303 (method git-fetch)
1304 (uri (git-reference
1305 (url "https://github.com/simonpoole/OpeningHoursParser")
1306 (commit version)))
1307 (file-name (git-file-name name version))
1308 (sha256
1309 (base32
1310 "1m8sp0jbjyv1nq3ddj8rk6rf3sva3mkacc6vw7rsj0c2n57k3i50"))))
1311 (build-system ant-build-system)
1312 (arguments
1313 `(#:jar-name "java-opening-hours-parser.jar"
1314 #:source-dir "src/main/java"
1315 #:phases
1316 (modify-phases %standard-phases
1317 (add-before 'build 'copy-resources
1318 (lambda _
1319 (copy-recursively "src/main/resources" "build/classes")
1320 #t))
1321 (add-before 'build 'generate-parser
1322 (lambda* _
1323 (let* ((dir "src/main/java/ch/poole/openinghoursparser")
1324 (file (string-append dir "/OpeningHoursParser.jj")))
1325 (invoke "javacc" "-DEBUG_PARSER=false"
1326 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1327 "-GRAMMAR_ENCODING=UTF-8"
1328 (string-append "-OUTPUT_DIRECTORY=" dir)
1329 file))
1330 #t)))))
1331 (inputs
1332 `(("java-jetbrains-annotations" ,java-jetbrains-annotations)))
1333 (native-inputs
1334 `(("javacc" ,javacc)
1335 ("java-junit" ,java-junit)
1336 ("java-hamcrest-core" ,java-hamcrest-core)))
1337 (home-page "https://github.com/simonpoole/OpeningHoursParser")
1338 (synopsis "Java parser for the OpenStreetMap opening hour format")
1339 (description "This is a very simplistic parser for string values according
1340to the OSM opening hours specification.")
1341 (license license:expat)))
1342
f041db86
JL
1343(define-public josm
1344 (package
1345 (name "josm")
15657947 1346 (version "17329")
f041db86
JL
1347 (source (origin
1348 (method svn-fetch)
1349 (uri (svn-reference
1350 (url "https://josm.openstreetmap.de/svn/trunk")
1351 (revision (string->number version))
1352 (recursive? #f)))
1353 (sha256
1354 (base32
15657947 1355 "0bq6mirdsi0kmhjfzfp3innxi5a4395d7mas7ikxaz0cziljrz1i"))
f041db86
JL
1356 (file-name (string-append name "-" version "-checkout"))
1357 (modules '((guix build utils)))
1358 (snippet
1359 '(begin
1192ae94 1360 (for-each delete-file (find-files "." ".*.jar$"))
f041db86
JL
1361 #t))))
1362 (build-system ant-build-system)
1363 (native-inputs
1364 `(("javacc" ,javacc)))
1365 (inputs
1366 `(("java-commons-jcs" ,java-commons-jcs)
1367 ("java-commons-compress" ,java-commons-compress)
1368 ("java-jmapviewer" ,java-jmapviewer)
1369 ("java-jsonp-api" ,java-jsonp-api)
1370 ("java-jsonp-impl" ,java-jsonp-impl); runtime dependency
1371 ("java-metadata-extractor" ,java-metadata-extractor)
cfdb6770 1372 ("java-opening-hours-parser" ,java-opening-hours-parser)
f041db86
JL
1373 ("java-openjfx-media" ,java-openjfx-media)
1374 ("java-signpost-core" ,java-signpost-core)
1375 ("java-svg-salamander" ,java-svg-salamander)))
1376 (arguments
1377 `(#:tests? #f
1378 #:jar-name "josm.jar"
1379 #:phases
1380 (modify-phases %standard-phases
1381 (add-after 'unpack 'rm-build.xml
1382 (lambda* _
1383 (delete-file "build.xml")
1384 #t))
1385 (add-before 'build 'fix-revision
1386 (lambda* _
1387 (with-output-to-file "REVISION.XML"
1388 (lambda _
1389 (display
1390 (string-append "<info><entry><commit revision=\"" ,version "\">"
1391 "<date>1970-01-01 00:00:00 +0000</date>"
1392 "</commit></entry></info>"))))
1393 #t))
cfdb6770
JL
1394 (add-before 'build 'fix-jcs
1395 (lambda _
1396 ;; This version of JOSM uses an unreleased version of commons-jcs,
1397 ;; which has renamed its classes to another namespace. Rename them
1398 ;; back so they can be used with our version of jcs.
1399 (substitute* (find-files "." ".*.java$")
1400 (("jcs3") "jcs"))
1401 #t))
f041db86
JL
1402 (add-before 'build 'fix-classpath
1403 (lambda* (#:key inputs #:allow-other-keys)
1404 (setenv "CLASSPATH"
1405 (string-join
1406 (filter
1407 (lambda (s)
1408 (let ((source (assoc-ref inputs "source")))
1192ae94
CB
1409 (not (equal? (substring s 0 (string-length source))
1410 source))))
f041db86
JL
1411 (string-split (getenv "CLASSPATH") #\:))
1412 ":"))
1413 #t))
1414 (add-before 'build 'generate-parser
1415 (lambda* _
1416 (let* ((dir "src/org/openstreetmap/josm/gui/mappaint/mapcss")
1417 (out (string-append dir "/parsergen"))
1418 (file (string-append dir "/MapCSSParser.jj")))
1419 (mkdir-p "src/org/openstreetmap/josm/gui/mappaint/mapcss/parsergen")
1420 (invoke "javacc" "-DEBUG_PARSER=false"
1421 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1422 "-GRAMMAR_ENCODING=UTF-8"
1423 (string-append "-OUTPUT_DIRECTORY=" out)
1424 file))
1425 #t))
1426 (add-after 'build 'generate-epsg
1427 (lambda _
1428 (system* "javac" "scripts/BuildProjectionDefinitions.java"
1429 "-cp" "build/classes")
1430 (mkdir-p "data/projection")
1431 (with-output-to-file "data/projection/custom-epsg"
1432 (lambda _ (display "")))
1433 (invoke "java" "-cp" "build/classes:scripts:."
1434 "BuildProjectionDefinitions" ".")
1435 #t))
cfdb6770 1436 (add-after 'generate-epsg 'copy-resources
f041db86 1437 (lambda _
cfdb6770 1438 (copy-recursively "resources" "build/classes")
f041db86
JL
1439 #t))
1440 (add-before 'install 'regenerate-jar
1441 (lambda _
1442 ;; We need to regenerate the jar file to add data.
1443 (delete-file "build/jar/josm.jar")
1444 (invoke "jar" "-cf" "build/jar/josm.jar" "-C"
1445 "build/classes" ".")
1446 #t))
f041db86
JL
1447 (add-before 'build 'copy-revision
1448 (lambda _
1449 (mkdir-p "build/classes")
1450 (with-output-to-file "build/classes/REVISION"
1451 (lambda _
1452 (display
1453 (string-append "Revision: " ,version "\n"
1454 "Is-Local-Build: true\n"
1455 "Build-Date: 1970-01-01 00:00:00 +0000\n"))))
1456 #t))
1192ae94
CB
1457 (add-after 'install 'install-share-directories
1458 (lambda* (#:key outputs #:allow-other-keys)
1459 (let ((out (assoc-ref outputs "out"))
1460 (share-directories '("applications" "icons" "man" "menu"
1461 "metainfo" "mime" "pixmaps")))
1462 (for-each (lambda (directory)
1463 (copy-recursively (string-append
1464 "native/linux/tested/usr/share/"
1465 directory)
1466 (string-append
1467 out "/share/" directory)))
1468 share-directories))
1469 #t))
f041db86
JL
1470 (add-after 'install 'install-bin
1471 (lambda* (#:key outputs inputs #:allow-other-keys)
1472 (let* ((out (assoc-ref outputs "out"))
1473 (bin (string-append out "/bin")))
1474 (mkdir-p bin)
1475 (with-output-to-file (string-append bin "/josm")
1476 (lambda _
1477 (display
1478 (string-append "#!/bin/sh\n"
1479 (assoc-ref inputs "jdk") "/bin/java"
1480 " -cp " out "/share/java/josm.jar:"
1481 (getenv "CLASSPATH")
1482 " org.openstreetmap.josm.gui.MainApplication"))))
1483 (chmod (string-append bin "/josm") #o755))
1484 #t)))))
1485 (home-page "https://josm.openstreetmap.de")
1486 (synopsis "OSM editor")
1487 (description "JOSM is an extensible editor for OpenStreetMap (OSM). It
1488supports loading GPX tracks, background imagery and OSM data from local
9df26b02 1489sources as well as from online sources and allows editing the OSM data (nodes,
f041db86
JL
1490ways, and relations) and their metadata tags.")
1491 (license license:gpl2+)))
53c9b398
HG
1492
1493(define-public libmaxminddb
1494 (package
1495 (name "libmaxminddb")
07c0b3ce 1496 (version "1.4.3")
53c9b398
HG
1497 (source
1498 (origin
1499 (method url-fetch)
1500 (uri (string-append "https://github.com/maxmind/libmaxminddb"
1501 "/releases/download/" version "/"
1502 "/libmaxminddb-" version ".tar.gz"))
1503 (sha256
07c0b3ce 1504 (base32 "0fd4a4sxiiwzbd5h74wl1ijnb7xybjyybb7q41vdq3w8nk3zdzd5"))))
53c9b398
HG
1505 (build-system gnu-build-system)
1506 (arguments
2113ddb7
TGR
1507 `(#:make-flags
1508 (list ,(string-append "CC=" (cc-for-target)))))
53c9b398
HG
1509 (native-inputs
1510 `(("perl" ,perl)))
1511 (home-page "https://maxmind.github.io/libmaxminddb/")
1512 (synopsis "C library for the MaxMind DB file format")
1513 (description "The libmaxminddb library provides a C library for reading
1514MaxMind DB files, including the GeoIP2 databases from MaxMind. The MaxMind DB
1515format is a custom, but open, binary format designed to facilitate fast
1516lookups of IP addresses while allowing flexibility in the type of data
1517associated with an address.")
1518 (license license:asl2.0)))
b1414a81
HG
1519
1520(define-public python-maxminddb
1521 (package
1522 (name "python-maxminddb")
1523 (version "1.5.1")
1524 (source
1525 (origin
1526 (method url-fetch)
1527 (uri (pypi-uri "maxminddb" version))
1528 (sha256
1529 (base32
1530 "0y9giw81k4wdmpryr4k42w50z292mf364a6vs1vxf83ksc9ig6j4"))))
1531 (build-system python-build-system)
1532 (arguments
1533 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1534 (inputs
1535 `(("libmaxminddb" ,libmaxminddb)))
13b09bfc 1536 (home-page "https://www.maxmind.com/")
b1414a81
HG
1537 (synopsis "Reader for the MaxMind DB format")
1538 (description "MaxMind DB is a binary file format that stores data indexed
1539by IP address subnets (IPv4 or IPv6). This is a Python module for reading
1540MaxMind DB files.")
1541 (license license:asl2.0)))
0a71e34e
HG
1542
1543(define-public python-geoip2
1544 (package
1545 (name "python-geoip2")
1546 (version "2.9.0")
1547 (source
1548 (origin
1549 (method url-fetch)
1550 (uri (pypi-uri "geoip2" version))
1551 (sha256
1552 (base32
1553 "1w7cay5q6zawjzivqbwz5cqx1qbdjw6kbriccb7l46p7b39fkzzp"))))
1554 (build-system python-build-system)
1555 (arguments
1556 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1557 (inputs
1558 `(("python-maxminddb" ,python-maxminddb)
1559 ("python-requests" ,python-requests)))
13b09bfc 1560 (home-page "https://www.maxmind.com/")
0a71e34e
HG
1561 (synopsis "MaxMind GeoIP2 API")
1562 (description "Provides an API for the GeoIP2 web services and databases.
1563The API also works with MaxMind’s free GeoLite2 databases.")
1564 (license license:asl2.0)))
30fa6b16
GLV
1565
1566(define-public routino
1567 (package
1568 (name "routino")
e2492f58 1569 (version "3.3.3")
30fa6b16
GLV
1570 (source
1571 (origin
1572 (method url-fetch)
1573 (uri (string-append "http://www.routino.org/download/routino-"
1574 version ".tgz"))
1575 (sha256
e2492f58 1576 (base32 "1xa7l2bjn832nk6bc7b481nv8hd2gj41jwhg0d2qy10lqdvjpn5b"))))
30fa6b16
GLV
1577 (build-system gnu-build-system)
1578 (native-inputs
1579 `(("perl" ,perl)))
1580 (inputs
1581 `(("bzip2" ,bzip2)
1582 ("xz" ,xz)
1583 ("zlib" ,zlib)))
1584 (arguments
1585 `(#:test-target "test"
1586 #:phases
1587 (modify-phases %standard-phases
1588 (replace 'configure
1589 (lambda* (#:key outputs #:allow-other-keys)
1590 (substitute* "Makefile.conf"
1591 (("prefix=/usr/local")
1592 (string-append "prefix=" (assoc-ref outputs "out")))
1593 (("LDFLAGS_LDSO=-Wl,-R\\.")
1594 "LDFLAGS_LDSO=-Wl,-R$(libdir)")
1595 (("#CFLAGS\\+=-DUSE_XZ")
1596 "CFLAGS+=-DUSE_XZ")
1597 (("#LDFLAGS\\+=-llzma")
1598 "LDFLAGS+=-llzma"))
1599 #t)))))
1600 (synopsis "Routing application for OpenStreetMap data")
1601 (description
1602 "Routino is an application for finding a route between two points
1603using the dataset of topographical information collected by
1604@url{https://www.OpenStreetMap.org}.")
1605 (home-page "https://www.routino.org/")
1606 (license license:agpl3+)))
bccbeece
GLV
1607
1608(define-public qmapshack
1609 (package
1610 (name "qmapshack")
fc594863 1611 (version "1.15.2")
bccbeece
GLV
1612 (source
1613 (origin
1614 (method git-fetch)
1615 (uri (git-reference
b0e7b699 1616 (url "https://github.com/Maproom/qmapshack")
bccbeece
GLV
1617 (commit (string-append "V_" version))))
1618 (file-name (git-file-name name version))
1619 (sha256
fc594863 1620 (base32 "1l1j2axf94pdqwirwwhwy3y6k8v1aix78ifqbv6j8sv131h2j7y7"))))
bccbeece
GLV
1621 (build-system qt-build-system)
1622 (native-inputs
1623 `(("pkg-config" ,pkg-config)
1624 ("qttools" ,qttools)))
1625 (inputs
1626 `(("gdal" ,gdal)
1627 ("libjpeg-turbo" ,libjpeg-turbo)
1628 ("proj" ,proj)
1629 ("qtbase" ,qtbase)
1630 ("qtdeclarative" ,qtdeclarative)
1631 ("qtlocation" ,qtlocation)
1632 ("qtwebchannel" ,qtwebchannel)
1633 ("qtwebengine" ,qtwebengine)
1634 ("quazip" ,quazip)
1635 ("routino" ,routino)
3cfe76be 1636 ("sqlite" ,sqlite) ; See wrap phase
bccbeece
GLV
1637 ("zlib" ,zlib)))
1638 (arguments
1639 `(#:tests? #f
1640 #:phases
1641 (modify-phases %standard-phases
1642 (add-after 'unpack 'fix-cmake-modules
1643 (lambda* (#:key inputs #:allow-other-keys)
1644 (substitute* "CMakeLists.txt"
1645 (("find_package\\(Qt5PrintSupport REQUIRED\\)" all)
1646 (string-append all "\nfind_package(Qt5Positioning REQUIRED)")))
1647 (substitute* "cmake/Modules/FindROUTINO.cmake"
1648 (("/usr/local")
1649 (assoc-ref inputs "routino")))
1650 ;; The following fixes are included as patches in the sources
1651 ;; of QMapShack, but they are not applied by default, for
1652 ;; some reason...
1653 (invoke "patch" "-p1" "-i" "FindPROJ4.patch")
1654 (invoke "patch" "-p1" "-i" "FindQuaZip5.patch")
1655 #t))
1656 (add-after 'install 'wrap
5fcc5b38 1657 ;; The program fails to find the QtWebEngineProcess program,
bccbeece
GLV
1658 ;; so we set QTWEBENGINEPROCESS_PATH to help it.
1659 (lambda* (#:key inputs outputs #:allow-other-keys)
1660 (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
1661 (qtwebengineprocess (string-append
1662 (assoc-ref inputs "qtwebengine")
5fcc5b38 1663 "/lib/qt5/libexec/QtWebEngineProcess")))
bccbeece
GLV
1664 (for-each (lambda (program)
1665 (wrap-program program
bccbeece
GLV
1666 `("QTWEBENGINEPROCESS_PATH" =
1667 (,qtwebengineprocess))))
1668 (find-files bin ".*")))
1669 #t)))))
1670 (synopsis "GPS mapping application")
1671 (description
1672 "QMapShack can be used to plan your next outdoor trip or to visualize and
1673archive all the GPS recordings of your past trips. It is the successor of the
1674QLandkarte GT application.")
1675 (home-page "https://github.com/Maproom/qmapshack/wiki")
1676 (license license:gpl3+)))
133de9ab
GLV
1677
1678(define-public readosm
1679 (package
1680 (name "readosm")
86f8472b 1681 (version "1.1.0a")
133de9ab
GLV
1682 (source
1683 (origin
1684 (method url-fetch)
1685 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1686 "readosm-" version ".tar.gz"))
1687 (sha256
b7ab88bc 1688 (base32 "0igif2bxf4dr82glxz9gyx5mmni0r2dsnx9p9k6pxv3c4lfhaz6v"))))
133de9ab
GLV
1689 (build-system gnu-build-system)
1690 (inputs
1691 `(("expat" ,expat)
1692 ("zlib" ,zlib)))
1693 (synopsis "Data extractor for OpenStreetMap files")
1694 (description
1695 "ReadOSM is a library to extract valid data from within an OpenStreetMap
1696input file (in @code{.osm} or @code{.osm.pbf} format).")
1697 (home-page "https://www.gaia-gis.it/fossil/readosm/index")
1698 (license (list license:gpl2+
1699 license:lgpl2.1+
1700 license:mpl1.1))))
0ccc1385 1701
6be69452
SH
1702(define-public shapelib
1703 (package
1704 (name "shapelib")
1705 (version "1.5.0")
1706 (source
1707 (origin
1708 (method git-fetch)
1709 (uri (git-reference
1710 (url "https://github.com/OSGeo/shapelib")
1711 (commit (string-append "v" version))))
1712 (file-name (git-file-name name version))
1713 (sha256
1714 (base32 "1lzch0jf6yqhw391phhafzw4ghmiz98zkf698h4fmq109fa2vhqd"))))
1715 (build-system gnu-build-system)
1716 (native-inputs
1717 `(("autoconf" ,autoconf)
1718 ("automake" ,automake)
1719 ("libtool" ,libtool)))
1720 (home-page "http://shapelib.maptools.org/")
1721 (synopsis "Provides C library to write and update ESRI Shapefiles")
1722 (description
1723 "The Shapefile C Library provides the ability to write simple C programs
1724for reading, writing and updating (to a limited extent) ESRI Shapefiles, and the
1725associated attribute file (@file{.dbf}).")
1726 (license license:gpl2+)))
1727
0ccc1385
GLV
1728(define-public spatialite-tools
1729 (package
1730 (name "spatialite-tools")
f33e773c 1731 (version "5.0.1")
0ccc1385
GLV
1732 (source
1733 (origin
1734 (method url-fetch)
1735 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1736 "spatialite-tools-" version ".tar.gz"))
1737 (sha256
f33e773c 1738 (base32 "070p6pg541wvwb28wkn7k0z1qdyirik2qc2jpj4pf0vzx02w414n"))))
0ccc1385
GLV
1739 (build-system gnu-build-system)
1740 (native-inputs
1741 `(("pkg-config" ,pkg-config)))
1742 (inputs
1743 `(("expat" ,expat)
1744 ("freexl" ,freexl)
1745 ("geos" ,geos)
b202c702 1746 ("librttopo" ,librttopo)
0ccc1385
GLV
1747 ("libspatialite" ,libspatialite)
1748 ("libxml2" ,libxml2)
b202c702 1749 ("minizip" ,minizip)
109f13c0 1750 ("proj" ,proj)
0ccc1385 1751 ("readosm" ,readosm)
109f13c0 1752 ("sqlite" ,sqlite)))
0ccc1385
GLV
1753 (synopsis "Collection of command line tools for SpatiaLite")
1754 (description
1755 "@code{spatialite-tools} is a collection of Command Line Interface (CLI)
1756tools supporting SpatiaLite.")
1757 (home-page "https://www.gaia-gis.it/fossil/spatialite-tools/index")
1758 (license license:gpl3+)))
ec73c90e
GLV
1759
1760(define-public virtualpg
1761 (package
1762 (name "virtualpg")
b2a94e59 1763 (version "2.0.1")
ec73c90e
GLV
1764 (source
1765 (origin
1766 (method url-fetch)
1767 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1768 "virtualpg-" version ".tar.gz"))
1769 (sha256
b2a94e59 1770 (base32 "12z0l7368r4116ljzg7nljy5hf425r11vxc540w79wlzikmynamy"))))
ec73c90e
GLV
1771 (build-system gnu-build-system)
1772 (inputs
1773 `(("postgresql" ,postgresql)
1774 ("sqlite" ,sqlite)))
1775 (synopsis "Allow SQLite/SpatiaLite to access PostgreSQL/PostGIS tables")
1776 (description
1777 "VirtualPG is a dynamic extension for the SQLite DBMS. It implements
1778the VirtualPostgres driver, allowing to directly exchange data between SQLite
1779and PostgreSQL; if SpatiaLite is available even PostGIS geometries can be
1780exchanged form one Spatial DBMS and the other.")
1781 (home-page "https://www.gaia-gis.it/fossil/virtualpg/index")
1782 (license (list license:gpl2+
1783 license:lgpl2.1+
1784 license:mpl1.1))))
7b1fb40d
GLV
1785
1786(define-public opencpn
1787 (package
1788 (name "opencpn")
1789 (version "5.0.0")
1790 (source
1791 (origin
1792 (method git-fetch)
1793 (uri (git-reference
b0e7b699 1794 (url "https://github.com/OpenCPN/OpenCPN")
7b1fb40d
GLV
1795 (commit (string-append "v" version))))
1796 (file-name (git-file-name name version))
1797 (sha256
1798 (base32 "1xv3h6svw9aay5ixpql231md3pf00qxvhg62z88daraf18hlkfja"))))
1799 (build-system cmake-build-system)
1800 (native-inputs
1801 `(("gettext" ,gettext-minimal)
1802 ("pkg-config" ,pkg-config)))
1803 (inputs
1804 `(("bzip2" ,bzip2)
1805 ("cairo" ,cairo)
1806 ("curl" ,curl)
1807 ("glu" ,glu)
1808 ("gtk+" ,gtk+)
1809 ("libarchive" ,libarchive)
1810 ("libelf" ,libelf)
1811 ("libexif" ,libexif)
1812 ("libsndfile" ,libsndfile)
1813 ("lz4" ,lz4)
1814 ("mesa" ,mesa)
1815 ("pango" ,pango)
1816 ("portaudio" ,portaudio)
1817 ("sqlite" ,sqlite)
1818 ("tinyxml" ,tinyxml)
1819 ("wxsvg" ,wxsvg)
1820 ("wxwidgets" ,wxwidgets)
1821 ("xz" ,xz)
1822 ("zlib" ,zlib)))
1823 (arguments
1824 `(#:configure-flags '("-DENABLE_PORTAUDIO=ON"
1825 "-DENABLE_SNDFILE=ON"
1826 "-DBUNDLE_TCDATA=ON"
1827 "-DBUNDLE_GSHHS=CRUDE")
1828 #:tests? #f ; No tests defined
1829 #:phases
1830 (modify-phases %standard-phases
1831 (add-after 'unpack 'fix-build
1832 (lambda _
1833 (substitute* "CMakeLists.txt"
1834 (("set\\(wxWidgets_CONFIG_OPTIONS.*--toolkit=gtk3" all)
1835 (string-append all " --libs all")))
1836 #t)))))
1837 (synopsis "Chart plotter and marine GPS navigation software")
1838 (description
1839 "OpenCPN is a chart plotter and marine navigation software designed to be
1840used at the helm station of your boat while underway. Chart a course and
1841track your position right from your laptop.")
1842 (home-page "https://opencpn.org/")
1843 (license (list license:asl2.0
1844 license:cc0
1845 license:bsd-2
1846 license:bsd-3
1847 license:expat
1848 license:gpl3+
1849 license:lgpl2.1+
1850 license:lgpl3+
1851 license:sgifreeb2.0
1852 license:zlib))))
9fce5914
GLV
1853
1854(define-public grass
13e5d3b1 1855 (let* ((version "7.8.5")
9fce5914
GLV
1856 (majorminor (string-join (list-head (string-split version #\.) 2) ""))
1857 (grassxx (string-append "grass" majorminor)))
1858 (package
1859 (name "grass")
1860 (version version)
1861 (source
1862 (origin
1863 (method url-fetch)
1864 (uri (string-append "https://grass.osgeo.org/" grassxx
1865 "/source/grass-" version ".tar.gz"))
1866 (sha256
13e5d3b1 1867 (base32 "0dzzhgcsrszzinvjir50nvzq873b8gsp0p9k8fvcrv14amkbnnd3"))))
9fce5914
GLV
1868 (build-system gnu-build-system)
1869 (inputs
1628d57b 1870 `(("bzip2" ,bzip2)
9fce5914
GLV
1871 ("cairo" ,cairo)
1872 ("fftw" ,fftw)
1873 ("freetype" ,freetype)
1874 ("gdal" ,gdal)
1875 ("geos" ,geos)
1876 ("glu" ,glu)
1877 ("lapack" ,lapack)
1878 ("libpng" ,libpng)
1879 ("libtiff" ,libtiff)
1880 ("mesa" ,mesa)
1881 ("mariadb-dev" ,mariadb "dev")
1882 ("mariadb-lib" ,mariadb "lib")
1883 ("netcdf" ,netcdf)
1884 ("openblas" ,openblas)
1885 ("perl" ,perl)
1886 ("postgresql" ,postgresql)
1887 ("proj.4" ,proj.4)
1888 ("python" ,python)
1889 ("python-dateutil" ,python-dateutil)
1890 ("python-numpy" ,python-numpy)
1891 ("python-wxpython" ,python-wxpython)
1892 ("readline" ,readline)
1893 ("sqlite" ,sqlite)
1894 ("wxwidgets" ,wxwidgets)
1895 ("zlib" ,zlib)
1896 ("zstd" ,zstd "lib")))
1897 (native-inputs
1898 `(("bash" ,bash-minimal)
1899 ("bison" ,bison)
1900 ("flex" ,flex)
1901 ("pkg-config" ,pkg-config)))
1902 (arguments
1903 `(#:tests? #f ; No tests
1904 #:modules ((guix build gnu-build-system)
1905 ((guix build python-build-system) #:prefix python:)
1906 (guix build utils))
1907 #:imported-modules (,@%gnu-build-system-modules
1908 (guix build python-build-system))
1909 #:phases
1910 (modify-phases %standard-phases
1911 (replace 'configure
1912 (lambda* (#:key inputs outputs #:allow-other-keys)
1913 (let ((shell (string-append (assoc-ref inputs "bash")
1914 "/bin/bash")))
1915 (setenv "SHELL" shell)
1916 (setenv "CONFIG_SHELL" shell)
1917 (setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl,"
1918 (assoc-ref outputs "out")
1919 "/" ,grassxx "/lib")))
1920 (invoke "./configure"
1921 (string-append "--prefix="
1922 (assoc-ref outputs "out"))
1923 "--with-blas"
1924 "--with-bzlib"
1925 (string-append "--with-freetype-includes="
1926 (assoc-ref inputs "freetype")
1927 "/include/freetype2")
1928 (string-append "--with-freetype-libs="
1929 (assoc-ref inputs "freetype")
1930 "/lib")
1931 "--with-geos"
1932 "--with-lapack"
1933 "--with-mysql"
1934 (string-append "--with-mysql-includes="
1935 (assoc-ref inputs "mariadb-dev")
1936 "/include/mysql")
1937 (string-append "--with-mysql-libs="
1938 (assoc-ref inputs "mariadb-lib")
1939 "/lib")
1940 "--with-netcdf"
1941 "--with-postgres"
1942 (string-append "--with-proj-share="
1943 (assoc-ref inputs "proj.4")
1944 "/share/proj")
1945 "--with-pthread"
1946 "--with-readline"
1947 "--with-sqlite"
1948 "--with-wxwidgets")))
1949 (add-after 'install 'install-links
1950 (lambda* (#:key outputs #:allow-other-keys)
1951 ;; Put links for includes and libraries in the standard places.
1952 (let* ((out (assoc-ref outputs "out"))
1953 (dir (string-append out "/" ,grassxx)))
1954 (symlink (string-append dir "/include")
1955 (string-append out "/include"))
1956 (symlink (string-append dir "/lib")
1957 (string-append out "/lib")))
1958 #t))
6c03d15d
TGR
1959 (add-after 'install-links 'python:wrap
1960 (assoc-ref python:%standard-phases 'wrap))
1961 (add-after 'python:wrap 'wrap-with-python-interpreter
1962 (lambda* (#:key outputs #:allow-other-keys)
1963 (let ((out (assoc-ref outputs "out")))
1964 (wrap-program (string-append out "/bin/" ,grassxx)
1965 `("GRASS_PYTHON" = (,(which "python3"))))
1966 #t))))))
9fce5914
GLV
1967 (synopsis "GRASS Geographic Information System")
1968 (description
1969 "GRASS (Geographic Resources Analysis Support System), is a Geographic
1970Information System (GIS) software suite used for geospatial data management and
1971analysis, image processing, graphics and maps production, spatial modeling, and
1972visualization.")
1973 (home-page "https://grass.osgeo.org/")
1974 (license license:gpl2+))))
f7ac2fe1
GLV
1975
1976(define-public saga
1977 (package
1978 (name "saga")
1979 (version "7.6.2")
1980 (source
1981 (origin
1982 (method url-fetch)
1983 (uri (string-append "mirror://sourceforge/saga-gis/SAGA%20-%20"
1984 (version-major version) "/SAGA%20-%20" version
1985 "/saga-" version ".tar.gz"))
1986 (sha256
1987 (base32 "09j5magmayq2y620kqa490mfd1kpdp3lng2ifcgbrmssc079ybm0"))))
1988 (build-system gnu-build-system)
1989 (native-inputs
1990 `(("pkg-config" ,pkg-config)
1991 ("swig" ,swig)))
1992 (inputs
1993 `(("curl" ,curl)
1994 ("fftw" ,fftw)
1995 ("gdal" ,gdal)
1996 ("hdf5" ,hdf5)
1997 ("jasper" ,jasper)
1998 ("libharu" ,libharu)
1999 ("libtiff" ,libtiff)
2000 ("opencv" ,opencv)
2001 ("postgresql" ,postgresql)
2002 ("proj.4" ,proj.4)
2003 ("python" ,python)
2004 ("qhull" ,qhull)
2005 ("unixodbc" ,unixodbc)
2006 ("vigra" ,vigra)
2007 ("wxwidgets" ,wxwidgets)))
2008 (arguments
2009 '(#:configure-flags '("--enable-python")))
2010 (synopsis "System for Automated Geoscientific Analyses")
2011 (description
2012 "SAGA (System for Automated Geoscientific Analyses) is a Geographic
2013Information System (GIS) software. It has been designed for an easy and
2014effective implementation of spatial algorithms and it offers a comprehensive,
2015growing set of geoscientific methods.")
2016 (home-page "http://www.saga-gis.org")
2017 (license (list license:gpl2+ license:lgpl2.1+))))
151f3d41
GLV
2018
2019(define-public qgis
2020 (package
2021 (name "qgis")
4cd8bab7 2022 (version "3.16.3")
151f3d41
GLV
2023 (source
2024 (origin
2025 (method url-fetch)
2026 (uri (string-append "https://qgis.org/downloads/qgis-"
2027 version ".tar.bz2"))
2028 (sha256
4cd8bab7 2029 (base32 "012dv8dcg7w4lf6k37i41wialwhi0kpkxw2dnq19yqqk35632mzx"))))
151f3d41
GLV
2030 (build-system cmake-build-system)
2031 (arguments
2032 `(#:modules ((guix build cmake-build-system)
2033 ((guix build python-build-system) #:prefix python:)
2034 (guix build qt-utils)
2035 (guix build utils))
2036 #:imported-modules (,@%cmake-build-system-modules
2037 (guix build python-build-system)
2038 (guix build qt-utils))
2039 #:phases
2040 (modify-phases %standard-phases
2041 ;; Configure correct path to PyQt5 SIP directory
2042 (add-after 'unpack 'configure-pyqt5-sip-path
2043 (lambda* (#:key inputs #:allow-other-keys)
4cd8bab7
GLV
2044 (substitute* "cmake/FindPyQt5.py"
2045 (("sip_dir = cfg.default_sip_dir")
2046 (string-append "sip_dir = \""
2047 (assoc-ref inputs "python-pyqt+qscintilla")
2048 "/share/sip\"")))
2049 (substitute* (list "scripts/prepare_commit.sh"
2050 "scripts/qstringfixup.sh"
2051 "scripts/release.pl"
2052 "scripts/runtests_local_travis_config.sh"
151f3d41
GLV
2053 "scripts/sip_include.sh"
2054 "scripts/sipdiff"
2055 "scripts/sipify_all.sh"
2056 "scripts/spell_check/check_spelling.sh"
2057 "scripts/spell_check/spell_test.sh"
4cd8bab7 2058 "scripts/verify_indentation.sh"
151f3d41
GLV
2059 "tests/code_layout/test_banned_keywords.sh"
2060 "tests/code_layout/test_licenses.sh"
2061 "tests/code_layout/test_shellcheck.sh"
2062 "tests/code_layout/test_sip_include.sh"
4cd8bab7 2063 "tests/code_layout/test_sipfiles.sh"
151f3d41
GLV
2064 "tests/code_layout/test_sipify.sh")
2065 (("\\$\\(git rev-parse --show-toplevel\\)")
2066 (getcwd)))
2067 (substitute* "tests/code_layout/test_sip_include.sh"
2068 (("^REV=.*") "REV=currentrev\n"))
2069 #t))
2070 (replace 'check
2071 (lambda* (#:key inputs #:allow-other-keys)
2072 (setenv "HOME" "/tmp")
2073 (system (string-append (assoc-ref inputs "xorg-server")
2074 "/bin/Xvfb :1 &"))
2075 (setenv "DISPLAY" ":1")
2076 (setenv "TRAVIS" "true")
2077 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
2078 (invoke "ctest"
2079 "-E" (string-join
2080 '(;; Disable tests that require network access
2081 "qgis_filedownloader"
2082 ;; TODO: Find why the following tests fail
151f3d41
GLV
2083 "ProcessingGdalAlgorithmsRasterTest"
2084 "ProcessingGdalAlgorithmsVectorTest"
2085 "ProcessingGrass7AlgorithmsImageryTest"
2086 "ProcessingGrass7AlgorithmsRasterTest"
2087 "ProcessingGrass7AlgorithmsVectorTest"
2088 "ProcessingOtbAlgorithmsTest"
4cd8bab7
GLV
2089 "ProcessingQgisAlgorithmsTestPt1"
2090 "ProcessingQgisAlgorithmsTestPt2"
2091 "ProcessingQgisAlgorithmsTestPt3"
2092 "ProcessingQgisAlgorithmsTestPt4"
151f3d41 2093 "PyCoreAdittions"
151f3d41 2094 "PyQgsAnnotation"
4cd8bab7 2095 "PyQgsAppStartup"
151f3d41 2096 "PyQgsAuthenticationSystem"
4cd8bab7
GLV
2097 "PyQgsAuxiliaryStorage"
2098 "PyQgsDBManagerGpkg"
2099 "PyQgsDBManagerSpatialite"
2100 "PyQgsDataItem"
2101 "PyQgsFieldValidator"
151f3d41
GLV
2102 "PyQgsFileUtils"
2103 "PyQgsGeometryTest"
2104 "PyQgsImageCache"
4cd8bab7
GLV
2105 "PyQgsImportIntoPostGIS"
2106 "PyQgsLayerDependencies"
0213f094
GLV
2107 "PyQgsLayerMetadata"
2108 "PyQgsLayout"
151f3d41 2109 "PyQgsLayoutExporter"
4cd8bab7 2110 "PyQgsLayoutHtml"
151f3d41 2111 "PyQgsLayoutLegend"
4cd8bab7 2112 "PyQgsLayoutMapGrid"
151f3d41 2113 "PyQgsMapLayer"
4cd8bab7
GLV
2114 "PyQgsMetadataBase"
2115 "PyQgsOGRProvider"
151f3d41 2116 "PyQgsOGRProviderGpkg"
4cd8bab7 2117 "PyQgsOapifProvider"
151f3d41 2118 "PyQgsPalLabelingLayout"
4cd8bab7 2119 "PyQgsProject"
151f3d41 2120 "PyQgsProviderConnectionGpkg"
4cd8bab7
GLV
2121 "PyQgsProviderConnectionPostgres"
2122 "PyQgsProviderConnectionSpatialite"
2123 "PyQgsPythonProvider"
2124 "PyQgsRasterLayer"
2125 "PyQgsRulebasedRenderer"
2126 "PyQgsSelectiveMasking"
2127 "PyQgsSettings"
151f3d41 2128 "PyQgsShapefileProvider"
4cd8bab7 2129 "PyQgsSpatialiteProvider"
151f3d41 2130 "PyQgsSvgCache"
4cd8bab7 2131 "PyQgsSymbolExpressionVariables"
151f3d41 2132 "PyQgsTextRenderer"
151f3d41
GLV
2133 "PyQgsVectorFileWriter"
2134 "PyQgsVectorLayer"
2135 "PyQgsVectorLayerUtils"
2136 "PyQgsVirtualLayerProvider"
2137 "PyQgsWFSProvider"
4cd8bab7
GLV
2138 "qgis_arcgisrestutilstest"
2139 "qgis_authmanagertest"
2140 "qgis_compositionconvertertest"
2141 "qgis_coordinatereferencesystemtest"
2142 "qgis_expressiontest"
2143 "qgis_fontmarkertest"
151f3d41 2144 "qgis_geometrycheckstest"
4cd8bab7
GLV
2145 "qgis_geometrytest"
2146 "qgis_gpsinformationwidget"
2147 "qgis_grassprovidertest7"
2148 "qgis_imagecachetest"
2149 "qgis_labelingenginetest"
2150 "qgis_layouthtmltest"
2151 "qgis_layoutmanualtabletest"
2152 "qgis_layoutmapgridtest"
2153 "qgis_layoutmaptest"
2154 "qgis_layoutpicturetest"
2155 "qgis_layouttabletest"
2156 "qgis_mapdevicepixelratiotest"
2157 "qgis_maprendererjobtest"
2158 "qgis_ogrproviderguitest"
2159 "qgis_painteffecttest"
2160 "qgis_pallabelingtest"
2161 "qgis_processingtest"
2162 "qgis_rasterlayertest"
151f3d41 2163 "qgis_shellcheck"
151f3d41 2164 "qgis_sip_include"
4cd8bab7
GLV
2165 "qgis_sip_uptodate"
2166 "qgis_sipify"
2167 "qgis_styletest"
2168 "qgis_svgmarkertest"
2169 "qgis_taskmanagertest"
2170 "qgis_wcsprovidertest"
2171 "qgis_ziplayertest")
151f3d41
GLV
2172 "|"))))
2173 (add-after 'install 'wrap-python
2174 (assoc-ref python:%standard-phases 'wrap))
2175 (add-after 'wrap-python 'wrap-qt
2176 (lambda* (#:key outputs #:allow-other-keys)
2177 (wrap-qt-program (assoc-ref outputs "out") "qgis")
5ef1b175
GLV
2178 #t))
2179 (add-after 'wrap-qt 'wrap-gis
2180 (lambda* (#:key inputs outputs #:allow-other-keys)
5e686e0a
GLV
2181 ;; TODO: Find if there is a way to get SAGA to work.
2182 ;; Currently QGIS says "version of SAGA not supported".
2183 ;; Disable it for now.
5ef1b175 2184 (let* ((out (assoc-ref outputs "out"))
5e686e0a 2185 ;;(saga (string-append (assoc-ref inputs "saga") "/bin"))
5ef1b175
GLV
2186 (grass-version ,(package-version grass))
2187 (grass-majorminor (string-join
2188 (list-head
2189 (string-split grass-version #\.) 2)
2190 ""))
2191 (grass (string-append (assoc-ref inputs "grass")
2192 "/grass" grass-majorminor)))
2193 (wrap-program (string-append out "/bin/qgis")
5e686e0a 2194 ;;`("PATH" ":" prefix (,saga))
5ef1b175
GLV
2195 `("QGIS_PREFIX_PATH" = (,out))
2196 `("GISBASE" = (,grass))))
151f3d41
GLV
2197 #t)))))
2198 (inputs
2199 `(("exiv2" ,exiv2)
2200 ("expat" ,expat)
2201 ("gdal" ,gdal)
2202 ("geos" ,geos)
2203 ("gpsbabel" ,gpsbabel)
2204 ("grass" ,grass)
2205 ("gsl" ,gsl)
2206 ("hdf5" ,hdf5)
2207 ("libspatialindex" ,libspatialindex)
2208 ("libspatialite" ,libspatialite)
2209 ("libxml2" ,libxml2)
2210 ("libzip" ,libzip)
2211 ("netcdf" ,netcdf)
2212 ("postgresql" ,postgresql)
2213 ("proj" ,proj)
4cd8bab7 2214 ("protobuf" ,protobuf)
151f3d41
GLV
2215 ("python" ,python)
2216 ("python-chardet" ,python-chardet)
2217 ("python-dateutil" ,python-dateutil)
542dc0ee 2218 ("python-future" ,python-future)
151f3d41
GLV
2219 ("python-gdal" ,python-gdal)
2220 ("python-jinja2" ,python-jinja2)
2221 ("python-numpy" ,python-numpy)
2222 ("python-owslib" ,python-owslib)
2223 ("python-psycopg2" ,python-psycopg2)
2224 ("python-pygments" ,python-pygments)
2225 ("python-pyqt+qscintilla" ,python-pyqt+qscintilla)
2226 ("python-pytz" ,python-pytz)
2227 ("python-pyyaml" ,python-pyyaml)
2228 ("python-requests" ,python-requests)
2229 ("python-sip" ,python-sip)
2230 ("python-six" ,python-six)
2231 ("python-urllib3" ,python-urllib3)
2232 ("qca" ,qca)
2233 ("qscintilla" ,qscintilla)
2234 ("qtbase" ,qtbase)
2235 ("qtdeclarative" ,qtdeclarative)
2236 ("qtkeychain" ,qtkeychain)
2237 ("qtlocation" ,qtlocation)
2238 ("qtserialport" ,qtserialport)
2239 ("qtsvg" ,qtsvg)
2240 ("qtwebkit" ,qtwebkit)
2241 ("qwt" ,qwt)
5e686e0a 2242 ;;("saga" ,saga)
83e6b064 2243 ("sqlite" ,sqlite)))
151f3d41
GLV
2244 (native-inputs
2245 `(("bison" ,bison)
2246 ("flex" ,flex)
2247 ("perl" ,perl)
2248 ("perl-yaml-tiny" ,perl-yaml-tiny)
2249 ("pkg-config" ,pkg-config)
2250 ("python-mock" ,python-mock)
2251 ("python-nose2" ,python-nose2)
2252 ("qttools" ,qttools)
2253 ("shellcheck" ,shellcheck)
2254 ("xorg-server" ,xorg-server-for-tests)))
2255 (home-page "https://qgis.org")
2256 (synopsis "Geographical information system")
2257 (description "QGIS is an easy to use Geographical Information
2258System (GIS). It is a GIS data viewer and editor. QGIS supports a number of
2259raster and vector data formats, with new support easily added using the plugin
2260architecture.")
2261 (license
2262 (list
2263 license:asl1.1
2264 license:asl2.0
2265 license:bsd-2
2266 license:bsd-3
2267 license:boost1.0
2268 license:cc-by3.0
2269 license:cc-by4.0
2270 license:cc-by-sa3.0
2271 license:cc-by-sa4.0
2272 (license:fsdg-compatible "https://www.deviantart.com/elvensword")
2273 (license:fsf-free "file://debian/copyright" "Go Squared")
2274 license:expat
2275 license:fdl1.2+
2276 (license:fsf-free
2277 "https://www.deviantart.com/webgoddess/art/Reddish-Inspired-Gradients-42208824")
2278 (license:fsf-free
2279 "file://debian/copyright"
2280 "QT-Commercial or LGPL-2.1 with Digia Qt LGPL Exception 1.1 or GPL-3")
2281 license:gpl2
2282 license:gpl2+
2283 license:gpl3
2284 license:gpl3+
2285 license:isc
2286 license:lgpl2.0+
2287 license:lgpl2.1
2288 license:lgpl2.1+
2289 license:lgpl3
2290 (license:non-copyleft "file://debian/copyright" "BSD-like-gist")
2291 (license:non-copyleft "file://debian/copyright" "Jim Mossman Attribution")
2292 (license:non-copyleft
2293 "https://www.ncl.ucar.edu/Download/NCL_source_license.shtml"
2294 "NCL Source Code License")
2295 license:ogl-psi1.0
2296 license:opl1.0+
2297 license:public-domain
2298 license:qwt1.0))))
ff1233d8
EF
2299
2300(define-public python-geographiclib
2301 (package
2302 (name "python-geographiclib")
2303 (version "1.50")
2304 (source
2305 (origin
2306 (method url-fetch)
2307 (uri (pypi-uri "geographiclib" version))
2308 (sha256
2309 (base32
2310 "0cn6ap5fkh3mkfa57l5b44z3gvz7j6lpmc9rl4g2jny2gvp4dg8j"))))
2311 (build-system python-build-system)
2312 (home-page "https://geographiclib.sourceforge.io/1.50/python/")
2313 (synopsis "Python geodesic routines from GeographicLib")
2314 (description
2315 "This is a python implementation of the geodesic routines in GeographicLib.")
2316 (license license:expat)))
481b0923
EF
2317
2318(define-public python-geopy
2319 (package
2320 (name "python-geopy")
2321 (version "2.0.0")
2322 (source
2323 (origin
2324 (method url-fetch)
2325 (uri (pypi-uri "geopy" version))
2326 (sha256
2327 (base32
2328 "0fx0cv0kgbvynpmjgsvq2fpsyngd5idiscdn8pd5201f1ngii3mq"))))
2329 (build-system python-build-system)
2330 (propagated-inputs
2331 `(("python-geographiclib" ,python-geographiclib)))
2332 (native-inputs
2333 `(("python-async-generator" ,python-async-generator)
2334 ("python-coverage" ,python-coverage)
2335 ("python-flake8" ,python-flake8)
2336 ("python-isort" ,python-isort)
2337 ("python-pytest" ,python-pytest)
2338 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
2339 ("python-readme-renderer" ,python-readme-renderer)
2340 ("python-pytz" ,python-pytz)))
2341 (home-page "https://github.com/geopy/geopy")
2342 (synopsis "Geocoding library for Python")
2343 (description "@code{geopy} is a Python client for several popular geocoding
2344web services. @code{geopy} makes it easy for Python developers to locate the
2345coordinates of addresses, cities, countries, and landmarks across the globe
2346using third-party geocoders and other data sources.")
2347 (license license:expat)))