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