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 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 Julien Lepiller <julien@lepiller.eu>
10 ;;; Copyright © 2019, 2020 Guillaume Le Vaillant <glv@posteo.net>
11 ;;; Copyright © 2019 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>
16 ;;; This file is part of GNU Guix.
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.
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.
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/>.
31 (define-module (gnu packages geo)
32 #:use-module (guix build-system ant)
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system glib-or-gtk)
35 #:use-module (guix build-system gnu)
36 #:use-module (guix build-system go)
37 #:use-module (guix build-system meson)
38 #:use-module (guix build-system python)
39 #:use-module (guix build-system qt)
40 #:use-module (guix build-system scons)
41 #:use-module (guix build-system r)
42 #:use-module (guix download)
43 #:use-module (guix git-download)
44 #:use-module (guix svn-download)
45 #:use-module ((guix licenses) #:prefix license:)
46 #:use-module (guix packages)
47 #:use-module (guix utils)
48 #:use-module (gnu packages)
49 #:use-module (gnu packages algebra)
50 #:use-module (gnu packages astronomy)
51 #:use-module (gnu packages audio)
52 #:use-module (gnu packages autotools)
53 #:use-module (gnu packages backup)
54 #:use-module (gnu packages bash)
55 #:use-module (gnu packages bison)
56 #:use-module (gnu packages boost)
57 #:use-module (gnu packages check)
58 #:use-module (gnu packages compression)
59 #:use-module (gnu packages curl)
60 #:use-module (gnu packages databases)
61 #:use-module (gnu packages datastructures)
62 #:use-module (gnu packages documentation)
63 #:use-module (gnu packages elf)
64 #:use-module (gnu packages flex)
65 #:use-module (gnu packages fonts)
66 #:use-module (gnu packages fontutils)
67 #:use-module (gnu packages gettext)
68 #:use-module (gnu packages gl)
69 #:use-module (gnu packages glib)
70 #:use-module (gnu packages gnome)
71 #:use-module (gnu packages gps)
72 #:use-module (gnu packages gtk)
73 #:use-module (gnu packages haskell-apps)
74 #:use-module (gnu packages image)
75 #:use-module (gnu packages image-processing)
76 #:use-module (gnu packages icu4c)
77 #:use-module (gnu packages java)
78 #:use-module (gnu packages kde)
79 #:use-module (gnu packages lua)
80 #:use-module (gnu packages maths)
81 #:use-module (gnu packages pcre)
82 #:use-module (gnu packages pdf)
83 #:use-module (gnu packages perl)
84 #:use-module (gnu packages photo)
85 #:use-module (gnu packages pkg-config)
86 #:use-module (gnu packages protobuf)
87 #:use-module (gnu packages pulseaudio)
88 #:use-module (gnu packages python)
89 #:use-module (gnu packages python-web)
90 #:use-module (gnu packages python-xyz)
91 #:use-module (gnu packages qt)
92 #:use-module (gnu packages readline)
93 #:use-module (gnu packages swig)
94 #:use-module (gnu packages sqlite)
95 #:use-module (gnu packages textutils)
96 #:use-module (gnu packages time)
97 #:use-module (gnu packages web)
98 #:use-module (gnu packages webkit)
99 #:use-module (gnu packages wxwidgets)
100 #:use-module (gnu packages xml)
101 #:use-module (gnu packages xorg))
109 (uri (string-append "http://download.osgeo.org/geos/geos-"
114 "1mb2v9fy1gnbjhcgv0xny11ggfb17vkzsajdyibigwsxr4ylq4cr"))))
115 (build-system gnu-build-system)
116 (arguments `(#:phases
117 (modify-phases %standard-phases
119 'unpack 'patch-test-shebangs
121 (substitute* '("tests/xmltester/testrunner.sh"
122 "tests/geostest/testrunner.sh")
123 (("/bin/sh") (which "sh")))
127 (home-page "https://geos.osgeo.org/")
128 (synopsis "Geometry Engine for Geographic Information Systems")
130 "GEOS provides a spatial object model and fundamental geometric
131 functions. It is a C++ port of the Java Topology Suite (JTS). As such,
132 it aims to contain the complete functionality of JTS in C++. This
133 includes all the OpenGIS Simple Features for SQL spatial predicate
134 functions and spatial operators, as well as specific JTS enhanced
135 topology functions.")
136 (license (list license:lgpl2.1+ ; Main distribution.
137 license:zlib ; tests/xmltester/tinyxml/*
138 license:public-domain)))) ; include/geos/timeval.h
140 (define-public gnome-maps
146 (uri (string-append "mirror://gnome/sources/" name "/"
147 (version-major+minor version) "/"
148 name "-" version ".tar.xz"))
151 "00xslcnhhwslqglgfv2im7vq3awa49y2jxzr8wsby7f713k28vf5"))))
152 (build-system meson-build-system)
156 (modify-phases %standard-phases
157 (add-after 'unpack 'skip-gtk-update-icon-cache
158 ;; Don't create 'icon-theme.cache'.
160 (substitute* "meson_post_install.py"
161 (("gtk-update-icon-cache") "true"))
163 (add-after 'install 'wrap
164 (lambda* (#:key inputs outputs #:allow-other-keys)
165 (let ((out (assoc-ref outputs "out"))
166 (gi-typelib-path (getenv "GI_TYPELIB_PATH"))
167 (geocode-glib-path (string-append
168 (assoc-ref inputs "geocode-glib")
170 (goa-path (string-append
171 (assoc-ref inputs "gnome-online-accounts:lib")
173 (gdk-pixbuf-path (string-append
174 (assoc-ref inputs "gdk-pixbuf")
176 (webkitgtk-path (string-append
177 (assoc-ref inputs "webkitgtk")
179 (wrap-program (string-append out "/bin/gnome-maps")
180 `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path))
182 ;; There seems to be no way to embed the path of
183 ;; libgoa-1.0.so.0, libwebkit2gtk-4.0.so.37,
184 ;; libgdk_pixbuf-2.0.so, libjavascriptcoregtk-4.0.so.18, and
185 ;; libgeocode-glib.so.0
186 `("LD_LIBRARY_PATH" ":" prefix (,goa-path
189 ,geocode-glib-path)))
192 `(("gettext" ,gettext-minimal)
193 ("gobject-introspection" ,gobject-introspection)
194 ("pkg-config" ,pkg-config)))
196 `(("evolution-data-server" ,evolution-data-server)
198 ("libchamplain" ,libchamplain)
200 ("libsecret" ,libsecret)
202 ("libgweather" ,libgweather)
204 ("gdk-pixbuf" ,gdk-pixbuf+svg)
205 ("glib-networking" ,glib-networking)
207 ("geocode-glib" ,geocode-glib)
208 ("gfbgraph" ,gfbgraph)
211 ("gnome-online-accounts:lib" ,gnome-online-accounts "lib")
212 ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
215 ("webkitgtk" ,webkitgtk)))
216 (synopsis "Graphical map viewer and wayfinding program")
217 (description "GNOME Maps is a graphical map viewer. It uses map data from
218 the OpenStreetMap project. It can provide directions for walking, bicycling,
220 (home-page "https://wiki.gnome.org/Apps/Maps")
221 (license license:gpl2+)))
223 (define-public libgaiagraphics
225 (name "libgaiagraphics")
230 (uri (string-append "https://www.gaia-gis.it/gaia-sins/libgaiagraphics-"
234 "076afqv417ag3hfvnif0qc7qscmnq1dsf6y431yygwgf34rjkayc"))))
235 (build-system gnu-build-system)
237 `(("pkg-config" ,pkg-config)))
241 ("libjpeg-turbo" ,libjpeg-turbo)
243 ("libgeotiff" ,libgeotiff)
247 (synopsis "Gaia common graphics support")
248 (description "libgaiagraphics is a library supporting
249 common-utility raster handling methods.")
250 (home-page "https://www.gaia-gis.it/fossil/libgaiagraphics/index")
251 (license license:lgpl3+)))
253 (define-public libgeotiff
260 (uri (string-append "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-"
262 (patches (search-patches
263 ;; See libgeotiff 1.5.1 issue
264 ;; https://github.com/OSGeo/libgeotiff/issues/22
265 "libgeotiff-adapt-test-script-for-proj-6.2.patch"))
267 (base32 "0b31mlzcv5b1y7jdvb7p0pa3xradrg3x5g32ym911lbhq4rrgsgr"))
268 (modules '((guix build utils)))
271 ;; Remove .csv files, distributed from EPSG under a restricted
272 ;; license. See LICENSE for full license text.
273 (for-each delete-file (find-files "." "\\.csv$"))
275 (build-system gnu-build-system)
277 `(("libjpeg-turbo" ,libjpeg-turbo)
281 `(;; libgeotiff headers include proj headers, so ensure those are available.
285 (list "--disable-static"
286 "--with-zlib" "--with-jpeg"
287 (string-append "--with-libtiff=" (assoc-ref %build-inputs "libtiff")))))
288 (synopsis "Library for handling GeoTIFF (geographic enabled TIFF)")
289 (description "libgeotiff is a library on top of libtiff for reading and
290 writing GeoTIFF information tags.")
291 (home-page "https://trac.osgeo.org/geotiff/")
292 ;; This is a mixture of various contributions under different licenses.
293 ;; Note that the EPSG database is NOT "free to use" as the LICENSE file
294 ;; states, as its commercial redistribution is restricted. Hence, we have
295 ;; removed it from the package.
296 (license (list license:public-domain
299 (license:non-copyleft "file://LICENSE"
300 "See LICENSE in the distribution.")))))
302 (define-public libspatialite
304 (name "libspatialite")
309 (uri (string-append "https://www.gaia-gis.it/gaia-sins/libspatialite-"
313 "16d4lpl7xrm9zy4gphy6nwanpjp8wn9g4wq2i2kh8abnlhq01448"))))
314 (build-system gnu-build-system)
316 `(("pkg-config" ,pkg-config)))
326 (modify-phases %standard-phases
327 ;; 3 tests are failing, ignore them:
328 (add-after 'unpack 'ignore-broken-tests
330 (substitute* '("test/Makefile.in")
331 (("\tcheck_sql_stm.*" all) "\tcheck_multithread$(EXEEXT) \\\n")
332 (("(\tch.*) check_v.*ble2.*$" all vt1) (string-append vt1 " \\\n"))
333 (("\tch.* (check_v.*ble4.*)$" all vt4) (string-append "\t" vt4)))
335 (synopsis "Extend SQLite to support Spatial SQL capabilities")
337 "SpatiaLite is a library intended to extend the SQLite core to support
338 fully fledged Spatial SQL capabilities.")
339 (home-page "https://www.gaia-gis.it/fossil/libspatialite/index")
340 ;; For the genuine libspatialite-sources holds:
341 ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked.
342 ;; Files under src/control_points are from GRASS
343 ;; and are licensed under GPL2+ only.
344 ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak.
345 (license (list license:gpl2+
348 license:public-domain))))
357 (uri (string-append "http://download.osgeo.org/proj/proj-"
361 "1y46ij32j9b4x1kjnnlykcwk3kkjwkg44sfc1ziwm3a3g0ki3q3d"))))
362 (build-system gnu-build-system)
364 `(("sqlite" ,sqlite)))
366 `(("pkg-config" ,pkg-config)))
367 (home-page "https://proj.org/")
368 (synopsis "Coordinate transformation software")
370 "Proj is a generic coordinate transformation software that transforms
371 geospatial coordinates from one coordinate reference system (CRS) to another.
372 This includes cartographic projections as well as geodetic transformations.
373 PROJ includes command line applications for easy conversion of coordinates
374 from text files or directly from user input. In addition, proj also exposes
375 an application programming interface that lets developers use the
376 functionality of proj in their own software.")
377 (license (list license:expat
378 ;; src/projections/patterson.cpp
380 ;; src/geodesic.*, src/tests/geodtest.cpp
383 (define-public proj.4
389 (uri (string-append "http://download.osgeo.org/proj/proj-"
393 "1xw5f427xk9p2nbsj04j6m5zyjlyd66sbvl2bkg8hd1kx8pm9139"))))
394 (build-system gnu-build-system)
397 (modify-phases %standard-phases
398 (add-after 'unpack 'patch-test-paths
400 (substitute* '("nad/test27"
406 (("/bin/rm") (which "rm")))
408 ;; Precision problems on i686 and other platforms. See:
409 ;; https://web.archive.org/web/20151006134301/http://trac.osgeo.org/proj/ticket/255
410 ;; Disable failing test.
411 (add-after 'patch-test-paths 'ignore-failing-tests
413 (substitute* '("nad/Makefile.in")
414 (("\tPROJ_LIB.*" all) (string-append "#" all)))
418 (home-page "https://proj.org/")
419 (synopsis "Cartographic Projections Library")
421 "Proj.4 is a library for converting coordinates between cartographic
423 (license (list license:expat
424 ;; src/PJ_patterson.c
428 ;; Embedded EPSG database.
429 (license:non-copyleft "http://www.epsg.org/TermsOfUse")
433 (define-public mapnik
440 (uri (string-append "https://github.com/mapnik/mapnik/releases/download/v"
441 version "/mapnik-v" version ".tar.bz2"))
444 "06frcikaj2mgz3abfk5h0z4j3hbksi0zikwjngbjv4p5f3pwxf8q"))))
445 (build-system scons-build-system)
449 ("freetype" ,freetype)
450 ("harfbuzz" ,harfbuzz)
452 ("libjpeg-turbo" ,libjpeg-turbo)
461 `(("pkg-config" ,pkg-config)))
463 `(#:scons ,scons-python2
466 (string-append "PREFIX=" %output)
467 (string-append "CUSTOM_LDFLAGS=-Wl,-rpath=" %output "/lib"))))
468 (home-page "https://mapnik.org/")
469 (synopsis "Toolkit for developing mapping applications")
470 (description "Mapnik is a toolkit for developing mapping applications. It
471 is basically a collection of geographic objects like maps, layers,
472 datasources, features, and geometries. At its core is a C++ shared library
473 providing algorithms and patterns for spatial data access and visualization.
474 The library does not rely on any specific windowing system and can be deployed
475 to any server environment. It is intended to play fair in a multi-threaded
476 environment and is aimed primarily, but not exclusively, at web-based
478 (license (list license:lgpl2.1+
479 ;; demo/viewer, demo/python/rundemo.py
481 ;; deps/boost, deps/mapbox, deps/agg/include/agg_conv_offset.h
483 ;; deps/mapnik/sparsehash
486 (license:non-copyleft "file://deps/agg/copying")))))
488 (define-public python2-mapnik
490 (name "python2-mapnik")
495 (uri (string-append "https://github.com/mapnik/python-mapnik/archive/v"
497 (file-name (string-append name "-" version ".tar.gz"))
500 "0w7wg72gnwmbjani9sqk42p2jwqkrl9hsdkawahni5m05xsifcb4"))))
501 (build-system python-build-system)
504 ("harfbuzz" ,harfbuzz)
506 ("libjpeg-turbo" ,libjpeg-turbo)
512 ("python2-pycairo" ,python2-pycairo)))
514 (let ((test-data-input
515 (lambda (repository version hash)
518 (uri (string-append "https://github.com/mapnik/" repository
519 "/archive/v" version ".tar.gz"))
520 (file-name (string-append "python-mapnik-" repository
521 "-" version ".tar.gz"))
522 (sha256 (base32 hash))))))
523 `(("python2-nose" ,python2-nose)
524 ;; Test data is released as separate tarballs
526 ,(test-data-input "test-data" "3.0.18"
527 "10cvgn5gxn8ldrszj24zr1vzm5w76kqk4s7bl2zzp5yvkhh8lj1n"))
529 ,(test-data-input "test-data-visual" "3.0.18"
530 "1cb9ghy8sis0w5fkp0dvwxdqqx44rhs9a9w8g9r9i7md1c40r80i")))))
532 `(#:python ,python-2 ; Python 3 support is incomplete, and the build fails
534 (modify-phases %standard-phases
535 ;; Unpack test data into the source tree
536 (add-after 'unpack 'unpack-submodules
537 (lambda* (#:key inputs #:allow-other-keys)
538 (let ((unpack (lambda (source target)
539 (with-directory-excursion target
540 (invoke "tar" "xvf" (assoc-ref inputs source)
541 "--strip-components=1")))))
542 (unpack "test-data" "test/data")
543 (unpack "test-data-visual" "test/data-visual"))))
544 ;; Skip failing tests
545 (add-after 'unpack 'skip-tests
547 (let ((skipped-tests (list "test_vrt_referring_to_missing_files"
548 "test_unicode_regex_replace"
549 "test_proj_antimeridian_bbox"
550 "test_render_with_scale_factor")))
551 (substitute* "setup.cfg"
552 (("\\[nosetests\\]" all)
553 (string-append all "\nexclude=^("
554 (string-join skipped-tests "|") ")$")))))))))
555 (home-page "https://github.com/mapnik/python-mapnik")
556 (synopsis "Python bindings for Mapnik")
557 (description "This package provides Python bindings for Mapnik.")
558 (license license:lgpl2.1+)))
560 (define-public spatialite-gui
562 (name "spatialite-gui")
567 (uri (string-append "https://www.gaia-gis.it/gaia-sins/spatialite_gui-"
571 "1r05dz9pyc8vsd2wbqxcsracpfbaamz470rcyp2myfpqwznv376b"))))
572 (build-system gnu-build-system)
574 `(("pkg-config" ,pkg-config)))
578 ("libgaiagraphics" ,libgaiagraphics)
579 ("libjpeg-turbo" ,libjpeg-turbo)
580 ("libspatialite" ,libspatialite)
584 ("wxwidgets" ,wxwidgets-2)
587 `(#:phases (modify-phases %standard-phases
588 (add-after 'unpack 'fix-gui
590 ;; Fix for the GUI not showing up.
591 (substitute* "Main.cpp"
592 (("Hide\\(\\);") ""))
594 (synopsis "Graphical user interface for SpatiaLite")
595 (description "Spatialite-gui provides a visual interface for viewing and
596 maintaining a spatialite database. You can easily see the structure of the
597 tables and data contents using point and click functions, many of which
598 construct common SQL queries, or craft your own SQL queries.")
599 (home-page "https://www.gaia-gis.it/fossil/spatialite_gui/index")
600 (license license:gpl3+)))
609 "http://download.osgeo.org/gdal/" version "/gdal-"
613 "10symyajj1b7j98f889lqxxbmhcyvlhq9gg0l42h69bv22wx45gw"))
614 (modules '((guix build utils)))
617 ;; TODO: frmts contains a lot more bundled code.
618 (for-each delete-file-recursively
623 "frmts/jpeg/libjpeg12"
624 "frmts/gtiff/libtiff"
625 "frmts/gtiff/libgeotiff"
627 "ogr/ogrsf_frmts/geojson/libjson"))))))
628 (build-system gnu-build-system)
632 (let-syntax ((with (syntax-rules ()
634 (string-append option "="
635 (assoc-ref %build-inputs input))))))
637 ;; TODO: --with-pcidsk, --with-pcraster
638 (with "--with-freexl" "freexl")
639 (with "--with-libjson-c" "json-c")
640 (with "--with-png" "libpng")
641 (with "--with-webp" "libwebp")
642 (with "--with-gif" "giflib")
643 (with "--with-jpeg" "libjpeg-turbo")
644 (with "--with-libtiff" "libtiff")
645 (with "--with-geotiff" "libgeotiff")
646 (with "--with-libz" "zlib")
647 (with "--with-expat" "expat")
648 (with "--with-sqlite3" "sqlite")
651 (modify-phases %standard-phases
652 (add-before 'build 'fix-path
654 (substitute* "frmts/mrf/mrf_band.cpp"
655 (("\"../zlib/zlib.h\"") "<zlib.h>")))))))
662 ("libgeotiff" ,libgeotiff)
663 ("libjpeg-turbo" ,libjpeg-turbo)
672 (home-page "https://gdal.org/")
673 (synopsis "Raster and vector geospatial data format library")
674 (description "GDAL is a translator library for raster and vector geospatial
675 data formats. As a library, it presents a single raster abstract data model
676 and single vector abstract data model to the calling application for all
677 supported formats. It also comes with a variety of useful command line
678 utilities for data translation and processing.")
682 ;; frmts/gtiff/tif_float.c, frmts/pcraster/libcsf,
683 ;; ogr/ogrsf_frmts/dxf/intronurbs.cpp, frmts/pdf/pdfdataset.cpp
686 ;; frmts/hdf4/hdf-eos/*
687 ;; similar to the expat license, but without guarantee exclusion
688 (license:non-copyleft "file://frmts/hdf4/hdf-eos/README")
689 ;; frmts/grib/degrib/
690 license:public-domain ; with guarantee exclusion
692 ;; Some bsd-inspired license
693 (license:non-copyleft "file://port/LICENCE_minizip")
694 ;; alg/internal_libqhull
695 ;; Some 5-clause license
696 (license:non-copyleft "file://alg/internal_libqhull/COPYING.txt")
700 (define-public python-gdal
701 (package (inherit gdal)
703 (build-system python-build-system)
705 '(#:tests? #f ; no tests
707 (modify-phases %standard-phases
708 (add-before 'build 'chdir
710 (chdir "swig/python")
714 `(("python-numpy" ,python-numpy)))
717 (synopsis "GDAL (Geospatial Data Abstraction Library) python bindings")))
719 (define-public postgis
725 (uri (string-append "https://download.osgeo.org/postgis/source/postgis-"
729 "15557fbk0xkngihwhqsbdyz2ng49blisf5zydw81j0gabk6x4vy0"))))
730 (build-system gnu-build-system)
734 (list (string-append "datadir=" (assoc-ref %outputs "out") "/share")
735 (string-append "docdir="(assoc-ref %outputs "out") "/share/doc")
736 (string-append "pkglibdir="(assoc-ref %outputs "out") "/lib")
737 (string-append "bindir=" (assoc-ref %outputs "out") "/bin"))
739 (modify-phases %standard-phases
740 (add-before 'build 'fix-install-path
741 (lambda* (#:key outputs #:allow-other-keys)
742 (substitute* '("raster/loader/Makefile" "raster/scripts/python/Makefile")
743 (("\\$\\(DESTDIR\\)\\$\\(PGSQL_BINDIR\\)")
744 (string-append (assoc-ref outputs "out") "/bin"))))))))
750 ("libjpeg" ,libjpeg-turbo)
753 ("postgresql" ,postgresql)
757 ("pkg-config" ,pkg-config)))
758 (home-page "https://postgis.net")
759 (synopsis "Spatial database extender for PostgreSQL")
760 (description "PostGIS is a spatial database extender for PostgreSQL
761 object-relational database. It adds support for geographic objects allowing
762 location queries to be run in SQL. This package provides a PostgreSQL
767 ;; loader/dbfopen, safileio.*, shapefil.h, shpopen.c
770 license:public-domain
772 license:bsd-3 ; files only say "BSD"
774 license:cc-by-sa3.0))))
776 (define-public tegola
783 "https://github.com/go-spatial/tegola/archive/v"
785 (file-name (string-append name "-" version ".tar.gz"))
788 "09vnzxfn0r70kmd776kcdfqxhzdj11syxa0b27z4ci1k367v7viw"))))
789 (build-system go-build-system)
791 `(#:import-path "github.com/go-spatial/tegola/cmd/tegola"
792 #:unpack-path "github.com/go-spatial/tegola"
794 (modify-phases %standard-phases
795 (add-before 'build 'set-version
797 (with-directory-excursion "src/github.com/go-spatial/tegola"
798 (substitute* '("cmd/tegola/cmd/root.go"
799 "cmd/tegola_lambda/main.go")
800 (("version not set") ,version)))
802 (home-page "https://tegola.io")
803 (synopsis "Vector tile server for maps")
804 (description "Tegola is a free vector tile server written in Go. Tegola
805 takes geospatial data and slices it into vector tiles that can be efficiently
806 delivered to any client.")
809 ;; Some packages in vendor have other licenses
815 (define-public imposm3
818 (version "0.6.0-alpha.4")
822 (uri (string-append "https://github.com/omniscale/imposm3/archive/v"
824 (file-name (string-append name "-" version ".tar.gz"))
827 "06f0kwmv52yd5m9jlckqxqmkf0cnqy3hamakrvg9lspplyqrds80"))))
828 (build-system go-build-system)
830 `(#:import-path "github.com/omniscale/imposm3/cmd/imposm"
831 #:unpack-path "github.com/omniscale/imposm3"
833 (modify-phases %standard-phases
834 (add-before 'build 'set-version
836 (substitute* "src/github.com/omniscale/imposm3/version.go"
837 (("0.0.0-dev") ,version))
841 ("leveldb" ,leveldb)))
842 (home-page "https://imposm.org/")
843 (synopsis "OpenStreetMap importer for PostGIS")
844 (description "Imposm is an importer for OpenStreetMap data. It reads PBF
845 files and imports the data into PostgreSQL/PostGIS databases. It is designed
846 to create databases that are optimized for rendering/tile/map-services.")
849 ;; Some dependencies in vendor have different licenses
854 (define-public libosmium
862 (url "https://github.com/osmcode/libosmium.git")
863 (commit (string-append "v" version))))
864 (file-name (git-file-name name version))
866 (base32 "0mlcvqrhp40bzj5r5j9nfc5vbis8hmzcq9xi8jylkciyydaynhz4"))))
867 (build-system cmake-build-system)
875 ("protozero" ,protozero)
876 ("sparsehash" ,sparsehash)
880 `(("doxygen" ,doxygen)))
881 (home-page "https://osmcode.org/libosmium/")
882 (synopsis "C++ library for working with OpenStreetMap data")
883 (description "Libosmium is a fast and flexible C++ library for working with
884 OpenStreetMap data.")
885 (license license:boost1.0)))
887 (define-public osm2pgsql
895 (url "https://github.com/openstreetmap/osm2pgsql.git")
897 (file-name (git-file-name name version))
899 (base32 "1ysan01lpqzjxlq3y2kdminfjs5d9zksicpf9vvzpdk3fzq51fc9"))
900 (modules '((guix build utils)))
903 (delete-file-recursively "contrib/protozero")
904 (delete-file-recursively "contrib/libosmium")
906 (build-system cmake-build-system)
908 `(#:tests? #f; tests fail because we need to setup a database
910 (list (string-append "-DOSMIUM_INCLUDE_DIR="
911 (assoc-ref %build-inputs "libosmium")
913 (string-append "-DPROTOZERO_INCLUDE_DIR="
914 (assoc-ref %build-inputs "protozero")
920 ("libosmium" ,libosmium)
922 ("postgresql" ,postgresql)
924 ("protozero" ,protozero)
928 ("python-psycopg2" ,python-psycopg2)))
929 (home-page "https://github.com/openstreetmap/osm2pgsql")
930 (synopsis "OSM data importer to postgresql")
931 (description "Osm2pgsql is a tool for loading OpenStreetMap data into a
932 PostgreSQL / PostGIS database suitable for applications like rendering into a
933 map, geocoding with Nominatim, or general analysis.")
934 (license license:gpl2+)))
936 (define-public tippecanoe
944 (url "https://github.com/mapbox/tippecanoe.git")
946 (file-name (git-file-name name version))
948 (base32 "1m0x931a945sr7axyhcvpwh798m58hx1zxh6ikgf9gsgqhdhmszz"))))
949 (build-system gnu-build-system)
952 (modify-phases %standard-phases (delete 'configure))
956 (string-append "PREFIX=" (assoc-ref %outputs "out")))))
961 (home-page "https://github.com/mapbox/tippecanoe")
962 (synopsis "Vector tile server for maps")
963 (description "Tippecanoe creates scale-independent view of data, so that
964 the texture and density of features is visible at every zoom level, instead of
965 dropping features at lower levels.")
966 (license license:bsd-2)))
968 (define-public osmctools
976 (url "https://gitlab.com/osm-c-tools/osmctools")
978 (file-name (git-file-name name version))
981 "1m8d3r1q1v05pkr8k9czrmb4xjszw6hvgsf3kn9pf0v14gpn4r8f"))))
982 (build-system gnu-build-system)
984 `(("autoconf" ,autoconf)
985 ("automake" ,automake)))
988 (home-page "https://gitlab.com/osm-c-tools/osmctools")
989 (synopsis "Tools to convert, filter and update OpenStreetMap data files")
990 (description "This project contains a few tools which are used in the
991 OpenStreetMap project. They can be used to convert, filter and update
992 OpenStreetMap data files.")
993 (license license:agpl3)))
995 (define-public osm-gps-map
1003 "https://github.com/nzjrs/osm-gps-map/releases/download/"
1004 version "/osm-gps-map-" version ".tar.gz"))
1007 "11imsf4cz1dpxdjh178k2s29axmq86rkfg1pqmn7incyxmjzhbwg"))))
1008 (build-system gnu-build-system)
1010 `(("gnome-common" ,gnome-common)
1011 ("gtk-doc" ,gtk-doc)
1012 ("pkg-config" ,pkg-config)))
1016 ("gobject-introspection" ,gobject-introspection)
1018 ("libsoup" ,libsoup)))
1019 (home-page "https://nzjrs.github.io/osm-gps-map/")
1020 (synopsis "GTK+ widget for displaying OpenStreetMap tiles")
1022 "This package provides a GTK+ widget (and Python bindings) that when
1023 given GPS coordinates,draws a GPS track, and points of interest on a moving
1024 map display. Downloads map data from a number of websites, including
1025 @url{https://www.openstreetmap.org}.")
1026 (license license:gpl2+)))
1028 (define-public xygrib
1035 (url "https://github.com/opengribs/XyGrib.git")
1036 (commit (string-append "v" version))))
1037 (file-name (git-file-name name version))
1040 "0xzsm8pr0zjk3f8j880fg5n82jyxn8xf1330qmmq1fqv7rsrg9ia"))
1041 (modules '((guix build utils)))
1043 '(begin (delete-file-recursively "data/fonts") #t))))
1044 (build-system cmake-build-system)
1047 (modify-phases %standard-phases
1048 (add-after 'unpack 'patch-directories
1049 (lambda* (#:key inputs #:allow-other-keys)
1050 (let ((jpeg (assoc-ref inputs "openjpeg"))
1051 (font (assoc-ref inputs "font-liberation")))
1052 (substitute* "CMakeLists.txt"
1055 ;; Fix install locations.
1056 (("set\\(PREFIX_BIN.*") "set(PREFIX_BIN \"bin\")\n")
1057 (("set\\(PREFIX_PKGDATA.*") "set(PREFIX_PKGDATA \"share/${PROJECT_NAME}\")\n")
1058 ;; Skip looking for the static library.
1059 (("\"libnova.a\"") ""))
1060 ;; Don't use the bundled font-liberation.
1061 (substitute* "src/util/Font.cpp"
1062 (("Util::pathFonts\\(\\)\\+\"liberation-fonts/\"")
1063 (string-append "\"" font "/share/fonts/truetype/\"")))
1064 (substitute* "src/util/Util.h"
1065 (("pathData\\(\\)\\+\"data/fonts/\"")
1066 (string-append "\"" font "/share/fonts/\""))))
1068 #:tests? #f)) ; no tests
1070 `(("qttools" ,qttools)))
1073 ("font-liberation" ,font-liberation)
1074 ("libnova" ,libnova)
1076 ("openjpeg" ,openjpeg)
1080 (synopsis "Weather Forecast Visualization")
1082 "XyGrib is a Grib file reader and visualizes meteorological data providing
1083 an off-line capability to analyse weather forecasts or hindcasts. It is
1084 intended to be used as a capable weather work station for anyone with a serious
1085 interest in examining weather. This would include members of the sailing
1086 community, private and sport aviators, farmers, weather buffs and many more.
1087 XyGrib is the continuation of the zyGrib software package with a new team of
1089 (home-page "https://opengribs.org")
1090 (license license:gpl3+)))
1092 (define-public libspatialindex
1094 (name "libspatialindex")
1099 (uri (string-append "https://github.com/libspatialindex/libspatialindex/"
1100 "releases/download/" version "/spatialindex-src-"
1101 version ".tar.bz2"))
1104 "02n5vjcyk04w0djidyp21hfbxfpbbara8ifd9nml6158rwqr8lja"))))
1105 (build-system cmake-build-system)
1106 (home-page "https://libspatialindex.org")
1107 (synopsis "Spatial indexing library")
1108 (description "The purpose of this library is to provide:
1111 @item An extensible framework that will support robust spatial indexing
1113 @item Support for sophisticated spatial queries. Range, point location,
1114 nearest neighbor and k-nearest neighbor as well as parametric queries (defined
1115 by spatial constraints) should be easy to deploy and run.
1116 @item Easy to use interfaces for inserting, deleting and updating information.
1117 @item Wide variety of customization capabilities. Basic index and storage
1118 characteristics like the page size, node capacity, minimum fan-out, splitting
1119 algorithm, etc. should be easy to customize.
1120 @item Index persistence. Internal memory and external memory structures
1121 should be supported. Clustered and non-clustered indices should be easy to be
1125 (license license:expat)))
1127 (define-public java-jmapviewer
1129 (name "java-jmapviewer")
1133 (uri (string-append "https://svn.openstreetmap.org/applications/"
1134 "viewer/jmapviewer/releases/" version
1135 "/JMapViewer-" version "-Source.zip"))
1138 "0sy6r5fkbb9bclw0is6gwnbzz627m7pjfnsqydxz58pbndakkhrv"))))
1139 (build-system ant-build-system)
1141 `(("unzip" ,unzip)))
1143 `(#:build-target "pack"
1144 #:tests? #f; No tests
1146 (modify-phases %standard-phases
1147 (add-before 'build 'clean
1149 (invoke "ant" "clean")))
1151 (lambda* (#:key outputs #:allow-other-keys)
1152 (let ((dir (string-append (assoc-ref outputs "out") "/share/java/")))
1154 (copy-file "JMapViewer.jar" (string-append dir "JMapViewer.jar"))
1156 (home-page "https://wiki.openstreetmap.org/wiki/JMapViewer")
1157 (synopsis "OSM map integration in Java")
1158 (description "JMapViewer is a Java component which easily
1159 integrates an OSM map view into your Java application. It is maintained as
1160 an independent project by the JOSM team.")
1161 (license license:gpl2)))
1170 (url "https://josm.openstreetmap.de/svn/trunk")
1171 (revision (string->number version))
1175 "00b8sw0wgkcf7xknmdpn5s521ax8x2660figidcrry37sgq3x946"))
1176 (file-name (string-append name "-" version "-checkout"))
1177 (modules '((guix build utils)))
1180 (for-each delete-file (find-files "." ".*.jar$"))
1182 (build-system ant-build-system)
1184 `(("javacc" ,javacc)))
1186 `(("java-commons-jcs" ,java-commons-jcs)
1187 ("java-commons-compress" ,java-commons-compress)
1188 ("java-jmapviewer" ,java-jmapviewer)
1189 ("java-jsonp-api" ,java-jsonp-api)
1190 ("java-jsonp-impl" ,java-jsonp-impl); runtime dependency
1191 ("java-metadata-extractor" ,java-metadata-extractor)
1192 ("java-openjfx-media" ,java-openjfx-media)
1193 ("java-signpost-core" ,java-signpost-core)
1194 ("java-svg-salamander" ,java-svg-salamander)))
1197 #:jar-name "josm.jar"
1199 (modify-phases %standard-phases
1200 (add-after 'unpack 'rm-build.xml
1202 (delete-file "build.xml")
1204 (add-before 'build 'fix-revision
1206 (with-output-to-file "REVISION.XML"
1209 (string-append "<info><entry><commit revision=\"" ,version "\">"
1210 "<date>1970-01-01 00:00:00 +0000</date>"
1211 "</commit></entry></info>"))))
1213 (add-before 'build 'fix-classpath
1214 (lambda* (#:key inputs #:allow-other-keys)
1219 (let ((source (assoc-ref inputs "source")))
1220 (not (equal? (substring s 0 (string-length source)) source))))
1221 (string-split (getenv "CLASSPATH") #\:))
1224 (add-before 'build 'generate-parser
1226 (let* ((dir "src/org/openstreetmap/josm/gui/mappaint/mapcss")
1227 (out (string-append dir "/parsergen"))
1228 (file (string-append dir "/MapCSSParser.jj")))
1229 (mkdir-p "src/org/openstreetmap/josm/gui/mappaint/mapcss/parsergen")
1230 (invoke "javacc" "-DEBUG_PARSER=false"
1231 "-DEBUG_TOKEN_MANAGER=false" "-JDK_VERSION=1.8"
1232 "-GRAMMAR_ENCODING=UTF-8"
1233 (string-append "-OUTPUT_DIRECTORY=" out)
1236 (add-after 'build 'generate-epsg
1238 (system* "javac" "scripts/BuildProjectionDefinitions.java"
1239 "-cp" "build/classes")
1240 (mkdir-p "data/projection")
1241 (with-output-to-file "data/projection/custom-epsg"
1242 (lambda _ (display "")))
1243 (invoke "java" "-cp" "build/classes:scripts:."
1244 "BuildProjectionDefinitions" ".")
1246 (add-after 'generate-epsg 'copy-data
1248 (mkdir-p "build/classes")
1249 (rename-file "data" "build/classes/data")
1251 (add-before 'install 'regenerate-jar
1253 ;; We need to regenerate the jar file to add data.
1254 (delete-file "build/jar/josm.jar")
1255 (invoke "jar" "-cf" "build/jar/josm.jar" "-C"
1256 "build/classes" ".")
1258 (add-before 'build 'copy-styles
1260 (mkdir-p "build/classes")
1261 (rename-file "styles" "build/classes/styles")
1263 (add-before 'build 'copy-images
1265 (mkdir-p "build/classes")
1266 (rename-file "images" "build/classes/images")
1268 (add-before 'build 'copy-revision
1270 (mkdir-p "build/classes")
1271 (with-output-to-file "build/classes/REVISION"
1274 (string-append "Revision: " ,version "\n"
1275 "Is-Local-Build: true\n"
1276 "Build-Date: 1970-01-01 00:00:00 +0000\n"))))
1278 (add-after 'install 'install-bin
1279 (lambda* (#:key outputs inputs #:allow-other-keys)
1280 (let* ((out (assoc-ref outputs "out"))
1281 (bin (string-append out "/bin")))
1283 (with-output-to-file (string-append bin "/josm")
1286 (string-append "#!/bin/sh\n"
1287 (assoc-ref inputs "jdk") "/bin/java"
1288 " -cp " out "/share/java/josm.jar:"
1289 (getenv "CLASSPATH")
1290 " org.openstreetmap.josm.gui.MainApplication"))))
1291 (chmod (string-append bin "/josm") #o755))
1293 (home-page "https://josm.openstreetmap.de")
1294 (synopsis "OSM editor")
1295 (description "JOSM is an extensible editor for OpenStreetMap (OSM). It
1296 supports loading GPX tracks, background imagery and OSM data from local
1297 sources as well as from online sources and allows editing the OSM data (nodes,
1298 ways, and relations) and their metadata tags.")
1299 (license license:gpl2+)))
1301 (define-public libmaxminddb
1303 (name "libmaxminddb")
1308 (uri (string-append "https://github.com/maxmind/libmaxminddb"
1309 "/releases/download/" version "/"
1310 "/libmaxminddb-" version ".tar.gz"))
1312 (base32 "0mnimbaxnnarlw7g1rh8lpxsyf7xnmzwcczcc3lxw8xyf6ljln6x"))))
1313 (build-system gnu-build-system)
1316 (modify-phases %standard-phases
1317 (add-before 'configure 'set-cc-to-gcc
1319 (setenv "CC" "gcc"))))))
1322 (home-page "https://maxmind.github.io/libmaxminddb/")
1323 (synopsis "C library for the MaxMind DB file format")
1324 (description "The libmaxminddb library provides a C library for reading
1325 MaxMind DB files, including the GeoIP2 databases from MaxMind. The MaxMind DB
1326 format is a custom, but open, binary format designed to facilitate fast
1327 lookups of IP addresses while allowing flexibility in the type of data
1328 associated with an address.")
1329 (license license:asl2.0)))
1331 (define-public python-maxminddb
1333 (name "python-maxminddb")
1338 (uri (pypi-uri "maxminddb" version))
1341 "0y9giw81k4wdmpryr4k42w50z292mf364a6vs1vxf83ksc9ig6j4"))))
1342 (build-system python-build-system)
1344 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1346 `(("libmaxminddb" ,libmaxminddb)))
1347 (home-page "https://www.maxmind.com/")
1348 (synopsis "Reader for the MaxMind DB format")
1349 (description "MaxMind DB is a binary file format that stores data indexed
1350 by IP address subnets (IPv4 or IPv6). This is a Python module for reading
1352 (license license:asl2.0)))
1354 (define-public python-geoip2
1356 (name "python-geoip2")
1361 (uri (pypi-uri "geoip2" version))
1364 "1w7cay5q6zawjzivqbwz5cqx1qbdjw6kbriccb7l46p7b39fkzzp"))))
1365 (build-system python-build-system)
1367 `(#:tests? #f)) ;; Tests require a copy of the maxmind database
1369 `(("python-maxminddb" ,python-maxminddb)
1370 ("python-requests" ,python-requests)))
1371 (home-page "https://www.maxmind.com/")
1372 (synopsis "MaxMind GeoIP2 API")
1373 (description "Provides an API for the GeoIP2 web services and databases.
1374 The API also works with MaxMind’s free GeoLite2 databases.")
1375 (license license:asl2.0)))
1377 (define-public routino
1384 (uri (string-append "http://www.routino.org/download/routino-"
1388 "1ccx3s99j8syxc1gqkzsaqkmyf44l7h3adildnc5iq2md7bp8wab"))))
1389 (build-system gnu-build-system)
1397 `(#:test-target "test"
1399 (modify-phases %standard-phases
1401 (lambda* (#:key outputs #:allow-other-keys)
1402 (substitute* "Makefile.conf"
1403 (("prefix=/usr/local")
1404 (string-append "prefix=" (assoc-ref outputs "out")))
1405 (("LDFLAGS_LDSO=-Wl,-R\\.")
1406 "LDFLAGS_LDSO=-Wl,-R$(libdir)")
1407 (("#CFLAGS\\+=-DUSE_XZ")
1409 (("#LDFLAGS\\+=-llzma")
1412 (synopsis "Routing application for OpenStreetMap data")
1414 "Routino is an application for finding a route between two points
1415 using the dataset of topographical information collected by
1416 @url{https://www.OpenStreetMap.org}.")
1417 (home-page "https://www.routino.org/")
1418 (license license:agpl3+)))
1420 (define-public qmapshack
1428 (url "https://github.com/Maproom/qmapshack.git")
1429 (commit (string-append "V_" version))))
1430 (file-name (git-file-name name version))
1433 "07c2hrq9sn456w7l3gdr599rmjfv2k6mh159zza7p1py8r7ywksa"))))
1434 (build-system qt-build-system)
1436 `(("pkg-config" ,pkg-config)
1437 ("qttools" ,qttools)))
1440 ("libjpeg-turbo" ,libjpeg-turbo)
1443 ("qtdeclarative" ,qtdeclarative)
1444 ("qtlocation" ,qtlocation)
1445 ("qtwebchannel" ,qtwebchannel)
1446 ("qtwebengine" ,qtwebengine)
1448 ("routino" ,routino)
1449 ("sqlite" ,sqlite) ; See wrap phase
1454 (modify-phases %standard-phases
1455 (add-after 'unpack 'fix-cmake-modules
1456 (lambda* (#:key inputs #:allow-other-keys)
1457 (substitute* "CMakeLists.txt"
1458 (("find_package\\(Qt5PrintSupport REQUIRED\\)" all)
1459 (string-append all "\nfind_package(Qt5Positioning REQUIRED)")))
1460 (substitute* "cmake/Modules/FindROUTINO.cmake"
1462 (assoc-ref inputs "routino")))
1463 ;; The following fixes are included as patches in the sources
1464 ;; of QMapShack, but they are not applied by default, for
1466 (invoke "patch" "-p1" "-i" "FindPROJ4.patch")
1467 (invoke "patch" "-p1" "-i" "FindQuaZip5.patch")
1469 (add-after 'install 'wrap
1470 ;; The program fails to find the QtWebEngineProcess program,
1471 ;; so we set QTWEBENGINEPROCESS_PATH to help it.
1472 (lambda* (#:key inputs outputs #:allow-other-keys)
1473 (let ((bin (string-append (assoc-ref outputs "out") "/bin"))
1474 (qtwebengineprocess (string-append
1475 (assoc-ref inputs "qtwebengine")
1476 "/lib/qt5/libexec/QtWebEngineProcess")))
1477 (for-each (lambda (program)
1478 (wrap-program program
1479 `("QTWEBENGINEPROCESS_PATH" =
1480 (,qtwebengineprocess))))
1481 (find-files bin ".*")))
1483 (synopsis "GPS mapping application")
1485 "QMapShack can be used to plan your next outdoor trip or to visualize and
1486 archive all the GPS recordings of your past trips. It is the successor of the
1487 QLandkarte GT application.")
1488 (home-page "https://github.com/Maproom/qmapshack/wiki")
1489 (license license:gpl3+)))
1491 (define-public readosm
1498 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1499 "readosm-" version ".tar.gz"))
1501 (base32 "1v20pnda67imjd70fn0zw30aar525xicy3d3v49md5cvqklws265"))))
1502 (build-system gnu-build-system)
1506 (synopsis "Data extractor for OpenStreetMap files")
1508 "ReadOSM is a library to extract valid data from within an OpenStreetMap
1509 input file (in @code{.osm} or @code{.osm.pbf} format).")
1510 (home-page "https://www.gaia-gis.it/fossil/readosm/index")
1511 (license (list license:gpl2+
1515 (define-public spatialite-tools
1517 (name "spatialite-tools")
1522 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1523 "spatialite-tools-" version ".tar.gz"))
1525 (base32 "12fggjhi8cgwvw8f6nk76f83b8lqkc07abxyj5ap6f2gq2dqafgp"))))
1526 (build-system gnu-build-system)
1528 `(("pkg-config" ,pkg-config)))
1533 ("libspatialite" ,libspatialite)
1534 ("libxml2" ,libxml2)
1536 ("readosm" ,readosm)
1539 (synopsis "Collection of command line tools for SpatiaLite")
1541 "@code{spatialite-tools} is a collection of Command Line Interface (CLI)
1542 tools supporting SpatiaLite.")
1543 (home-page "https://www.gaia-gis.it/fossil/spatialite-tools/index")
1544 (license license:gpl3+)))
1546 (define-public virtualpg
1553 (uri (string-append "https://www.gaia-gis.it/gaia-sins/"
1554 "virtualpg-" version ".tar.gz"))
1556 (base32 "0kjipcd08vvn188xmwbs7sw41xcs06x47n2hbqshpjcr51mxbarp"))))
1557 (build-system gnu-build-system)
1559 `(("postgresql" ,postgresql)
1560 ("sqlite" ,sqlite)))
1561 (synopsis "Allow SQLite/SpatiaLite to access PostgreSQL/PostGIS tables")
1563 "VirtualPG is a dynamic extension for the SQLite DBMS. It implements
1564 the VirtualPostgres driver, allowing to directly exchange data between SQLite
1565 and PostgreSQL; if SpatiaLite is available even PostGIS geometries can be
1566 exchanged form one Spatial DBMS and the other.")
1567 (home-page "https://www.gaia-gis.it/fossil/virtualpg/index")
1568 (license (list license:gpl2+
1572 (define-public opencpn
1580 (url "https://github.com/OpenCPN/OpenCPN.git")
1581 (commit (string-append "v" version))))
1582 (file-name (git-file-name name version))
1584 (base32 "1xv3h6svw9aay5ixpql231md3pf00qxvhg62z88daraf18hlkfja"))))
1585 (build-system cmake-build-system)
1587 `(("gettext" ,gettext-minimal)
1588 ("pkg-config" ,pkg-config)))
1595 ("libarchive" ,libarchive)
1597 ("libexif" ,libexif)
1598 ("libsndfile" ,libsndfile)
1602 ("portaudio" ,portaudio)
1604 ("tinyxml" ,tinyxml)
1606 ("wxwidgets" ,wxwidgets)
1610 `(#:configure-flags '("-DENABLE_PORTAUDIO=ON"
1611 "-DENABLE_SNDFILE=ON"
1612 "-DBUNDLE_TCDATA=ON"
1613 "-DBUNDLE_GSHHS=CRUDE")
1614 #:tests? #f ; No tests defined
1616 (modify-phases %standard-phases
1617 (add-after 'unpack 'fix-build
1619 (substitute* "CMakeLists.txt"
1620 (("set\\(wxWidgets_CONFIG_OPTIONS.*--toolkit=gtk3" all)
1621 (string-append all " --libs all")))
1623 (synopsis "Chart plotter and marine GPS navigation software")
1625 "OpenCPN is a chart plotter and marine navigation software designed to be
1626 used at the helm station of your boat while underway. Chart a course and
1627 track your position right from your laptop.")
1628 (home-page "https://opencpn.org/")
1629 (license (list license:asl2.0
1640 (define-public grass
1641 (let* ((version "7.8.2")
1642 (majorminor (string-join (list-head (string-split version #\.) 2) ""))
1643 (grassxx (string-append "grass" majorminor)))
1650 (uri (string-append "https://grass.osgeo.org/" grassxx
1651 "/source/grass-" version ".tar.gz"))
1653 (base32 "1fwsm99kz0bxvjk7442qq1h45ikrmhba8bqclafb61gqg1q6ymrk"))))
1654 (build-system gnu-build-system)
1659 ("freetype" ,freetype)
1665 ("libtiff" ,libtiff)
1667 ("mariadb-dev" ,mariadb "dev")
1668 ("mariadb-lib" ,mariadb "lib")
1670 ("openblas" ,openblas)
1672 ("postgresql" ,postgresql)
1675 ("python-dateutil" ,python-dateutil)
1676 ("python-numpy" ,python-numpy)
1677 ("python-wxpython" ,python-wxpython)
1678 ("readline" ,readline)
1680 ("wxwidgets" ,wxwidgets)
1682 ("zstd" ,zstd "lib")))
1684 `(("bash" ,bash-minimal)
1687 ("pkg-config" ,pkg-config)))
1689 `(#:tests? #f ; No tests
1690 #:modules ((guix build gnu-build-system)
1691 ((guix build python-build-system) #:prefix python:)
1693 #:imported-modules (,@%gnu-build-system-modules
1694 (guix build python-build-system))
1696 (modify-phases %standard-phases
1698 (lambda* (#:key inputs outputs #:allow-other-keys)
1699 (let ((shell (string-append (assoc-ref inputs "bash")
1701 (setenv "SHELL" shell)
1702 (setenv "CONFIG_SHELL" shell)
1703 (setenv "LDFLAGS" (string-append "-Wl,-rpath -Wl,"
1704 (assoc-ref outputs "out")
1705 "/" ,grassxx "/lib")))
1706 (invoke "./configure"
1707 (string-append "--prefix="
1708 (assoc-ref outputs "out"))
1711 (string-append "--with-freetype-includes="
1712 (assoc-ref inputs "freetype")
1713 "/include/freetype2")
1714 (string-append "--with-freetype-libs="
1715 (assoc-ref inputs "freetype")
1720 (string-append "--with-mysql-includes="
1721 (assoc-ref inputs "mariadb-dev")
1723 (string-append "--with-mysql-libs="
1724 (assoc-ref inputs "mariadb-lib")
1728 (string-append "--with-proj-share="
1729 (assoc-ref inputs "proj.4")
1734 "--with-wxwidgets")))
1735 (add-after 'install 'install-links
1736 (lambda* (#:key outputs #:allow-other-keys)
1737 ;; Put links for includes and libraries in the standard places.
1738 (let* ((out (assoc-ref outputs "out"))
1739 (dir (string-append out "/" ,grassxx)))
1740 (symlink (string-append dir "/include")
1741 (string-append out "/include"))
1742 (symlink (string-append dir "/lib")
1743 (string-append out "/lib")))
1745 (add-after 'install-links 'wrap-python
1746 (assoc-ref python:%standard-phases 'wrap)))))
1747 (synopsis "GRASS Geographic Information System")
1749 "GRASS (Geographic Resources Analysis Support System), is a Geographic
1750 Information System (GIS) software suite used for geospatial data management and
1751 analysis, image processing, graphics and maps production, spatial modeling, and
1753 (home-page "https://grass.osgeo.org/")
1754 (license license:gpl2+))))
1763 (uri (string-append "mirror://sourceforge/saga-gis/SAGA%20-%20"
1764 (version-major version) "/SAGA%20-%20" version
1765 "/saga-" version ".tar.gz"))
1767 (base32 "09j5magmayq2y620kqa490mfd1kpdp3lng2ifcgbrmssc079ybm0"))))
1768 (build-system gnu-build-system)
1770 `(("pkg-config" ,pkg-config)
1778 ("libharu" ,libharu)
1779 ("libtiff" ,libtiff)
1781 ("postgresql" ,postgresql)
1785 ("unixodbc" ,unixodbc)
1787 ("wxwidgets" ,wxwidgets)))
1789 '(#:configure-flags '("--enable-python")))
1790 (synopsis "System for Automated Geoscientific Analyses")
1792 "SAGA (System for Automated Geoscientific Analyses) is a Geographic
1793 Information System (GIS) software. It has been designed for an easy and
1794 effective implementation of spatial algorithms and it offers a comprehensive,
1795 growing set of geoscientific methods.")
1796 (home-page "http://www.saga-gis.org")
1797 (license (list license:gpl2+ license:lgpl2.1+))))
1806 (uri (string-append "https://qgis.org/downloads/qgis-"
1807 version ".tar.bz2"))
1809 (base32 "1a41525y8ac44gzcfaffjx0lyrm49hgnr83jrq40r5mqd3vpmp57"))))
1810 (build-system cmake-build-system)
1812 `(#:modules ((guix build cmake-build-system)
1813 ((guix build python-build-system) #:prefix python:)
1814 (guix build qt-utils)
1816 #:imported-modules (,@%cmake-build-system-modules
1817 (guix build python-build-system)
1818 (guix build qt-utils))
1820 (modify-phases %standard-phases
1821 ;; Configure correct path to PyQt5 SIP directory
1822 (add-after 'unpack 'configure-pyqt5-sip-path
1823 (lambda* (#:key inputs #:allow-other-keys)
1824 (substitute* "cmake/FindPyQt5.cmake"
1825 (("\"\\\\\\\\1\" PYQT5_SIP_DIR")
1826 (string-append "\"" (assoc-ref inputs "python-pyqt+qscintilla")
1827 "/share/sip\" PYQT5_SIP_DIR")))
1828 (substitute* (list "scripts/prepare-commit.sh"
1829 "scripts/runtests-local-travis-config.sh"
1830 "scripts/sip_include.sh"
1832 "scripts/sipify_all.sh"
1833 "scripts/spell_check/check_spelling.sh"
1834 "scripts/spell_check/spell_test.sh"
1835 "scripts/verify-indentation.sh"
1836 "tests/code_layout/test_banned_keywords.sh"
1837 "tests/code_layout/test_licenses.sh"
1838 "tests/code_layout/test_shellcheck.sh"
1839 "tests/code_layout/test_sip_include.sh"
1840 "tests/code_layout/test_sipfiles_uptodate.sh"
1841 "tests/code_layout/test_sipify.sh")
1842 (("\\$\\(git rev-parse --show-toplevel\\)")
1844 (substitute* "tests/code_layout/test_sip_include.sh"
1845 (("^REV=.*") "REV=currentrev\n"))
1848 (lambda* (#:key inputs #:allow-other-keys)
1849 (setenv "HOME" "/tmp")
1850 (system (string-append (assoc-ref inputs "xorg-server")
1852 (setenv "DISPLAY" ":1")
1853 (setenv "TRAVIS" "true")
1854 (setenv "CTEST_OUTPUT_ON_FAILURE" "1")
1857 '(;; Disable tests that require network access
1858 "qgis_filedownloader"
1859 ;; TODO: Find why the following tests fail
1860 "ProcessingQgisAlgorithmsTestPt1"
1861 "ProcessingQgisAlgorithmsTestPt3"
1862 "ProcessingQgisAlgorithmsTestPt4"
1863 "ProcessingGdalAlgorithmsRasterTest"
1864 "ProcessingGdalAlgorithmsVectorTest"
1865 "ProcessingGrass7AlgorithmsImageryTest"
1866 "ProcessingGrass7AlgorithmsRasterTest"
1867 "ProcessingGrass7AlgorithmsVectorTest"
1868 "ProcessingOtbAlgorithmsTest"
1869 "qgis_authmanagertest"
1870 "qgis_compositionconvertertest"
1871 "qgis_coordinatereferencesystemtest"
1873 "qgis_layouthtmltest"
1874 "qgis_layoutmaptest"
1875 "qgis_painteffecttest"
1876 "qgis_pallabelingtest"
1877 "qgis_svgmarkertest"
1878 "qgis_taskmanagertest"
1880 "qgis_processingtest"
1881 "qgis_wcsprovidertest"
1882 "qgis_arcgisrestutilstest"
1883 "qgis_grassprovidertest7"
1884 "qgis_gpsinformationwidget"
1886 "PyQgsPythonProvider"
1888 "PyQgsAuthenticationSystem"
1893 "PyQgsLayoutExporter"
1896 "PyQgsOGRProviderGpkg"
1897 "PyQgsPalLabelingLayout"
1898 "PyQgsImportIntoPostGIS"
1899 "PyQgsProviderConnectionPostgres"
1900 "PyQgsProviderConnectionGpkg"
1901 "PyQgsShapefileProvider"
1905 "PyQgsSpatialiteProvider"
1906 "PyQgsVectorFileWriter"
1908 "PyQgsVectorLayerUtils"
1909 "PyQgsVirtualLayerProvider"
1911 "PyQgsOapifProvider"
1912 "PyQgsLayerDependencies"
1913 "PyQgsDBManagerGpkg"
1914 "PyQgsDBManagerSpatialite"
1916 "PyQgsAuxiliaryStorage"
1917 "PyQgsSelectiveMasking"
1919 "qgis_geometrycheckstest"
1923 "qgis_sip_uptodate")
1925 (add-after 'install 'wrap-python
1926 (assoc-ref python:%standard-phases 'wrap))
1927 (add-after 'wrap-python 'wrap-qt
1928 (lambda* (#:key outputs #:allow-other-keys)
1929 (wrap-qt-program (assoc-ref outputs "out") "qgis")
1931 (add-after 'wrap-qt 'wrap-gis
1932 (lambda* (#:key inputs outputs #:allow-other-keys)
1933 (let* ((out (assoc-ref outputs "out"))
1934 (saga (string-append (assoc-ref inputs "saga") "/bin"))
1935 (grass-version ,(package-version grass))
1936 (grass-majorminor (string-join
1938 (string-split grass-version #\.) 2)
1940 (grass (string-append (assoc-ref inputs "grass")
1941 "/grass" grass-majorminor)))
1942 (wrap-program (string-append out "/bin/qgis")
1943 `("PATH" ":" prefix (,saga))
1944 `("QGIS_PREFIX_PATH" = (,out))
1945 `("GISBASE" = (,grass))))
1952 ("gpsbabel" ,gpsbabel)
1956 ("libspatialindex" ,libspatialindex)
1957 ("libspatialite" ,libspatialite)
1958 ("libxml2" ,libxml2)
1961 ("postgresql" ,postgresql)
1964 ("python-chardet" ,python-chardet)
1965 ("python-dateutil" ,python-dateutil)
1966 ("python-gdal" ,python-gdal)
1967 ("python-jinja2" ,python-jinja2)
1968 ("python-numpy" ,python-numpy)
1969 ("python-owslib" ,python-owslib)
1970 ("python-psycopg2" ,python-psycopg2)
1971 ("python-pygments" ,python-pygments)
1972 ("python-pyqt+qscintilla" ,python-pyqt+qscintilla)
1973 ("python-pytz" ,python-pytz)
1974 ("python-pyyaml" ,python-pyyaml)
1975 ("python-requests" ,python-requests)
1976 ("python-sip" ,python-sip)
1977 ("python-six" ,python-six)
1978 ("python-urllib3" ,python-urllib3)
1980 ("qscintilla" ,qscintilla)
1982 ("qtdeclarative" ,qtdeclarative)
1983 ("qtkeychain" ,qtkeychain)
1984 ("qtlocation" ,qtlocation)
1985 ("qtserialport" ,qtserialport)
1987 ("qtwebkit" ,qtwebkit)
1990 ("sqlite" ,sqlite)))
1995 ("perl-yaml-tiny" ,perl-yaml-tiny)
1996 ("pkg-config" ,pkg-config)
1997 ("python-mock" ,python-mock)
1998 ("python-nose2" ,python-nose2)
1999 ("qttools" ,qttools)
2000 ("shellcheck" ,shellcheck)
2001 ("xorg-server" ,xorg-server-for-tests)))
2002 (home-page "https://qgis.org")
2003 (synopsis "Geographical information system")
2004 (description "QGIS is an easy to use Geographical Information
2005 System (GIS). It is a GIS data viewer and editor. QGIS supports a number of
2006 raster and vector data formats, with new support easily added using the plugin
2019 (license:fsdg-compatible "https://www.deviantart.com/elvensword")
2020 (license:fsf-free "file://debian/copyright" "Go Squared")
2024 "https://www.deviantart.com/webgoddess/art/Reddish-Inspired-Gradients-42208824")
2026 "file://debian/copyright"
2027 "QT-Commercial or LGPL-2.1 with Digia Qt LGPL Exception 1.1 or GPL-3")
2037 (license:non-copyleft "file://debian/copyright" "BSD-like-gist")
2038 (license:non-copyleft "file://debian/copyright" "Jim Mossman Attribution")
2039 (license:non-copyleft
2040 "https://www.ncl.ucar.edu/Download/NCL_source_license.shtml"
2041 "NCL Source Code License")
2044 license:public-domain