1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
3 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
4 ;;; Copyright © 2017, 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
5 ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice <me@tobias.gr>
6 ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
7 ;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
8 ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com>
9 ;;; Copyright © 2018, 2019, 2020 Julien Lepiller <julien@lepiller.eu>
10 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
11 ;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
12 ;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
13 ;;; Copyright © 2019 Hartmut Goebel <h.goebel@crazy-compilers.com>
14 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
15 ;;; Copyright © 2020 Christopher Baines <mail@cbaines.net>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages geo)
33 #:use-module (guix build-system ant)
34 #:use-module (guix build-system cmake)
35 #:use-module (guix build-system glib-or-gtk)
36 #:use-module (guix build-system gnu)
37 #:use-module (guix build-system go)
38 #:use-module (guix build-system meson)
39 #:use-module (guix build-system python)
40 #:use-module (guix build-system qt)
41 #:use-module (guix build-system scons)
42 #:use-module (guix build-system r)
43 #:use-module (guix download)
44 #:use-module (guix git-download)
45 #:use-module (guix svn-download)
46 #:use-module ((guix licenses) #:prefix license:)
47 #:use-module (guix packages)
48 #:use-module (guix utils)
49 #:use-module (gnu packages)
50 #:use-module (gnu packages algebra)
51 #:use-module (gnu packages astronomy)
52 #:use-module (gnu packages audio)
53 #:use-module (gnu packages autotools)
54 #:use-module (gnu packages backup)
55 #:use-module (gnu packages bash)
56 #:use-module (gnu packages bison)
57 #:use-module (gnu packages boost)
58 #:use-module (gnu packages check)
59 #:use-module (gnu packages compression)
60 #:use-module (gnu packages curl)
61 #:use-module (gnu packages databases)
62 #:use-module (gnu packages datastructures)
63 #:use-module (gnu packages docbook)
64 #:use-module (gnu packages documentation)
65 #:use-module (gnu packages elf)
66 #:use-module (gnu packages flex)
67 #:use-module (gnu packages fonts)
68 #:use-module (gnu packages fontutils)
69 #:use-module (gnu packages gettext)
70 #:use-module (gnu packages gl)
71 #:use-module (gnu packages glib)
72 #:use-module (gnu packages gnome)
73 #:use-module (gnu packages gps)
74 #:use-module (gnu packages gtk)
75 #:use-module (gnu packages haskell-apps)
76 #:use-module (gnu packages image)
77 #:use-module (gnu packages image-processing)
78 #:use-module (gnu packages icu4c)
79 #:use-module (gnu packages java)
80 #:use-module (gnu packages kde)
81 #:use-module (gnu packages lua)
82 #:use-module (gnu packages maths)
83 #:use-module (gnu packages pcre)
84 #:use-module (gnu packages pdf)
85 #:use-module (gnu packages perl)
86 #:use-module (gnu packages photo)
87 #:use-module (gnu packages pkg-config)
88 #:use-module (gnu packages protobuf)
89 #:use-module (gnu packages pulseaudio)
90 #:use-module (gnu packages python)
91 #:use-module (gnu packages python-check)
92 #:use-module (gnu packages python-web)
93 #:use-module (gnu packages python-xyz)
94 #:use-module (gnu packages qt)
95 #:use-module (gnu packages readline)
96 #:use-module (gnu packages swig)
97 #:use-module (gnu packages sqlite)
98 #:use-module (gnu packages textutils)
99 #:use-module (gnu packages time)
100 #:use-module (gnu packages web)
101 #:use-module (gnu packages webkit)
102 #:use-module (gnu packages wxwidgets)
103 #:use-module (gnu packages xml)
104 #:use-module (gnu packages xorg))
106 (define-public memphis
115 (url "https://github.com/jiuka/memphis.git")
117 (file-name (git-file-name name version))
119 (base32 "068c3943pgbpfjq44pmvn5fmkh005ak5aa67vvrq3fn487c6w54q"))))
120 (build-system glib-or-gtk-build-system)
121 (outputs '("out" "doc"))
128 (string-append "--with-html-dir="
129 (assoc-ref %outputs "doc")
130 "/share/gtk-doc/html"))
132 (modify-phases %standard-phases
133 (add-after 'unpack 'patch-autogen
135 (substitute* "autogen.sh"
136 (("\\./configure \"\\$@\"")
139 (add-after 'patch-autogen 'patch-docbook-xml
140 (lambda* (#:key inputs #:allow-other-keys)
141 (with-directory-excursion "docs/reference"
142 (substitute* "libmemphis-docs.sgml"
143 (("http://www.oasis-open.org/docbook/xml/4.3/")
144 (string-append (assoc-ref inputs "docbook-xml")
145 "/xml/dtd/docbook/"))))
148 `(("autoconf" ,autoconf)
149 ("automake" ,automake)
150 ("docbook-xml" ,docbook-xml-4.3)
151 ("gobject-introspection" ,gobject-introspection)
154 ("pkg-config" ,pkg-config)
155 ("python" ,python-wrapper)
163 (synopsis "Map-rendering for OpenSteetMap")
164 (description "Memphis is a map-rendering application and a library for
165 OpenStreetMap written in C using eXpat, Cairo and GLib.")
166 (home-page "http://trac.openstreetmap.ch/trac/memphis/")
167 (license license:lgpl2.1+)))
175 (uri (string-append "http://download.osgeo.org/geos/geos-"
180 "1xqpmr10xi0n9sj47fbwc89qb0yr9imh4ybk0jsxpffy111syn22"))))
181 (build-system gnu-build-system)
182 (arguments `(#:phases
183 (modify-phases %standard-phases
185 'unpack 'patch-test-shebangs
187 (substitute* '("tests/xmltester/testrunner.sh"
188 "tests/geostest/testrunner.sh")
189 (("/bin/sh") (which "sh")))
193 (home-page "https://geos.osgeo.org/")
194 (synopsis "Geometry Engine for Geographic Information Systems")
196 "GEOS provides a spatial object model and fundamental geometric
197 functions. It is a C++ port of the Java Topology Suite (JTS). As such,
198 it aims to contain the complete functionality of JTS in C++. This
199 includes all the OpenGIS Simple Features for SQL spatial predicate
200 functions and spatial operators, as well as specific JTS enhanced
201 topology functions.")
202 (license (list license:lgpl2.1+ ; Main distribution.
203 license:zlib ; tests/xmltester/tinyxml/*
204 license:public-domain)))) ; include/geos/timeval.h
206 (define-public gnome-maps
212 (uri (string-append "mirror://gnome/sources/" name "/"
213 (version-major+minor version) "/"
214 name "-" version ".tar.xz"))
217 "00xslcnhhwslqglgfv2im7vq3awa49y2jxzr8wsby7f713k28vf5"))))
218 (build-system meson-build-system)
222 (modify-phases %standard-phases
223 (add-after 'unpack 'skip-gtk-update-icon-cache
224 ;; Don't create 'icon-theme.cache'.
226 (substitute* "meson_post_install.py"
227 (("gtk-update-icon-cache") "true"))
229 (add-after 'install 'wrap
230 (lambda* (#:key inputs outputs #:allow-other-keys)
231 (let ((out (assoc-ref outputs "out"))
232 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
233 (geocode-glib-path (string-append
234 (assoc-ref inputs "geocode-glib")
236 (goa-path (string-append
237 (assoc-ref inputs "gnome-online-accounts:lib")
239 (gdk-pixbuf-path (string-append
240 (assoc-ref inputs "gdk-pixbuf")
242 (webkitgtk-path (string-append
243 (assoc-ref inputs "webkitgtk")
245 (wrap-program (string-append out "/bin/gnome-maps")
246 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
248 ;; There seems to be no way to embed the path of
249 ;; libgoa-1.0.so.0, libwebkit2gtk-4.0.so.37,
250 ;; libgdk_pixbuf-2.0.so, libjavascriptcoregtk-4.0.so.18, and
251 ;; libgeocode-glib.so.0
252 `("LD_LIBRARY_PATH" ":" prefix (,goa-path
255 ,geocode-glib-path)))
258 `(("gettext" ,gettext-minimal)
259 ("gobject-introspection" ,gobject-introspection)
260 ("pkg-config" ,pkg-config)))
262 `(("evolution-data-server" ,evolution-data-server)
264 ("libchamplain" ,libchamplain)
266 ("libsecret" ,libsecret)
268 ("libgweather" ,libgweather)
270 ("gdk-pixbuf" ,gdk-pixbuf+svg)
271 ("glib-networking" ,glib-networking)
273 ("geocode-glib" ,geocode-glib)
274 ("gfbgraph" ,gfbgraph)
277 ("gnome-online-accounts:lib" ,gnome-online-accounts "lib")
278 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
281 ("webkitgtk" ,webkitgtk)))
282 (synopsis "Graphical map viewer and wayfinding program")
283 (description "GNOME Maps is a graphical map viewer. It uses map data from
284 the OpenStreetMap project. It can provide directions for walking, bicycling,
286 (home-page "https://wiki.gnome.org/Apps/Maps")
287 (license license:gpl2+)))
289 (define-public libgaiagraphics
291 (name "libgaiagraphics")
296 (uri (string-append "https://www.gaia-gis.it/gaia-sins/libgaiagraphics-"
300 "076afqv417ag3hfvnif0qc7qscmnq1dsf6y431yygwgf34rjkayc"))))
301 (build-system gnu-build-system)
303 `(("pkg-config" ,pkg-config)))
307 ("libjpeg-turbo" ,libjpeg-turbo)
309 ("libgeotiff" ,libgeotiff)
313 (synopsis "Gaia common graphics support")
314 (description "libgaiagraphics is a library supporting
315 common-utility raster handling methods.")
316 (home-page "https://www.gaia-gis.it/fossil/libgaiagraphics/index")
317 (license license:lgpl3+)))
319 (define-public libgeotiff
326 (uri (string-append "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-"
328 (patches (search-patches
329 ;; See libgeotiff 1.5.1 issue
330 ;; https://github.com/OSGeo/libgeotiff/issues/22
331 "libgeotiff-adapt-test-script-for-proj-6.2.patch"))
333 (base32 "0b31mlzcv5b1y7jdvb7p0pa3xradrg3x5g32ym911lbhq4rrgsgr"))
334 (modules '((guix build utils)))
337 ;; Remove .csv files, distributed from EPSG under a restricted
338 ;; license. See LICENSE for full license text.
339 (for-each delete-file (find-files "." "\\.csv$"))
341 (build-system gnu-build-system)
343 `(("libjpeg-turbo" ,libjpeg-turbo)
347 `(;; libgeotiff headers include proj headers, so ensure those are available.
351 (list "--disable-static"
352 "--with-zlib" "--with-jpeg"
353 (string-append "--with-libtiff=" (assoc-ref %build-inputs "libtiff")))))
354 (synopsis "Library for handling GeoTIFF (geographic enabled TIFF)")
355 (description "libgeotiff is a library on top of libtiff for reading and
356 writing GeoTIFF information tags.")
357 (home-page "https://trac.osgeo.org/geotiff/")
358 ;; This is a mixture of various contributions under different licenses.
359 ;; Note that the EPSG database is NOT "free to use" as the LICENSE file
360 ;; states, as its commercial redistribution is restricted. Hence, we have
361 ;; removed it from the package.
362 (license (list license:public-domain
365 (license:non-copyleft "file://LICENSE"
366 "See LICENSE in the distribution.")))))
368 (define-public libspatialite
370 (name "libspatialite")
375 (uri (string-append "https://www.gaia-gis.it/gaia-sins/libspatialite-"
379 "16d4lpl7xrm9zy4gphy6nwanpjp8wn9g4wq2i2kh8abnlhq01448"))))
380 (build-system gnu-build-system)
382 `(("pkg-config" ,pkg-config)))
392 (modify-phases %standard-phases
393 ;; 3 tests are failing, ignore them:
394 (add-after 'unpack 'ignore-broken-tests
396 (substitute* '("test/Makefile.in")
397 (("\tcheck_sql_stm.*" all) "\tcheck_multithread$(EXEEXT) \\\n")
398 (("(\tch.*) check_v.*ble2.*$" all vt1) (string-append vt1 " \\\n"))
399 (("\tch.* (check_v.*ble4.*)$" all vt4) (string-append "\t" vt4)))
401 (synopsis "Extend SQLite to support Spatial SQL capabilities")
403 "SpatiaLite is a library intended to extend the SQLite core to support
404 fully fledged Spatial SQL capabilities.")
405 (home-page "https://www.gaia-gis.it/fossil/libspatialite/index")
406 ;; For the genuine libspatialite-sources holds:
407 ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked.
408 ;; Files under src/control_points are from GRASS
409 ;; and are licensed under GPL2+ only.
410 ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak.
411 (license (list license:gpl2+
414 license:public-domain))))
423 (uri (string-append "http://download.osgeo.org/proj/proj-"
427 "1y46ij32j9b4x1kjnnlykcwk3kkjwkg44sfc1ziwm3a3g0ki3q3d"))))
428 (build-system gnu-build-system)
430 `(("sqlite" ,sqlite)))
432 `(("pkg-config" ,pkg-config)))
433 (home-page "https://proj.org/")
434 (synopsis "Coordinate transformation software")
436 "Proj is a generic coordinate transformation software that transforms
437 geospatial coordinates from one coordinate reference system (CRS) to another.
438 This includes cartographic projections as well as geodetic transformations.
439 PROJ includes command line applications for easy conversion of coordinates
440 from text files or directly from user input. In addition, proj also exposes
441 an application programming interface that lets developers use the
442 functionality of proj in their own software.")
443 (license (list license:expat
444 ;; src/projections/patterson.cpp
446 ;; src/geodesic.*, src/tests/geodtest.cpp
449 (define-public proj.4
455 (uri (string-append "http://download.osgeo.org/proj/proj-"
459 "1xw5f427xk9p2nbsj04j6m5zyjlyd66sbvl2bkg8hd1kx8pm9139"))))
460 (build-system gnu-build-system)
463 (modify-phases %standard-phases
464 (add-after 'unpack 'patch-test-paths
466 (substitute* '("nad/test27"
472 (("/bin/rm") (which "rm")))
474 ;; Precision problems on i686 and other platforms. See:
475 ;; https://web.archive.org/web/20151006134301/http://trac.osgeo.org/proj/ticket/255
476 ;; Disable failing test.
477 (add-after 'patch-test-paths 'ignore-failing-tests
479 (substitute* '("nad/Makefile.in")
480 (("\tPROJ_LIB.*" all) (string-append "#" all)))
484 (home-page "https://proj.org/")
485 (synopsis "Cartographic Projections Library")
487 "Proj.4 is a library for converting coordinates between cartographic
489 (license (list license:expat
490 ;; src/PJ_patterson.c
494 ;; Embedded EPSG database.
495 (license:non-copyleft "http://www.epsg.org/TermsOfUse")
499 (define-public mapnik
506 (uri (string-append "https://github.com/mapnik/mapnik/releases/download/v"
507 version "/mapnik-v" version ".tar.bz2"))
510 "06frcikaj2mgz3abfk5h0z4j3hbksi0zikwjngbjv4p5f3pwxf8q"))))
511 (build-system scons-build-system)
515 ("freetype" ,freetype)
516 ("harfbuzz" ,harfbuzz)
518 ("libjpeg-turbo" ,libjpeg-turbo)
527 `(("pkg-config" ,pkg-config)))
529 `(#:scons ,scons-python2
532 (string-append "PREFIX=" %output)
533 (string-append "CUSTOM_LDFLAGS=-Wl,-rpath=" %output "/lib"))))
534 (home-page "https://mapnik.org/")
535 (synopsis "Toolkit for developing mapping applications")
536 (description "Mapnik is a toolkit for developing mapping applications. It
537 is basically a collection of geographic objects like maps, layers,
538 datasources, features, and geometries. At its core is a C++ shared library
539 providing algorithms and patterns for spatial data access and visualization.
540 The library does not rely on any specific windowing system and can be deployed
541 to any server environment. It is intended to play fair in a multi-threaded
542 environment and is aimed primarily, but not exclusively, at web-based
544 (license (list license:lgpl2.1+
545 ;; demo/viewer, demo/python/rundemo.py
547 ;; deps/boost, deps/mapbox, deps/agg/include/agg_conv_offset.h
549 ;; deps/mapnik/sparsehash
552 (license:non-copyleft "file://deps/agg/copying")))))
554 (define-public python2-mapnik
556 (name "python2-mapnik")
561 (uri (string-append "https://github.com/mapnik/python-mapnik/archive/v"
563 (file-name (string-append name "-" version ".tar.gz"))
566 "0w7wg72gnwmbjani9sqk42p2jwqkrl9hsdkawahni5m05xsifcb4"))))
567 (build-system python-build-system)
570 ("harfbuzz" ,harfbuzz)
572 ("libjpeg-turbo" ,libjpeg-turbo)
578 ("python2-pycairo" ,python2-pycairo)))
580 (let ((test-data-input
581 (lambda (repository version hash)
584 (uri (string-append "https://github.com/mapnik/" repository
585 "/archive/v" version ".tar.gz"))
586 (file-name (string-append "python-mapnik-" repository
587 "-" version ".tar.gz"))
588 (sha256 (base32 hash))))))
589 `(("python2-nose" ,python2-nose)
590 ;; Test data is released as separate tarballs
592 ,(test-data-input "test-data" "3.0.18"
593 "10cvgn5gxn8ldrszj24zr1vzm5w76kqk4s7bl2zzp5yvkhh8lj1n"))
595 ,(test-data-input "test-data-visual" "3.0.18"
596 "1cb9ghy8sis0w5fkp0dvwxdqqx44rhs9a9w8g9r9i7md1c40r80i")))))
598 `(#:python ,python-2 ; Python 3 support is incomplete, and the build fails
600 (modify-phases %standard-phases
601 ;; Unpack test data into the source tree
602 (add-after 'unpack 'unpack-submodules
603 (lambda* (#:key inputs #:allow-other-keys)
604 (let ((unpack (lambda (source target)
605 (with-directory-excursion target
606 (invoke "tar" "xvf" (assoc-ref inputs source)
607 "--strip-components=1")))))
608 (unpack "test-data" "test/data")
609 (unpack "test-data-visual" "test/data-visual"))))
610 ;; Skip failing tests
611 (add-after 'unpack 'skip-tests
613 (let ((skipped-tests (list "test_vrt_referring_to_missing_files"
614 "test_unicode_regex_replace"
615 "test_proj_antimeridian_bbox"
616 "test_render_with_scale_factor")))
617 (substitute* "setup.cfg"
618 (("\\[nosetests\\]" all)
619 (string-append all "\nexclude=^("
620 (string-join skipped-tests "|") ")$")))))))))
621 (home-page "https://github.com/mapnik/python-mapnik")
622 (synopsis "Python bindings for Mapnik")
623 (description "This package provides Python bindings for Mapnik.")
624 (license license:lgpl2.1+)))
626 (define-public spatialite-gui
628 (name "spatialite-gui")
633 (uri (string-append "https://www.gaia-gis.it/gaia-sins/spatialite_gui-"
637 "1r05dz9pyc8vsd2wbqxcsracpfbaamz470rcyp2myfpqwznv376b"))))
638 (build-system gnu-build-system)
640 `(("pkg-config" ,pkg-config)))
644 ("libgaiagraphics" ,libgaiagraphics)
645 ("libjpeg-turbo" ,libjpeg-turbo)
646 ("libspatialite" ,libspatialite)
650 ("wxwidgets" ,wxwidgets-2)
653 `(#:phases (modify-phases %standard-phases
654 (add-after 'unpack 'fix-gui
656 ;; Fix for the GUI not showing up.
657 (substitute* "Main.cpp"
658 (("Hide\\(\\);") ""))
660 (synopsis "Graphical user interface for SpatiaLite")
661 (description "Spatialite-gui provides a visual interface for viewing and
662 maintaining a spatialite database. You can easily see the structure of the
663 tables and data contents using point and click functions, many of which
664 construct common SQL queries, or craft your own SQL queries.")
665 (home-page "https://www.gaia-gis.it/fossil/spatialite_gui/index")
666 (license license:gpl3+)))
675 "http://download.osgeo.org/gdal/" version "/gdal-"
679 "1p6nmlsr8wbyq350pa6c22vrp98dcsa7yjnqsbhdbp74yj53nw9r"))
680 (modules '((guix build utils)))
683 ;; TODO: frmts contains a lot more bundled code.
684 (for-each delete-file-recursively
689 "frmts/jpeg/libjpeg12"
690 "frmts/gtiff/libtiff"
691 "frmts/gtiff/libgeotiff"
693 "ogr/ogrsf_frmts/geojson/libjson"))))))
694 (build-system gnu-build-system)
698 (let-syntax ((with (syntax-rules ()
700 (string-append option "="
701 (assoc-ref %build-inputs input))))))
703 ;; TODO: --with-pcidsk, --with-pcraster
704 (with "--with-freexl" "freexl")
705 (with "--with-libjson-c" "json-c")
706 (with "--with-png" "libpng")
707 (with "--with-webp" "libwebp")
708 (with "--with-gif" "giflib")
709 (with "--with-jpeg" "libjpeg-turbo")
710 (with "--with-libtiff" "libtiff")
711 (with "--with-geotiff" "libgeotiff")
712 (with "--with-libz" "zlib")
713 (with "--with-expat" "expat")
714 (with "--with-sqlite3" "sqlite")
717 (modify-phases %standard-phases
718 (add-before 'build 'fix-path
720 (substitute* "frmts/mrf/mrf_band.cpp"
721 (("\"../zlib/zlib.h\"") "<zlib.h>")))))))
728 ("libgeotiff" ,libgeotiff)
729 ("libjpeg-turbo" ,libjpeg-turbo)
735 ("postgresql" ,postgresql) ; libpq
740 `(("pkg-config" ,pkg-config)))
741 (home-page "https://gdal.org/")
742 (synopsis "Raster and vector geospatial data format library")
743 (description "GDAL is a translator library for raster and vector geospatial
744 data formats. As a library, it presents a single raster abstract data model
745 and single vector abstract data model to the calling application for all
746 supported formats. It also comes with a variety of useful command line
747 utilities for data translation and processing.")
751 ;; frmts/gtiff/tif_float.c, frmts/pcraster/libcsf,
752 ;; ogr/ogrsf_frmts/dxf/intronurbs.cpp, frmts/pdf/pdfdataset.cpp
755 ;; frmts/hdf4/hdf-eos/*
756 ;; similar to the expat license, but without guarantee exclusion
757 (license:non-copyleft "file://frmts/hdf4/hdf-eos/README")
758 ;; frmts/grib/degrib/
759 license:public-domain ; with guarantee exclusion
761 ;; Some bsd-inspired license
762 (license:non-copyleft "file://port/LICENCE_minizip")
763 ;; alg/internal_libqhull
764 ;; Some 5-clause license
765 (license:non-copyleft "file://alg/internal_libqhull/COPYING.txt")
769 (define-public python-gdal
770 (package (inherit gdal)
772 (build-system python-build-system)
774 '(#:tests? #f ; no tests
776 (modify-phases %standard-phases
777 (add-before 'build 'chdir
779 (chdir "swig/python")
783 `(("python-numpy" ,python-numpy)))
786 (synopsis "GDAL (Geospatial Data Abstraction Library) python bindings")))
788 (define-public postgis
794 (uri (string-append "https://download.osgeo.org/postgis/source/postgis-"
798 "1jmji8i2wjabkrzqil683lypnmimigdmn64a10j3kj3kzlfn98d3"))))
799 (build-system gnu-build-system)
803 (list (string-append "datadir=" (assoc-ref %outputs "out") "/share")
804 (string-append "docdir="(assoc-ref %outputs "out") "/share/doc")
805 (string-append "pkglibdir="(assoc-ref %outputs "out") "/lib")
806 (string-append "bindir=" (assoc-ref %outputs "out") "/bin"))
808 (modify-phases %standard-phases
809 (add-before 'build 'fix-install-path
810 (lambda* (#:key outputs #:allow-other-keys)
811 (substitute* '("raster/loader/Makefile" "raster/scripts/python/Makefile")
812 (("\\$\\(DESTDIR\\)\\$\\(PGSQL_BINDIR\\)")
813 (string-append (assoc-ref outputs "out") "/bin"))))))))
819 ("libjpeg" ,libjpeg-turbo)
822 ("postgresql" ,postgresql)
826 ("pkg-config" ,pkg-config)))
827 (home-page "https://postgis.net")
828 (synopsis "Spatial database extender for PostgreSQL")
829 (description "PostGIS is a spatial database extender for PostgreSQL
830 object-relational database. It adds support for geographic objects allowing
831 location queries to be run in SQL. This package provides a PostgreSQL
836 ;; loader/dbfopen, safileio.*, shapefil.h, shpopen.c
839 license:public-domain
841 license:bsd-3 ; files only say "BSD"
843 license:cc-by-sa3.0))))
845 (define-public tegola
852 "https://github.com/go-spatial/tegola/archive/v"
854 (file-name (string-append name "-" version ".tar.gz"))
857 "09vnzxfn0r70kmd776kcdfqxhzdj11syxa0b27z4ci1k367v7viw"))))
858 (build-system go-build-system)
860 `(#:import-path "github.com/go-spatial/tegola/cmd/tegola"
861 #:unpack-path "github.com/go-spatial/tegola"
863 (modify-phases %standard-phases
864 (add-before 'build 'set-version
866 (with-directory-excursion "src/github.com/go-spatial/tegola"
867 (substitute* '("cmd/tegola/cmd/root.go"
868 "cmd/tegola_lambda/main.go")
869 (("version not set") ,version)))
871 (home-page "https://tegola.io")
872 (synopsis "Vector tile server for maps")
873 (description "Tegola is a free vector tile server written in Go. Tegola
874 takes geospatial data and slices it into vector tiles that can be efficiently
875 delivered to any client.")
878 ;; Some packages in vendor have other licenses
884 (define-public imposm3
887 (version "0.6.0-alpha.4")
891 (uri (string-append "https://github.com/omniscale/imposm3/archive/v"
893 (file-name (string-append name "-" version ".tar.gz"))
896 "06f0kwmv52yd5m9jlckqxqmkf0cnqy3hamakrvg9lspplyqrds80"))))
897 (build-system go-build-system)
899 `(#:import-path "github.com/omniscale/imposm3/cmd/imposm"
900 #:unpack-path "github.com/omniscale/imposm3"
902 (modify-phases %standard-phases
903 (add-before 'build 'set-version
905 (substitute* "src/github.com/omniscale/imposm3/version.go"
906 (("0.0.0-dev") ,version))
910 ("leveldb" ,leveldb)))
911 (home-page "https://imposm.org/")
912 (synopsis "OpenStreetMap importer for PostGIS")
913 (description "Imposm is an importer for OpenStreetMap data. It reads PBF
914 files and imports the data into PostgreSQL/PostGIS databases. It is designed
915 to create databases that are optimized for rendering/tile/map-services.")
918 ;; Some dependencies in vendor have different licenses
923 (define-public libosmium
931 (url "https://github.com/osmcode/libosmium")
932 (commit (string-append "v" version))))
933 (file-name (git-file-name name version))
935 (base32 "0rqy18bbakp41f44y5id9ixh0ar2dby46z17p4115z8k1vv9znq2"))))
936 (build-system cmake-build-system)
944 ("protozero" ,protozero)
945 ("sparsehash" ,sparsehash)
949 `(("doxygen" ,doxygen)))
950 (home-page "https://osmcode.org/libosmium/")
951 (synopsis "C++ library for working with OpenStreetMap data")
952 (description "Libosmium is a fast and flexible C++ library for working with
953 OpenStreetMap data.")
954 (license license:boost1.0)))
956 (define-public osm2pgsql
964 (url "https://github.com/openstreetmap/osm2pgsql")
966 (file-name (git-file-name name version))
968 (base32 "1j35aa8qinhavliqi5pdm0viyi7lm5xyk402rliaxxs1r2hbsafn"))
969 (modules '((guix build utils)))
972 (delete-file-recursively "contrib/protozero")
973 (delete-file-recursively "contrib/libosmium")
975 (build-system cmake-build-system)
977 `(#:tests? #f; tests fail because we need to setup a database
979 (list (string-append "-DOSMIUM_INCLUDE_DIR="
980 (assoc-ref %build-inputs "libosmium")
982 (string-append "-DPROTOZERO_INCLUDE_DIR="
983 (assoc-ref %build-inputs "protozero")
989 ("libosmium" ,libosmium)
991 ("postgresql" ,postgresql)
993 ("protozero" ,protozero)
997 ("python-psycopg2" ,python-psycopg2)))
998 (home-page "https://github.com/openstreetmap/osm2pgsql")
999 (synopsis "OSM data importer to postgresql")
1000 (description "Osm2pgsql is a tool for loading OpenStreetMap data into a
1001 PostgreSQL / PostGIS database suitable for applications like rendering into a
1002 map, geocoding with Nominatim, or general analysis.")
1003 (license license:gpl2+)))
1005 (define-public tippecanoe
1013 (url "https://github.com/mapbox/tippecanoe")
1015 (file-name (git-file-name name version))
1017 (base32 "1m0x931a945sr7axyhcvpwh798m58hx1zxh6ikgf9gsgqhdhmszz"))))
1018 (build-system gnu-build-system)
1021 (modify-phases %standard-phases (delete 'configure))
1022 #:test-target "test"
1025 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
1030 (home-page "https://github.com/mapbox/tippecanoe")
1031 (synopsis "Vector tile server for maps")
1032 (description "Tippecanoe creates scale-independent view of data, so that
1033 the texture and density of features is visible at every zoom level, instead of
1034 dropping features at lower levels.")
1035 (license license:bsd-2)))
1037 (define-public osmctools
1045 (url "https://gitlab.com/osm-c-tools/osmctools")
1047 (file-name (git-file-name name version))
1050 "1m8d3r1q1v05pkr8k9czrmb4xjszw6hvgsf3kn9pf0v14gpn4r8f"))))
1051 (build-system gnu-build-system)
1053 `(("autoconf" ,autoconf)
1054 ("automake" ,automake)))
1057 (home-page "https://gitlab.com/osm-c-tools/osmctools")
1058 (synopsis "Tools to convert, filter and update OpenStreetMap data files")
1059 (description "This project contains a few tools which are used in the
1060 OpenStreetMap project. They can be used to convert, filter and update
1061 OpenStreetMap data files.")
1062 (license license:agpl3)))
1064 (define-public osm-gps-map
1066 (name "osm-gps-map")
1072 "https://github.com/nzjrs/osm-gps-map/releases/download/"
1073 version "/osm-gps-map-" version ".tar.gz"))
1076 "11imsf4cz1dpxdjh178k2s29axmq86rkfg1pqmn7incyxmjzhbwg"))))
1077 (build-system gnu-build-system)
1079 `(("gnome-common" ,gnome-common)
1080 ("gtk-doc" ,gtk-doc)
1081 ("pkg-config" ,pkg-config)))
1085 ("gobject-introspection" ,gobject-introspection)
1087 ("libsoup" ,libsoup)))
1088 (home-page "https://nzjrs.github.io/osm-gps-map/")
1089 (synopsis "GTK+ widget for displaying OpenStreetMap tiles")
1091 "This package provides a GTK+ widget (and Python bindings) that when
1092 given GPS coordinates,draws a GPS track, and points of interest on a moving
1093 map display. Downloads map data from a number of websites, including
1094 @url{https://www.openstreetmap.org}.")
1095 (license license:gpl2+)))
1097 (define-public xygrib
1104 (url "https://github.com/opengribs/XyGrib")
1105 (commit (string-append "v" version))))
1106 (file-name (git-file-name name version))
1109 "0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia"))
1110 (modules '((guix build utils)))
1112 '(begin (delete-file-recursively "data/fonts") #t))))
1113 (build-system cmake-build-system)
1116 (modify-phases %standard-phases
1117 (add-after 'unpack 'patch-directories
1118 (lambda* (#:key inputs #:allow-other-keys)
1119 (let ((jpeg (assoc-ref inputs "openjpeg"))
1120 (font (assoc-ref inputs "font-liberation")))
1121 (substitute* "CMakeLists.txt"
1124 ;; Fix install locations.
1125 (("set\\(PREFIX_BIN.*") "set(PREFIX_BIN \"bin\")\n")
1126 (("set\\(PREFIX_PKGDATA.*") "set(PREFIX_PKGDATA \"share/${PROJECT_NAME}\")\n")
1127 ;; Skip looking for the static library.
1128 (("\"libnova.a\"") ""))
1129 ;; Don't use the bundled font-liberation.
1130 (substitute* "src/util/Font.cpp"
1131 (("Util::pathFonts\\(\\)\\+\"liberation-fonts/\"")
1132 (string-append "\"" font "/share/fonts/truetype/\"")))
1133 (substitute* "src/util/Util.h"
1134 (("pathData\\(\\)\\+\"data/fonts/\"")
1135 (string-append "\"" font "/share/fonts/\""))))
1137 #:tests? #f)) ; no tests
1139 `(("qttools" ,qttools)))
1142 ("font-liberation" ,font-liberation)
1143 ("libnova" ,libnova)
1145 ("openjpeg" ,openjpeg)
1149 (synopsis "Weather Forecast Visualization")
1151 "XyGrib is a Grib file reader and visualizes meteorological data providing
1152 an off-line capability to analyse weather forecasts or hindcasts. It is
1153 intended to be used as a capable weather work station for anyone with a serious
1154 interest in examining weather. This would include members of the sailing
1155 community, private and sport aviators, farmers, weather buffs and many more.
1156 XyGrib is the continuation of the zyGrib software package with a new team of
1158 (home-page "https://opengribs.org")
1159 (license license:gpl3+)))
1161 (define-public libspatialindex
1163 (name "libspatialindex")
1168 (uri (string-append "https://github.com/libspatialindex/libspatialindex/"
1169 "releases/download/" version "/spatialindex-src-"
1170 version ".tar.bz2"))
1173 "02n5vjcyk04w0djidyp21hfbxfpbbara8ifd9nml6158rwqr8lja"))))
1174 (build-system cmake-build-system)
1175 (home-page "https://libspatialindex.org")
1176 (synopsis "Spatial indexing library")
1177 (description "The purpose of this library is to provide:
1180 @item An extensible framework that will support robust spatial indexing
1182 @item Support for sophisticated spatial queries. Range, point location,
1183 nearest neighbor and k-nearest neighbor as well as parametric queries (defined
1184 by spatial constraints) should be easy to deploy and run.
1185 @item Easy to use interfaces for inserting, deleting and updating information.
1186 @item Wide variety of customization capabilities. Basic index and storage
1187 characteristics like the page size, node capacity, minimum fan-out, splitting
1188 algorithm, etc. should be easy to customize.
1189 @item Index persistence. Internal memory and external memory structures
1190 should be supported. Clustered and non-clustered indices should be easy to be
1194 (license license:expat)))
1196 (define-public java-jmapviewer
1198 (name "java-jmapviewer")
1202 (uri (string-append "https://svn.openstreetmap.org/applications/"
1203 "viewer/jmapviewer/releases/" version
1204 "/JMapViewer-" version "-Source.zip"))
1207 "0sy6r5fkbb9bclw0is6gwnbzz627m7pjfnsqydxz58pbndakkhrv"))))
1208 (build-system ant-build-system)
1210 `(("unzip" ,unzip)))
1212 `(#:build-target "pack"
1213 #:tests? #f; No tests
1215 (modify-phases %standard-phases
1216 (add-before 'build 'clean
1218 (invoke "ant" "clean")))
1220 (lambda* (#:key outputs #:allow-other-keys)
1221 (let ((dir (string-append (assoc-ref outputs "out") "/share/java/")))
1223 (copy-file "JMapViewer.jar" (string-append dir "JMapViewer.jar"))
1225 (home-page "https://wiki.openstreetmap.org/wiki/JMapViewer")
1226 (synopsis "OSM map integration in Java")
1227 (description "JMapViewer is a Java component which easily
1228 integrates an OSM map view into your Java application. It is maintained as
1229 an independent project by the JOSM team.")
1230 (license license:gpl2)))
1232 (define-public java-opening-hours-parser
1234 (name "java-opening-hours-parser")
1239 (url "https://github.com/simonpoole/OpeningHoursParser")
1241 (file-name (git-file-name name version))
1244 "1m8sp0jbjyv1nq3ddj8rk6rf3sva3mkacc6vw7rsj0c2n57k3i50"))))
1245 (build-system ant-build-system)
1247 `(#:jar-name "java-opening-hours-parser.jar"
1248 #:source-dir "src/main/java"
1250 (modify-phases %standard-phases
1251 (add-before 'build 'copy-resources
1253 (copy-recursively "src/main/resources" "build/classes")
1255 (add-before 'build 'generate-parser
1257 (let* ((dir "src/main/java/ch/poole/openinghoursparser")
1258 (file (string-append dir "/OpeningHoursParser.jj")))
1259 (invoke "javacc" "-DEBUG_PARSER=false"
1260 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1261 "-GRAMMAR_ENCODING=UTF-8"
1262 (string-append "-OUTPUT_DIRECTORY=" dir)
1266 `(("java-jetbrains-annotations" ,java-jetbrains-annotations)))
1268 `(("javacc" ,javacc)
1269 ("java-junit" ,java-junit)
1270 ("java-hamcrest-core" ,java-hamcrest-core)))
1271 (home-page "https://github.com/simonpoole/OpeningHoursParser")
1272 (synopsis "Java parser for the OpenStreetMap opening hour format")
1273 (description "This is a very simplistic parser for string values according
1274 to the OSM opening hours specification.")
1275 (license license:expat)))
1284 (url "https://josm.openstreetmap.de/svn/trunk")
1285 (revision (string->number version))
1289 "131ly6ah9ygrah1wq1h2199v4hyzgflnh62ychs4jqvy9wz0dal6"))
1290 (file-name (string-append name "-" version "-checkout"))
1291 (modules '((guix build utils)))
1294 (for-each delete-file (find-files "." ".*.jar$"))
1296 (build-system ant-build-system)
1298 `(("javacc" ,javacc)))
1300 `(("java-commons-jcs" ,java-commons-jcs)
1301 ("java-commons-compress" ,java-commons-compress)
1302 ("java-jmapviewer" ,java-jmapviewer)
1303 ("java-jsonp-api" ,java-jsonp-api)
1304 ("java-jsonp-impl" ,java-jsonp-impl); runtime dependency
1305 ("java-metadata-extractor" ,java-metadata-extractor)
1306 ("java-opening-hours-parser" ,java-opening-hours-parser)
1307 ("java-openjfx-media" ,java-openjfx-media)
1308 ("java-signpost-core" ,java-signpost-core)
1309 ("java-svg-salamander" ,java-svg-salamander)))
1312 #:jar-name "josm.jar"
1314 (modify-phases %standard-phases
1315 (add-after 'unpack 'rm-build.xml
1317 (delete-file "build.xml")
1319 (add-before 'build 'fix-revision
1321 (with-output-to-file "REVISION.XML"
1324 (string-append "<info><entry><commit revision=\"" ,version "\">"
1325 "<date>1970-01-01 00:00:00 +0000</date>"
1326 "</commit></entry></info>"))))
1328 (add-before 'build 'fix-jcs
1330 ;; This version of JOSM uses an unreleased version of commons-jcs,
1331 ;; which has renamed its classes to another namespace. Rename them
1332 ;; back so they can be used with our version of jcs.
1333 (substitute* (find-files "." ".*.java$")
1336 (add-before 'build 'fix-classpath
1337 (lambda* (#:key inputs #:allow-other-keys)
1342 (let ((source (assoc-ref inputs "source")))
1343 (not (equal? (substring s 0 (string-length source))
1345 (string-split (getenv "CLASSPATH") #\:))
1348 (add-before 'build 'generate-parser
1350 (let* ((dir "src/org/openstreetmap/josm/gui/mappaint/mapcss")
1351 (out (string-append dir "/parsergen"))
1352 (file (string-append dir "/MapCSSParser.jj")))
1353 (mkdir-p "src/org/openstreetmap/josm/gui/mappaint/mapcss/parsergen")
1354 (invoke "javacc" "-DEBUG_PARSER=false"
1355 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1356 "-GRAMMAR_ENCODING=UTF-8"
1357 (string-append "-OUTPUT_DIRECTORY=" out)
1360 (add-after 'build 'generate-epsg
1362 (system* "javac" "scripts/BuildProjectionDefinitions.java"
1363 "-cp" "build/classes")
1364 (mkdir-p "data/projection")
1365 (with-output-to-file "data/projection/custom-epsg"
1366 (lambda _ (display "")))
1367 (invoke "java" "-cp" "build/classes:scripts:."
1368 "BuildProjectionDefinitions" ".")
1370 (add-after 'generate-epsg 'copy-resources
1372 (copy-recursively "resources" "build/classes")
1374 (add-before 'install 'regenerate-jar
1376 ;; We need to regenerate the jar file to add data.
1377 (delete-file "build/jar/josm.jar")
1378 (invoke "jar" "-cf" "build/jar/josm.jar" "-C"
1379 "build/classes" ".")
1381 (add-before 'build 'copy-revision
1383 (mkdir-p "build/classes")
1384 (with-output-to-file "build/classes/REVISION"
1387 (string-append "Revision: " ,version "\n"
1388 "Is-Local-Build: true\n"
1389 "Build-Date: 1970-01-01 00:00:00 +0000\n"))))
1391 (add-after 'install 'install-share-directories
1392 (lambda* (#:key outputs #:allow-other-keys)
1393 (let ((out (assoc-ref outputs "out"))
1394 (share-directories '("applications" "icons" "man" "menu"
1395 "metainfo" "mime" "pixmaps")))
1396 (for-each (lambda (directory)
1397 (copy-recursively (string-append
1398 "native/linux/tested/usr/share/"
1401 out "/share/" directory)))
1404 (add-after 'install 'install-bin
1405 (lambda* (#:key outputs inputs #:allow-other-keys)
1406 (let* ((out (assoc-ref outputs "out"))
1407 (bin (string-append out "/bin")))
1409 (with-output-to-file (string-append bin "/josm")
1412 (string-append "#!/bin/sh\n"
1413 (assoc-ref inputs "jdk") "/bin/java"
1414 " -cp " out "/share/java/josm.jar:"
1415 (getenv "CLASSPATH")
1416 " org.openstreetmap.josm.gui.MainApplication"))))
1417 (chmod (string-append bin "/josm") #o755))
1419 (home-page "https://josm.openstreetmap.de")
1420 (synopsis "OSM editor")
1421 (description "JOSM is an extensible editor for OpenStreetMap (OSM). It
1422 supports loading GPX tracks, background imagery and OSM data from local
1423 sources as well as from online sources and allows editing the OSM data (nodes,
1424 ways, and relations) and their metadata tags.")
1425 (license license:gpl2+)))
1427 (define-public libmaxminddb
1429 (name "libmaxminddb")
1434 (uri (string-append "https://github.com/maxmind/libmaxminddb"
1435 "/releases/download/" version "/"
1436 "/libmaxminddb-" version ".tar.gz"))
1438 (base32 "0fd4a4sxiiwzbd5h74wl1ijnb7xybjyybb7q41vdq3w8nk3zdzd5"))))
1439 (build-system gnu-build-system)
1442 (list ,(string-append "CC=" (cc-for-target)))))
1445 (home-page "https://maxmind.github.io/libmaxminddb/")
1446 (synopsis "C library for the MaxMind DB file format")
1447 (description "The libmaxminddb library provides a C library for reading
1448 MaxMind DB files, including the GeoIP2 databases from MaxMind. The MaxMind DB
1449 format is a custom, but open, binary format designed to facilitate fast
1450 lookups of IP addresses while allowing flexibility in the type of data
1451 associated with an address.")
1452 (license license:asl2.0)))
1454 (define-public python-maxminddb
1456 (name "python-maxminddb")
1461 (uri (pypi-uri "maxminddb" version))
1464 "0y9giw81k4wdmpryr4k42w50z292mf364a6vs1vxf83ksc9ig6j4"))))
1465 (build-system python-build-system)
1467 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1469 `(("libmaxminddb" ,libmaxminddb)))
1470 (home-page "https://www.maxmind.com/")
1471 (synopsis "Reader for the MaxMind DB format")
1472 (description "MaxMind DB is a binary file format that stores data indexed
1473 by IP address subnets (IPv4 or IPv6). This is a Python module for reading
1475 (license license:asl2.0)))
1477 (define-public python-geoip2
1479 (name "python-geoip2")
1484 (uri (pypi-uri "geoip2" version))
1487 "1w7cay5q6zawjzivqbwz5cqx1qbdjw6kbriccb7l46p7b39fkzzp"))))
1488 (build-system python-build-system)
1490 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1492 `(("python-maxminddb" ,python-maxminddb)
1493 ("python-requests" ,python-requests)))
1494 (home-page "https://www.maxmind.com/")
1495 (synopsis "MaxMind GeoIP2 API")
1496 (description "Provides an API for the GeoIP2 web services and databases.
1497 The API also works with MaxMind’s free GeoLite2 databases.")
1498 (license license:asl2.0)))
1500 (define-public routino
1507 (uri (string-append "http://www.routino.org/download/routino-"
1511 "1ccx3s99j8syxc1gqkzsaqkmyf44l7h3adildnc5iq2md7bp8wab"))))
1512 (build-system gnu-build-system)
1520 `(#:test-target "test"
1522 (modify-phases %standard-phases
1524 (lambda* (#:key outputs #:allow-other-keys)
1525 (substitute* "Makefile.conf"
1526 (("prefix=/usr/local")
1527 (string-append "prefix=" (assoc-ref outputs "out")))
1528 (("LDFLAGS_LDSO=-Wl,-R\\.")
1529 "LDFLAGS_LDSO=-Wl,-R$(libdir)")
1530 (("#CFLAGS\\+=-DUSE_XZ")
1532 (("#LDFLAGS\\+=-llzma")
1535 (synopsis "Routing application for OpenStreetMap data")
1537 "Routino is an application for finding a route between two points
1538 using the dataset of topographical information collected by
1539 @url{https://www.OpenStreetMap.org}.")
1540 (home-page "https://www.routino.org/")
1541 (license license:agpl3+)))
1543 (define-public qmapshack
1551 (url "https://github.com/Maproom/qmapshack")
1552 (commit (string-append "V_" version))))
1553 (file-name (git-file-name name version))
1556 "07c2hrq9sn456w7l3gdr599rmjfv2k6mh159zza7p1py8r7ywksa"))))
1557 (build-system qt-build-system)
1559 `(("pkg-config" ,pkg-config)
1560 ("qttools" ,qttools)))
1563 ("libjpeg-turbo" ,libjpeg-turbo)
1566 ("qtdeclarative" ,qtdeclarative)
1567 ("qtlocation" ,qtlocation)
1568 ("qtwebchannel" ,qtwebchannel)
1569 ("qtwebengine" ,qtwebengine)
1571 ("routino" ,routino)
1572 ("sqlite" ,sqlite) ; See wrap phase
1577 (modify-phases %standard-phases
1578 (add-after 'unpack 'fix-cmake-modules
1579 (lambda* (#:key inputs #:allow-other-keys)
1580 (substitute* "CMakeLists.txt"
1581 (("find_package\\(Qt5PrintSupport REQUIRED\\)" all)
1582 (string-append all "\nfind_package(Qt5Positioning REQUIRED)")))
1583 (substitute* "cmake/Modules/FindROUTINO.cmake"
1585 (assoc-ref inputs "routino")))
1586 ;; The following fixes are included as patches in the sources
1587 ;; of QMapShack, but they are not applied by default, for
1589 (invoke "patch" "-p1" "-i" "FindPROJ4.patch")
1590 (invoke "patch" "-p1" "-i" "FindQuaZip5.patch")
1592 (add-after 'install 'wrap
1593 ;; The program fails to find the QtWebEngineProcess program,
1594 ;; so we set QTWEBENGINEPROCESS_PATH to help it.
1595 (lambda* (#:key inputs outputs #:allow-other-keys)
1596 (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
1597 (qtwebengineprocess (string-append
1598 (assoc-ref inputs "qtwebengine")
1599 "/lib/qt5/libexec/QtWebEngineProcess")))
1600 (for-each (lambda (program)
1601 (wrap-program program
1602 `("QTWEBENGINEPROCESS_PATH" =
1603 (,qtwebengineprocess))))
1604 (find-files bin ".*")))
1606 (synopsis "GPS mapping application")
1608 "QMapShack can be used to plan your next outdoor trip or to visualize and
1609 archive all the GPS recordings of your past trips. It is the successor of the
1610 QLandkarte GT application.")
1611 (home-page "https://github.com/Maproom/qmapshack/wiki")
1612 (license license:gpl3+)))
1614 (define-public readosm
1621 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1622 "readosm-" version ".tar.gz"))
1624 (base32 "0zv6p352pqjcv70nvcaf2x3011z35jqa24dcdm27a4ns1wha3cjc"))))
1625 (build-system gnu-build-system)
1629 (synopsis "Data extractor for OpenStreetMap files")
1631 "ReadOSM is a library to extract valid data from within an OpenStreetMap
1632 input file (in @code{.osm} or @code{.osm.pbf} format).")
1633 (home-page "https://www.gaia-gis.it/fossil/readosm/index")
1634 (license (list license:gpl2+
1638 (define-public spatialite-tools
1640 (name "spatialite-tools")
1645 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1646 "spatialite-tools-" version ".tar.gz"))
1648 (base32 "12fggjhi8cgwvw8f6nk76f83b8lqkc07abxyj5ap6f2gq2dqafgp"))))
1649 (build-system gnu-build-system)
1651 `(("pkg-config" ,pkg-config)))
1656 ("libspatialite" ,libspatialite)
1657 ("libxml2" ,libxml2)
1659 ("readosm" ,readosm)
1662 (synopsis "Collection of command line tools for SpatiaLite")
1664 "@code{spatialite-tools} is a collection of Command Line Interface (CLI)
1665 tools supporting SpatiaLite.")
1666 (home-page "https://www.gaia-gis.it/fossil/spatialite-tools/index")
1667 (license license:gpl3+)))
1669 (define-public virtualpg
1676 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1677 "virtualpg-" version ".tar.gz"))
1679 (base32 "0kjipcd08vvn188xmwbs7sw41xcs06x47n2hbqshpjcr51mxbarp"))))
1680 (build-system gnu-build-system)
1682 `(("postgresql" ,postgresql)
1683 ("sqlite" ,sqlite)))
1684 (synopsis "Allow SQLite/SpatiaLite to access PostgreSQL/PostGIS tables")
1686 "VirtualPG is a dynamic extension for the SQLite DBMS. It implements
1687 the VirtualPostgres driver, allowing to directly exchange data between SQLite
1688 and PostgreSQL; if SpatiaLite is available even PostGIS geometries can be
1689 exchanged form one Spatial DBMS and the other.")
1690 (home-page "https://www.gaia-gis.it/fossil/virtualpg/index")
1691 (license (list license:gpl2+
1695 (define-public opencpn
1703 (url "https://github.com/OpenCPN/OpenCPN")
1704 (commit (string-append "v" version))))
1705 (file-name (git-file-name name version))
1707 (base32 "1xv3h6svw9aay5ixpql231md3pf00qxvhg62z88daraf18hlkfja"))))
1708 (build-system cmake-build-system)
1710 `(("gettext" ,gettext-minimal)
1711 ("pkg-config" ,pkg-config)))
1718 ("libarchive" ,libarchive)
1720 ("libexif" ,libexif)
1721 ("libsndfile" ,libsndfile)
1725 ("portaudio" ,portaudio)
1727 ("tinyxml" ,tinyxml)
1729 ("wxwidgets" ,wxwidgets)
1733 `(#:configure-flags '("-DENABLE_PORTAUDIO=ON"
1734 "-DENABLE_SNDFILE=ON"
1735 "-DBUNDLE_TCDATA=ON"
1736 "-DBUNDLE_GSHHS=CRUDE")
1737 #:tests? #f ; No tests defined
1739 (modify-phases %standard-phases
1740 (add-after 'unpack 'fix-build
1742 (substitute* "CMakeLists.txt"
1743 (("set\\(wxWidgets_CONFIG_OPTIONS.*--toolkit=gtk3" all)
1744 (string-append all " --libs all")))
1746 (synopsis "Chart plotter and marine GPS navigation software")
1748 "OpenCPN is a chart plotter and marine navigation software designed to be
1749 used at the helm station of your boat while underway. Chart a course and
1750 track your position right from your laptop.")
1751 (home-page "https://opencpn.org/")
1752 (license (list license:asl2.0
1763 (define-public grass
1764 (let* ((version "7.8.2")
1765 (majorminor (string-join (list-head (string-split version #\.) 2) ""))
1766 (grassxx (string-append "grass" majorminor)))
1773 (uri (string-append "https://grass.osgeo.org/" grassxx
1774 "/source/grass-" version ".tar.gz"))
1776 (base32 "1fwsm99kz0bxvjk7442qq1h45ikrmhba8bqclafb61gqg1q6ymrk"))))
1777 (build-system gnu-build-system)
1782 ("freetype" ,freetype)
1788 ("libtiff" ,libtiff)
1790 ("mariadb-dev" ,mariadb "dev")
1791 ("mariadb-lib" ,mariadb "lib")
1793 ("openblas" ,openblas)
1795 ("postgresql" ,postgresql)
1798 ("python-dateutil" ,python-dateutil)
1799 ("python-numpy" ,python-numpy)
1800 ("python-wxpython" ,python-wxpython)
1801 ("readline" ,readline)
1803 ("wxwidgets" ,wxwidgets)
1805 ("zstd" ,zstd "lib")))
1807 `(("bash" ,bash-minimal)
1810 ("pkg-config" ,pkg-config)))
1812 `(#:tests? #f ; No tests
1813 #:modules ((guix build gnu-build-system)
1814 ((guix build python-build-system) #:prefix python:)
1816 #:imported-modules (,@%gnu-build-system-modules
1817 (guix build python-build-system))
1819 (modify-phases %standard-phases
1821 (lambda* (#:key inputs outputs #:allow-other-keys)
1822 (let ((shell (string-append (assoc-ref inputs "bash")
1824 (setenv "SHELL" shell)
1825 (setenv "CONFIG_SHELL" shell)
1826 (setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl,"
1827 (assoc-ref outputs "out")
1828 "/" ,grassxx "/lib")))
1829 (invoke "./configure"
1830 (string-append "--prefix="
1831 (assoc-ref outputs "out"))
1834 (string-append "--with-freetype-includes="
1835 (assoc-ref inputs "freetype")
1836 "/include/freetype2")
1837 (string-append "--with-freetype-libs="
1838 (assoc-ref inputs "freetype")
1843 (string-append "--with-mysql-includes="
1844 (assoc-ref inputs "mariadb-dev")
1846 (string-append "--with-mysql-libs="
1847 (assoc-ref inputs "mariadb-lib")
1851 (string-append "--with-proj-share="
1852 (assoc-ref inputs "proj.4")
1857 "--with-wxwidgets")))
1858 (add-after 'install 'install-links
1859 (lambda* (#:key outputs #:allow-other-keys)
1860 ;; Put links for includes and libraries in the standard places.
1861 (let* ((out (assoc-ref outputs "out"))
1862 (dir (string-append out "/" ,grassxx)))
1863 (symlink (string-append dir "/include")
1864 (string-append out "/include"))
1865 (symlink (string-append dir "/lib")
1866 (string-append out "/lib")))
1868 (add-after 'install-links 'wrap-python
1869 (assoc-ref python:%standard-phases 'wrap)))))
1870 (synopsis "GRASS Geographic Information System")
1872 "GRASS (Geographic Resources Analysis Support System), is a Geographic
1873 Information System (GIS) software suite used for geospatial data management and
1874 analysis, image processing, graphics and maps production, spatial modeling, and
1876 (home-page "https://grass.osgeo.org/")
1877 (license license:gpl2+))))
1886 (uri (string-append "mirror://sourceforge/saga-gis/SAGA%20-%20"
1887 (version-major version) "/SAGA%20-%20" version
1888 "/saga-" version ".tar.gz"))
1890 (base32 "09j5magmayq2y620kqa490mfd1kpdp3lng2ifcgbrmssc079ybm0"))))
1891 (build-system gnu-build-system)
1893 `(("pkg-config" ,pkg-config)
1901 ("libharu" ,libharu)
1902 ("libtiff" ,libtiff)
1904 ("postgresql" ,postgresql)
1908 ("unixodbc" ,unixodbc)
1910 ("wxwidgets" ,wxwidgets)))
1912 '(#:configure-flags '("--enable-python")))
1913 (synopsis "System for Automated Geoscientific Analyses")
1915 "SAGA (System for Automated Geoscientific Analyses) is a Geographic
1916 Information System (GIS) software. It has been designed for an easy and
1917 effective implementation of spatial algorithms and it offers a comprehensive,
1918 growing set of geoscientific methods.")
1919 (home-page "http://www.saga-gis.org")
1920 (license (list license:gpl2+ license:lgpl2.1+))))
1929 (uri (string-append "https://qgis.org/downloads/qgis-"
1930 version ".tar.bz2"))
1932 (base32 "1a41525y8ac44gzcfaffjx0lyrm49hgnr83jrq40r5mqd3vpmp57"))))
1933 (build-system cmake-build-system)
1935 `(#:modules ((guix build cmake-build-system)
1936 ((guix build python-build-system) #:prefix python:)
1937 (guix build qt-utils)
1939 #:imported-modules (,@%cmake-build-system-modules
1940 (guix build python-build-system)
1941 (guix build qt-utils))
1943 (modify-phases %standard-phases
1944 ;; Configure correct path to PyQt5 SIP directory
1945 (add-after 'unpack 'configure-pyqt5-sip-path
1946 (lambda* (#:key inputs #:allow-other-keys)
1947 (substitute* "cmake/FindPyQt5.cmake"
1948 (("\"\\\\\\\\1\" PYQT5_SIP_DIR")
1949 (string-append "\"" (assoc-ref inputs "python-pyqt+qscintilla")
1950 "/share/sip\" PYQT5_SIP_DIR")))
1951 (substitute* (list "scripts/prepare-commit.sh"
1952 "scripts/runtests-local-travis-config.sh"
1953 "scripts/sip_include.sh"
1955 "scripts/sipify_all.sh"
1956 "scripts/spell_check/check_spelling.sh"
1957 "scripts/spell_check/spell_test.sh"
1958 "scripts/verify-indentation.sh"
1959 "tests/code_layout/test_banned_keywords.sh"
1960 "tests/code_layout/test_licenses.sh"
1961 "tests/code_layout/test_shellcheck.sh"
1962 "tests/code_layout/test_sip_include.sh"
1963 "tests/code_layout/test_sipfiles_uptodate.sh"
1964 "tests/code_layout/test_sipify.sh")
1965 (("\\$\\(git rev-parse --show-toplevel\\)")
1967 (substitute* "tests/code_layout/test_sip_include.sh"
1968 (("^REV=.*") "REV=currentrev\n"))
1971 (lambda* (#:key inputs #:allow-other-keys)
1972 (setenv "HOME" "/tmp")
1973 (system (string-append (assoc-ref inputs "xorg-server")
1975 (setenv "DISPLAY" ":1")
1976 (setenv "TRAVIS" "true")
1977 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
1980 '(;; Disable tests that require network access
1981 "qgis_filedownloader"
1982 ;; TODO: Find why the following tests fail
1983 "ProcessingQgisAlgorithmsTestPt1"
1984 "ProcessingQgisAlgorithmsTestPt2"
1985 "ProcessingQgisAlgorithmsTestPt3"
1986 "ProcessingQgisAlgorithmsTestPt4"
1987 "ProcessingGdalAlgorithmsRasterTest"
1988 "ProcessingGdalAlgorithmsVectorTest"
1989 "ProcessingGrass7AlgorithmsImageryTest"
1990 "ProcessingGrass7AlgorithmsRasterTest"
1991 "ProcessingGrass7AlgorithmsVectorTest"
1992 "ProcessingOtbAlgorithmsTest"
1993 "qgis_authmanagertest"
1994 "qgis_compositionconvertertest"
1995 "qgis_coordinatereferencesystemtest"
1997 "qgis_layouthtmltest"
1998 "qgis_layoutmaptest"
1999 "qgis_layoutmapgridtest"
2000 "qgis_painteffecttest"
2001 "qgis_pallabelingtest"
2002 "qgis_svgmarkertest"
2003 "qgis_taskmanagertest"
2005 "qgis_processingtest"
2006 "qgis_wcsprovidertest"
2007 "qgis_arcgisrestutilstest"
2008 "qgis_grassprovidertest7"
2009 "qgis_gpsinformationwidget"
2011 "PyQgsPythonProvider"
2013 "PyQgsAuthenticationSystem"
2018 "PyQgsLayerMetadata"
2021 "PyQgsLayoutMapGrid"
2023 "PyQgsLayoutExporter"
2026 "PyQgsOGRProviderGpkg"
2027 "PyQgsPalLabelingLayout"
2028 "PyQgsImportIntoPostGIS"
2029 "PyQgsProviderConnectionPostgres"
2030 "PyQgsProviderConnectionGpkg"
2031 "PyQgsShapefileProvider"
2035 "PyQgsSpatialiteProvider"
2036 "PyQgsVectorFileWriter"
2038 "PyQgsVectorLayerUtils"
2039 "PyQgsVirtualLayerProvider"
2041 "PyQgsOapifProvider"
2042 "PyQgsLayerDependencies"
2043 "PyQgsDBManagerGpkg"
2044 "PyQgsDBManagerSpatialite"
2046 "PyQgsAuxiliaryStorage"
2047 "PyQgsSelectiveMasking"
2049 "qgis_geometrycheckstest"
2053 "qgis_sip_uptodate")
2055 (add-after 'install 'wrap-python
2056 (assoc-ref python:%standard-phases 'wrap))
2057 (add-after 'wrap-python 'wrap-qt
2058 (lambda* (#:key outputs #:allow-other-keys)
2059 (wrap-qt-program (assoc-ref outputs "out") "qgis")
2061 (add-after 'wrap-qt 'wrap-gis
2062 (lambda* (#:key inputs outputs #:allow-other-keys)
2063 (let* ((out (assoc-ref outputs "out"))
2064 (saga (string-append (assoc-ref inputs "saga") "/bin"))
2065 (grass-version ,(package-version grass))
2066 (grass-majorminor (string-join
2068 (string-split grass-version #\.) 2)
2070 (grass (string-append (assoc-ref inputs "grass")
2071 "/grass" grass-majorminor)))
2072 (wrap-program (string-append out "/bin/qgis")
2073 `("PATH" ":" prefix (,saga))
2074 `("QGIS_PREFIX_PATH" = (,out))
2075 `("GISBASE" = (,grass))))
2082 ("gpsbabel" ,gpsbabel)
2086 ("libspatialindex" ,libspatialindex)
2087 ("libspatialite" ,libspatialite)
2088 ("libxml2" ,libxml2)
2091 ("postgresql" ,postgresql)
2094 ("python-chardet" ,python-chardet)
2095 ("python-dateutil" ,python-dateutil)
2096 ("python-gdal" ,python-gdal)
2097 ("python-jinja2" ,python-jinja2)
2098 ("python-numpy" ,python-numpy)
2099 ("python-owslib" ,python-owslib)
2100 ("python-psycopg2" ,python-psycopg2)
2101 ("python-pygments" ,python-pygments)
2102 ("python-pyqt+qscintilla" ,python-pyqt+qscintilla)
2103 ("python-pytz" ,python-pytz)
2104 ("python-pyyaml" ,python-pyyaml)
2105 ("python-requests" ,python-requests)
2106 ("python-sip" ,python-sip)
2107 ("python-six" ,python-six)
2108 ("python-urllib3" ,python-urllib3)
2110 ("qscintilla" ,qscintilla)
2112 ("qtdeclarative" ,qtdeclarative)
2113 ("qtkeychain" ,qtkeychain)
2114 ("qtlocation" ,qtlocation)
2115 ("qtserialport" ,qtserialport)
2117 ("qtwebkit" ,qtwebkit)
2120 ("sqlite" ,sqlite)))
2125 ("perl-yaml-tiny" ,perl-yaml-tiny)
2126 ("pkg-config" ,pkg-config)
2127 ("python-mock" ,python-mock)
2128 ("python-nose2" ,python-nose2)
2129 ("qttools" ,qttools)
2130 ("shellcheck" ,shellcheck)
2131 ("xorg-server" ,xorg-server-for-tests)))
2132 (home-page "https://qgis.org")
2133 (synopsis "Geographical information system")
2134 (description "QGIS is an easy to use Geographical Information
2135 System (GIS). It is a GIS data viewer and editor. QGIS supports a number of
2136 raster and vector data formats, with new support easily added using the plugin
2149 (license:fsdg-compatible "https://www.deviantart.com/elvensword")
2150 (license:fsf-free "file://debian/copyright" "Go Squared")
2154 "https://www.deviantart.com/webgoddess/art/Reddish-Inspired-Gradients-42208824")
2156 "file://debian/copyright"
2157 "QT-Commercial or LGPL-2.1 with Digia Qt LGPL Exception 1.1 or GPL-3")
2167 (license:non-copyleft "file://debian/copyright" "BSD-like-gist")
2168 (license:non-copyleft "file://debian/copyright" "Jim Mossman Attribution")
2169 (license:non-copyleft
2170 "https://www.ncl.ucar.edu/Download/NCL_source_license.shtml"
2171 "NCL Source Code License")
2174 license:public-domain
2177 (define-public python-geographiclib
2179 (name "python-geographiclib")
2184 (uri (pypi-uri "geographiclib" version))
2187 "0cn6ap5fkh3mkfa57l5b44z3gvz7j6lpmc9rl4g2jny2gvp4dg8j"))))
2188 (build-system python-build-system)
2189 (home-page "https://geographiclib.sourceforge.io/1.50/python/")
2190 (synopsis "Python geodesic routines from GeographicLib")
2192 "This is a python implementation of the geodesic routines in GeographicLib.")
2193 (license license:expat)))
2195 (define-public python-geopy
2197 (name "python-geopy")
2202 (uri (pypi-uri "geopy" version))
2205 "0fx0cv0kgbvynpmjgsvq2fpsyngd5idiscdn8pd5201f1ngii3mq"))))
2206 (build-system python-build-system)
2208 `(("python-geographiclib" ,python-geographiclib)))
2210 `(("python-async-generator" ,python-async-generator)
2211 ("python-coverage" ,python-coverage)
2212 ("python-flake8" ,python-flake8)
2213 ("python-isort" ,python-isort)
2214 ("python-pytest" ,python-pytest)
2215 ("python-pytest-aiohttp" ,python-pytest-aiohttp)
2216 ("python-readme-renderer" ,python-readme-renderer)
2217 ("python-pytz" ,python-pytz)))
2218 (home-page "https://github.com/geopy/geopy")
2219 (synopsis "Geocoding library for Python")
2220 (description "@code{geopy} is a Python client for several popular geocoding
2221 web services. @code{geopy} makes it easy for Python developers to locate the
2222 coordinates of addresses, cities, countries, and landmarks across the globe
2223 using third-party geocoders and other data sources.")
2224 (license license:expat)))