Commit | Line | Data |
---|---|---|
03c1662e LF |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2016 Leo Famulari <leo@famulari.name> | |
ad1ff78d | 3 | ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com> |
f6c507e1 | 4 | ;;; Copyright © 2017, 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> |
257c826c | 5 | ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
8d26f48e | 6 | ;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net> |
f2b005f6 | 7 | ;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net> |
3d60f426 | 8 | ;;; Copyright © 2018 Joshua Sierles, Nextjournal <joshua@nextjournal.com> |
996e45cb | 9 | ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu> |
ed72a133 | 10 | ;;; Copyright © 2019 Guillaume Le Vaillant <glv@posteo.net> |
03c1662e LF |
11 | ;;; |
12 | ;;; This file is part of GNU Guix. | |
13 | ;;; | |
14 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
15 | ;;; under the terms of the GNU General Public License as published by | |
16 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
17 | ;;; your option) any later version. | |
18 | ;;; | |
19 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
20 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
22 | ;;; GNU General Public License for more details. | |
23 | ;;; | |
24 | ;;; You should have received a copy of the GNU General Public License | |
25 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
26 | ||
27 | (define-module (gnu packages geo) | |
8fa3451c | 28 | #:use-module (guix build-system cmake) |
03c1662e | 29 | #:use-module (guix build-system glib-or-gtk) |
065d0125 | 30 | #:use-module (guix build-system gnu) |
be7c64ba | 31 | #:use-module (guix build-system go) |
f25e1e24 | 32 | #:use-module (guix build-system python) |
f2b005f6 | 33 | #:use-module (guix build-system scons) |
3d60f426 | 34 | #:use-module (guix build-system r) |
03c1662e | 35 | #:use-module (guix download) |
d56af1ff | 36 | #:use-module (guix git-download) |
065d0125 | 37 | #:use-module ((guix licenses) #:prefix license:) |
03c1662e LF |
38 | #:use-module (guix packages) |
39 | #:use-module (guix utils) | |
ed72a133 | 40 | #:use-module (gnu packages autotools) |
f2b005f6 | 41 | #:use-module (gnu packages boost) |
f25e1e24 | 42 | #:use-module (gnu packages check) |
1a39141d | 43 | #:use-module (gnu packages compression) |
f2b005f6 | 44 | #:use-module (gnu packages databases) |
889e94e3 JL |
45 | #:use-module (gnu packages datastructures) |
46 | #:use-module (gnu packages documentation) | |
f2b005f6 | 47 | #:use-module (gnu packages fontutils) |
03c1662e LF |
48 | #:use-module (gnu packages glib) |
49 | #:use-module (gnu packages gnome) | |
50 | #:use-module (gnu packages gtk) | |
1a39141d | 51 | #:use-module (gnu packages image) |
f2b005f6 | 52 | #:use-module (gnu packages icu4c) |
b0e2299a | 53 | #:use-module (gnu packages lua) |
996e45cb | 54 | #:use-module (gnu packages pcre) |
2b9be1a6 | 55 | #:use-module (gnu packages perl) |
03c1662e | 56 | #:use-module (gnu packages pkg-config) |
dc8621a2 | 57 | #:use-module (gnu packages protobuf) |
f2b005f6 | 58 | #:use-module (gnu packages python) |
44d10b1f | 59 | #:use-module (gnu packages python-xyz) |
cd0322a3 | 60 | #:use-module (gnu packages sqlite) |
5b19776e | 61 | #:use-module (gnu packages web) |
03c1662e | 62 | #:use-module (gnu packages webkit) |
a2a53274 | 63 | #:use-module (gnu packages wxwidgets) |
03c1662e LF |
64 | #:use-module (gnu packages xml)) |
65 | ||
a7607572 BH |
66 | (define-public geos |
67 | (package | |
68 | (name "geos") | |
e3df159e | 69 | (version "3.7.1") |
a7607572 BH |
70 | (source (origin |
71 | (method url-fetch) | |
72 | (uri (string-append "http://download.osgeo.org/geos/geos-" | |
73 | version | |
74 | ".tar.bz2")) | |
75 | (sha256 | |
76 | (base32 | |
e3df159e | 77 | "1312m02xk4sp6f1xdpb9w0ic0zbxg90p5y66qnwidl5fksscf1h0")))) |
a7607572 BH |
78 | (build-system gnu-build-system) |
79 | (arguments `(#:phases | |
80 | (modify-phases %standard-phases | |
81 | (add-after | |
82 | 'unpack 'patch-test-shebangs | |
83 | (lambda _ | |
84 | (substitute* '("tests/xmltester/testrunner.sh" | |
85 | "tests/geostest/testrunner.sh") | |
86 | (("/bin/sh") (which "sh"))) | |
87 | #t))))) | |
88 | (inputs | |
89 | `(("glib" ,glib))) | |
90 | (home-page "https://geos.osgeo.org/") | |
91 | (synopsis "Geometry Engine for Geographic Information Systems") | |
92 | (description | |
93 | "GEOS provides a spatial object model and fundamental geometric | |
94 | functions. It is a C++ port of the Java Topology Suite (JTS). As such, | |
95 | it aims to contain the complete functionality of JTS in C++. This | |
96 | includes all the OpenGIS Simple Features for SQL spatial predicate | |
97 | functions and spatial operators, as well as specific JTS enhanced | |
98 | topology functions.") | |
99 | (license (list license:lgpl2.1+ ; Main distribution. | |
100 | license:zlib ; tests/xmltester/tinyxml/* | |
101 | license:public-domain)))) ; include/geos/timeval.h | |
102 | ||
03c1662e LF |
103 | (define-public gnome-maps |
104 | (package | |
105 | (name "gnome-maps") | |
78ac232e | 106 | (version "3.28.2") |
03c1662e LF |
107 | (source (origin |
108 | (method url-fetch) | |
109 | (uri (string-append "mirror://gnome/sources/" name "/" | |
110 | (version-major+minor version) "/" | |
111 | name "-" version ".tar.xz")) | |
112 | (sha256 | |
113 | (base32 | |
78ac232e | 114 | "1yzi08a9316jplgsl2z0qzlqxhghyqcjhv0m6i94wcain4mxk1z7")))) |
03c1662e LF |
115 | (build-system glib-or-gtk-build-system) |
116 | (arguments | |
67bd376b | 117 | `(#:configure-flags ;; Ensure that geoclue is referred to by output. |
03c1662e LF |
118 | (list (string-append "LDFLAGS=-L" |
119 | (assoc-ref %build-inputs "geoclue") "/lib") | |
120 | (string-append "CFLAGS=-I" | |
121 | (assoc-ref %build-inputs "geoclue") "/include")) | |
122 | #:phases | |
123 | (modify-phases %standard-phases | |
67bd376b KK |
124 | (add-after 'install 'wrap |
125 | (lambda* (#:key inputs outputs #:allow-other-keys) | |
126 | (let ((out (assoc-ref outputs "out")) | |
127 | (gi-typelib-path (getenv "GI_TYPELIB_PATH")) | |
128 | (goa-path (string-append | |
03c1662e | 129 | (assoc-ref inputs "gnome-online-accounts") |
67bd376b KK |
130 | "/lib")) |
131 | (webkitgtk-path (string-append | |
132 | (assoc-ref inputs "webkitgtk") | |
133 | "/lib"))) | |
134 | (wrap-program (string-append out "/bin/gnome-maps") | |
135 | `("GI_TYPELIB_PATH" ":" prefix (,gi-typelib-path)) | |
03c1662e | 136 | |
67bd376b KK |
137 | ;; There seems to be no way to embed the path of |
138 | ;; libgoa-1.0.so.0, libwebkit2gtk-4.0.so.37 and | |
139 | ;; libjavascriptcoregtk-4.0.so.18. | |
140 | `("LD_LIBRARY_PATH" ":" prefix (,goa-path ,webkitgtk-path))) | |
141 | #t)))))) | |
03c1662e LF |
142 | (native-inputs |
143 | `(("gobject-introspection" ,gobject-introspection) | |
144 | ("intltool" ,intltool) | |
145 | ("pkg-config" ,pkg-config))) | |
146 | (inputs | |
147 | `(("folks" ,folks) | |
148 | ("libchamplain" ,libchamplain) | |
149 | ("libgee" ,libgee) | |
8d26f48e RW |
150 | ("libsecret" ,libsecret) |
151 | ("libsoup" ,libsoup) | |
152 | ("libgweather" ,libgweather) | |
03c1662e | 153 | ("libxml2" ,libxml2) |
8d26f48e RW |
154 | ("gdk-pixbuf" ,gdk-pixbuf) |
155 | ("glib-networking" ,glib-networking) | |
03c1662e LF |
156 | ("geoclue" ,geoclue) |
157 | ("geocode-glib" ,geocode-glib) | |
158 | ("gfbgraph" ,gfbgraph) | |
159 | ("gjs" ,gjs) | |
160 | ("glib" ,glib) | |
161 | ("gnome-online-accounts" ,gnome-online-accounts) | |
8d26f48e | 162 | ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) |
03c1662e LF |
163 | ("rest" ,rest) |
164 | ("webkitgtk" ,webkitgtk))) | |
165 | (propagated-inputs | |
166 | `(("gtk+3" ,gtk+))) | |
167 | (synopsis "Graphical map viewer and wayfinding program") | |
168 | (description "GNOME Maps is a graphical map viewer. It uses map data from | |
169 | the OpenStreetMap project. It can provide directions for walking, bicycling, | |
170 | and driving.") | |
171 | (home-page "https://wiki.gnome.org/Apps/Maps") | |
065d0125 BH |
172 | (license license:gpl2+))) |
173 | ||
22c7c775 BH |
174 | (define-public libgaiagraphics |
175 | (package | |
176 | (name "libgaiagraphics") | |
177 | (version "0.5") | |
178 | (source | |
179 | (origin | |
180 | (method url-fetch) | |
181 | (uri (string-append "https://www.gaia-gis.it/gaia-sins/libgaiagraphics-" | |
182 | version ".tar.gz")) | |
183 | (sha256 | |
184 | (base32 | |
185 | "076afqv417ag3hfvnif0qc7qscmnq1dsf6y431yygwgf34rjkayc")))) | |
186 | (build-system gnu-build-system) | |
187 | (native-inputs | |
188 | `(("pkg-config" ,pkg-config))) | |
189 | (inputs | |
190 | `(("cairo" ,cairo) | |
191 | ("libpng" ,libpng) | |
56e53392 | 192 | ("libjpeg-turbo" ,libjpeg-turbo) |
22c7c775 BH |
193 | ("libtiff" ,libtiff) |
194 | ("libgeotiff" ,libgeotiff) | |
195 | ("proj.4" ,proj.4) | |
196 | ("libxml2" ,libxml2) | |
197 | ("zlib" ,zlib))) | |
198 | (synopsis "Gaia common graphics support") | |
199 | (description "libgaiagraphics is a library supporting | |
200 | common-utility raster handling methods.") | |
201 | (home-page "https://www.gaia-gis.it/fossil/libgaiagraphics/index") | |
202 | (license license:lgpl3+))) | |
203 | ||
1a39141d BH |
204 | (define-public libgeotiff |
205 | (package | |
206 | (name "libgeotiff") | |
a3783aca | 207 | (version "1.4.3") |
1a39141d BH |
208 | (source |
209 | (origin | |
210 | (method url-fetch) | |
211 | (uri (string-append "http://download.osgeo.org/geotiff/libgeotiff/libgeotiff-" | |
212 | version ".tar.gz")) | |
213 | (sha256 | |
a3783aca | 214 | (base32 "0rbjqixi4c8yz19larlzq6jda0px2gpmpp9c52cyhplbjsdhsldq")) |
1a39141d BH |
215 | (modules '((guix build utils))) |
216 | (snippet | |
217 | '(begin | |
218 | ;; Remove .csv files, distributed from EPSG under a restricted | |
219 | ;; license. See LICENSE for full license text. | |
220 | (for-each delete-file (find-files "." "\\.csv$")) | |
221 | ;; Now that we have removed the csv files, we need to modify the Makefile. | |
222 | (substitute* "Makefile.in" | |
223 | (("^all-am: .*$") | |
224 | "all-am: Makefile $(LTLIBRARIES) $(HEADERS) geo_config.h\n") | |
225 | (("^install-data-am: .*$") | |
6cbee49d MW |
226 | "install-data-am: install-includeHEADERS")) |
227 | #t)))) | |
1a39141d BH |
228 | (build-system gnu-build-system) |
229 | (inputs | |
230 | `(("libjpeg-turbo" ,libjpeg-turbo) | |
231 | ("libtiff" ,libtiff) | |
232 | ("proj.4" ,proj.4) | |
233 | ("zlib" ,zlib))) | |
234 | (arguments | |
235 | `(#:configure-flags | |
236 | (list (string-append "--with-zlib") | |
237 | (string-append "--with-jpeg") | |
238 | (string-append "--with-libtiff=" (assoc-ref %build-inputs "libtiff"))))) | |
239 | (synopsis "Library for handling GeoTIFF (geographic enabled TIFF)") | |
240 | (description "libgeotiff is a library on top of libtiff for reading and | |
241 | writing GeoTIFF information tags.") | |
242 | (home-page "https://trac.osgeo.org/geotiff/") | |
243 | ;; This is a mixture of various contributions under different licenses. | |
244 | ;; Note that the EPSG database is NOT "free to use" as the LICENSE file | |
245 | ;; states, as its commercial redistribution is restricted. Hence, we have | |
246 | ;; removed it from the package. | |
247 | (license (list license:public-domain | |
248 | license:x11 | |
249 | license:bsd-3 | |
250 | (license:non-copyleft "file://LICENSE" | |
251 | "See LICENSE in the distribution."))))) | |
252 | ||
f6c507e1 BH |
253 | (define-public libspatialite |
254 | (package | |
255 | (name "libspatialite") | |
256 | (version "4.3.0a") | |
257 | (source | |
258 | (origin | |
259 | (method url-fetch) | |
260 | (uri (string-append "https://www.gaia-gis.it/gaia-sins/libspatialite-" | |
261 | version ".tar.gz")) | |
262 | (sha256 | |
263 | (base32 | |
264 | "16d4lpl7xrm9zy4gphy6nwanpjp8wn9g4wq2i2kh8abnlhq01448")))) | |
265 | (build-system gnu-build-system) | |
266 | (native-inputs | |
267 | `(("pkg-config" ,pkg-config))) | |
268 | (inputs | |
269 | `(("freexl" ,freexl) | |
270 | ("geos" ,geos) | |
271 | ("libxml2" ,libxml2) | |
272 | ("proj.4" ,proj.4) | |
273 | ("sqlite" ,sqlite) | |
274 | ("zlib" ,zlib))) | |
275 | (arguments | |
276 | `(#:phases | |
277 | (modify-phases %standard-phases | |
278 | ;; 3 tests are failing, ignore them: | |
279 | (add-after 'unpack 'ignore-broken-tests | |
280 | (lambda _ | |
281 | (substitute* '("test/Makefile.in") | |
282 | (("\tcheck_sql_stm.*" all) "\tcheck_multithread$(EXEEXT) \\\n") | |
283 | (("(\tch.*) check_v.*ble2.*$" all vt1) (string-append vt1 " \\\n")) | |
284 | (("\tch.* (check_v.*ble4.*)$" all vt4) (string-append "\t" vt4))) | |
285 | #t))))) | |
286 | (synopsis "Extend SQLite to support Spatial SQL capabilities") | |
287 | (description | |
288 | "SpatiaLite is a library intended to extend the SQLite core to support | |
289 | fully fledged Spatial SQL capabilities.") | |
290 | (home-page "https://www.gaia-gis.it/fossil/libspatialite/index") | |
291 | ;; For the genuine libspatialite-sources holds: | |
292 | ;; Any of the licenses MPL1.1, GPL2+ or LGPL2.1+ may be picked. | |
293 | ;; Files under src/control_points are from GRASS | |
294 | ;; and are licensed under GPL2+ only. | |
295 | ;; src/md5.[ch]: Placed into the public domain by Alexander Peslyak. | |
296 | (license (list license:gpl2+ | |
297 | license:lgpl2.1+ | |
298 | license:mpl1.1 | |
299 | license:public-domain)))) | |
300 | ||
065d0125 BH |
301 | (define-public proj.4 |
302 | (package | |
303 | (name "proj.4") | |
304 | (version "4.9.3") | |
305 | (source (origin | |
306 | (method url-fetch) | |
307 | (uri (string-append "http://download.osgeo.org/proj/proj-" | |
308 | version ".tar.gz")) | |
309 | (sha256 | |
310 | (base32 | |
311 | "1xw5f427xk9p2nbsj04j6m5zyjlyd66sbvl2bkg8hd1kx8pm9139")))) | |
312 | (build-system gnu-build-system) | |
313 | (arguments | |
314 | `(#:phases | |
315 | (modify-phases %standard-phases | |
316 | (add-after 'unpack 'patch-test-paths | |
317 | (lambda _ | |
318 | (substitute* '("nad/test27" | |
319 | "nad/test83" | |
320 | "nad/testvarious" | |
321 | "nad/testdatumfile" | |
322 | "nad/testflaky" | |
323 | "nad/testIGNF") | |
324 | (("/bin/rm") (which "rm"))) | |
325 | #t)) | |
326 | ;; Precision problems on i686 and other platforms. See: | |
327 | ;; https://web.archive.org/web/20151006134301/http://trac.osgeo.org/proj/ticket/255 | |
328 | ;; Disable failing test. | |
329 | (add-after 'patch-test-paths 'ignore-failing-tests | |
330 | (lambda _ | |
331 | (substitute* '("nad/Makefile.in") | |
332 | (("\tPROJ_LIB.*" all) (string-append "#" all))) | |
333 | #t))))) | |
334 | (inputs | |
335 | `(("glib" ,glib))) | |
336 | (home-page "http://proj4.org/") | |
337 | (synopsis "Cartographic Projections Library") | |
338 | (description | |
339 | "Proj.4 is a library for converting coordinates between cartographic | |
340 | projections.") | |
341 | (license (list license:expat | |
342 | ;; src/PJ_patterson.c | |
343 | license:asl2.0 | |
344 | ;; src/geodesic.c/h | |
345 | license:x11 | |
346 | ;; Embedded EPSG database. | |
347 | (license:non-copyleft "http://www.epsg.org/TermsOfUse") | |
348 | ;; cmake/* | |
349 | license:boost1.0)))) | |
f2b005f6 AI |
350 | |
351 | (define-public mapnik | |
352 | (package | |
353 | (name "mapnik") | |
354 | (version "3.0.18") | |
355 | (source | |
356 | (origin | |
357 | (method url-fetch) | |
358 | (uri (string-append "https://github.com/mapnik/mapnik/releases/download/v" | |
359 | version "/mapnik-v" version ".tar.bz2")) | |
360 | (sha256 | |
361 | (base32 | |
362 | "06frcikaj2mgz3abfk5h0z4j3hbksi0zikwjngbjv4p5f3pwxf8q")))) | |
363 | (build-system scons-build-system) | |
364 | (inputs | |
365 | `(("boost" ,boost) | |
366 | ("cairo" ,cairo) | |
367 | ("freetype" ,freetype) | |
368 | ("harfbuzz" ,harfbuzz) | |
369 | ("icu4c" ,icu4c) | |
370 | ("libjpeg-turbo" ,libjpeg-turbo) | |
371 | ("libpng" ,libpng) | |
372 | ("libtiff" ,libtiff) | |
373 | ("libwebp" ,libwebp) | |
374 | ("libxml2" ,libxml2) | |
375 | ("proj.4" ,proj.4) | |
376 | ("sqlite" ,sqlite) | |
377 | ("zlib" ,zlib))) | |
378 | (native-inputs | |
379 | `(("pkg-config" ,pkg-config))) | |
380 | (arguments | |
381 | `(#:scons ,scons-python2 | |
382 | #:scons-flags | |
383 | (list "CC=gcc" | |
384 | (string-append "PREFIX=" %output) | |
385 | (string-append "CUSTOM_LDFLAGS=-Wl,-rpath=" %output "/lib")))) | |
386 | (home-page "http://mapnik.org/") | |
387 | (synopsis "Toolkit for developing mapping applications") | |
388 | (description "Mapnik is a toolkit for developing mapping applications. It | |
389 | is basically a collection of geographic objects like maps, layers, | |
390 | datasources, features, and geometries. At its core is a C++ shared library | |
391 | providing algorithms and patterns for spatial data access and visualization. | |
392 | The library does not rely on any specific windowing system and can be deployed | |
393 | to any server environment. It is intended to play fair in a multi-threaded | |
394 | environment and is aimed primarily, but not exclusively, at web-based | |
395 | development.") | |
396 | (license (list license:lgpl2.1+ | |
397 | ;; demo/viewer, demo/python/rundemo.py | |
398 | license:gpl2+ | |
399 | ;; deps/boost, deps/mapbox, deps/agg/include/agg_conv_offset.h | |
400 | license:boost1.0 | |
401 | ;; deps/mapnik/sparsehash | |
402 | license:bsd-3 | |
403 | ;; deps/agg | |
404 | (license:non-copyleft "file://deps/agg/copying"))))) | |
405 | ||
f25e1e24 AI |
406 | (define-public python2-mapnik |
407 | (package | |
408 | (name "python2-mapnik") | |
409 | (version "3.0.16") | |
410 | (source | |
411 | (origin | |
412 | (method url-fetch) | |
413 | (uri (string-append "https://github.com/mapnik/python-mapnik/archive/v" | |
414 | version ".tar.gz")) | |
415 | (file-name (string-append name "-" version ".tar.gz")) | |
416 | (sha256 | |
417 | (base32 | |
418 | "0w7wg72gnwmbjani9sqk42p2jwqkrl9hsdkawahni5m05xsifcb4")))) | |
419 | (build-system python-build-system) | |
420 | (inputs | |
421 | `(("boost" ,boost) | |
422 | ("harfbuzz" ,harfbuzz) | |
423 | ("icu4c" ,icu4c) | |
424 | ("libjpeg-turbo" ,libjpeg-turbo) | |
425 | ("libpng" ,libpng) | |
426 | ("libtiff" ,libtiff) | |
427 | ("libwebp" ,libwebp) | |
428 | ("mapnik" ,mapnik) | |
429 | ("proj.4" ,proj.4) | |
430 | ("python2-pycairo" ,python2-pycairo))) | |
431 | (native-inputs | |
432 | (let ((test-data-input | |
433 | (lambda (repository version hash) | |
434 | (origin | |
435 | (method url-fetch) | |
436 | (uri (string-append "https://github.com/mapnik/" repository | |
437 | "/archive/v" version ".tar.gz")) | |
438 | (file-name (string-append "python-mapnik-" repository | |
439 | "-" version ".tar.gz")) | |
440 | (sha256 (base32 hash)))))) | |
441 | `(("python2-nose" ,python2-nose) | |
442 | ;; Test data is released as separate tarballs | |
443 | ("test-data" | |
444 | ,(test-data-input "test-data" "3.0.18" | |
445 | "10cvgn5gxn8ldrszj24zr1vzm5w76kqk4s7bl2zzp5yvkhh8lj1n")) | |
446 | ("test-data-visual" | |
447 | ,(test-data-input "test-data-visual" "3.0.18" | |
448 | "1cb9ghy8sis0w5fkp0dvwxdqqx44rhs9a9w8g9r9i7md1c40r80i"))))) | |
449 | (arguments | |
450 | `(#:python ,python-2 ; Python 3 support is incomplete, and the build fails | |
451 | #:phases | |
452 | (modify-phases %standard-phases | |
453 | ;; Unpack test data into the source tree | |
454 | (add-after 'unpack 'unpack-submodules | |
455 | (lambda* (#:key inputs #:allow-other-keys) | |
456 | (let ((unpack (lambda (source target) | |
457 | (with-directory-excursion target | |
458 | (invoke "tar" "xvf" (assoc-ref inputs source) | |
459 | "--strip-components=1"))))) | |
460 | (unpack "test-data" "test/data") | |
461 | (unpack "test-data-visual" "test/data-visual")))) | |
462 | ;; Skip failing tests | |
463 | (add-after 'unpack 'skip-tests | |
464 | (lambda _ | |
465 | (let ((skipped-tests (list "test_vrt_referring_to_missing_files" | |
466 | "test_unicode_regex_replace" | |
467 | "test_proj_antimeridian_bbox" | |
468 | "test_render_with_scale_factor"))) | |
469 | (substitute* "setup.cfg" | |
470 | (("\\[nosetests\\]" all) | |
471 | (string-append all "\nexclude=^(" | |
472 | (string-join skipped-tests "|") ")$"))))))))) | |
473 | (home-page "https://github.com/mapnik/python-mapnik") | |
474 | (synopsis "Python bindings for Mapnik") | |
475 | (description "This package provides Python bindings for Mapnik.") | |
476 | (license license:lgpl2.1+))) | |
a2a53274 BH |
477 | |
478 | (define-public spatialite-gui | |
479 | (package | |
480 | (name "spatialite-gui") | |
481 | (version "1.7.1") | |
482 | (source | |
483 | (origin | |
484 | (method url-fetch) | |
485 | (uri (string-append "https://www.gaia-gis.it/gaia-sins/spatialite_gui-" | |
486 | version ".tar.gz")) | |
487 | (sha256 | |
488 | (base32 | |
489 | "1r05dz9pyc8vsd2wbqxcsracpfbaamz470rcyp2myfpqwznv376b")))) | |
490 | (build-system gnu-build-system) | |
491 | (native-inputs | |
492 | `(("pkg-config" ,pkg-config))) | |
493 | (inputs | |
494 | `(("freexl" ,freexl) | |
495 | ("geos" ,geos) | |
496 | ("libgaiagraphics" ,libgaiagraphics) | |
497 | ("libspatialite" ,libspatialite) | |
498 | ("libxml2" ,libxml2) | |
499 | ("proj.4" ,proj.4) | |
500 | ("sqlite" ,sqlite) | |
501 | ("wxwidgets" ,wxwidgets-2) | |
502 | ("zlib" ,zlib))) | |
503 | (synopsis "Graphical user interface for SpatiaLite") | |
504 | (description "Spatialite-gui provides a visual interface for viewing and | |
505 | maintaining a spatialite database. You can easily see the structure of the | |
506 | tables and data contents using point and click functions, many of which | |
507 | construct common SQL queries, or craft your own SQL queries.") | |
508 | (home-page "https://www.gaia-gis.it/fossil/spatialite_gui/index") | |
509 | (license license:gpl3+))) | |
3d60f426 | 510 | |
996e45cb JL |
511 | (define-public gdal |
512 | (package | |
513 | (name "gdal") | |
514 | (version "2.2.4") | |
515 | (source (origin | |
516 | (method url-fetch) | |
517 | (uri (string-append | |
518 | "http://download.osgeo.org/gdal/" version "/gdal-" | |
519 | version ".tar.gz")) | |
520 | (sha256 | |
521 | (base32 | |
522 | "1951f7b69x3d1vic0rmq92q8f4bj3hbxnxmj5jl0cc3zg0isgmdr")) | |
523 | (modules '((guix build utils))) | |
524 | (snippet | |
525 | `(begin | |
526 | ;; TODO: frmts contains a lot more bundled code. | |
527 | (for-each delete-file-recursively | |
528 | ;; bundled code | |
529 | '("frmts/png/libpng" | |
530 | "frmts/gif/giflib" | |
531 | "frmts/jpeg/libjpeg" | |
532 | "frmts/jpeg/libjpeg12" | |
533 | "frmts/gtiff/libtiff" | |
534 | "frmts/gtiff/libgeotiff" | |
535 | "frmts/zlib" | |
536 | "ogr/ogrsf_frmts/geojson/libjson")))))) | |
537 | (build-system gnu-build-system) | |
538 | (arguments | |
539 | `(#:tests? #f | |
540 | #:configure-flags | |
541 | (let-syntax ((with (syntax-rules () | |
542 | ((_ option input) | |
543 | (string-append option "=" | |
544 | (assoc-ref %build-inputs input)))))) | |
545 | (list | |
546 | ;; TODO: --with-pcidsk, --with-pcraster | |
547 | (with "--with-freexl" "freexl") | |
548 | (with "--with-libjson-c" "json-c") | |
549 | (with "--with-png" "libpng") | |
550 | (with "--with-webp" "libwebp") | |
551 | (with "--with-gif" "giflib") | |
109f022e | 552 | (with "--with-jpeg" "libjpeg-turbo") |
996e45cb JL |
553 | (with "--with-libtiff" "libtiff") |
554 | (with "--with-geotiff" "libgeotiff") | |
555 | (with "--with-libz" "zlib") | |
556 | "--with-pcre")) | |
557 | #:phases | |
558 | (modify-phases %standard-phases | |
559 | (add-before 'build 'fix-path | |
560 | (lambda _ | |
561 | (substitute* "frmts/mrf/mrf_band.cpp" | |
562 | (("\"../zlib/zlib.h\"") "<zlib.h>"))))))) | |
563 | (inputs | |
564 | `(("freexl" ,freexl) | |
565 | ("geos" ,geos) | |
566 | ("giflib" ,giflib) | |
567 | ("json-c" ,json-c) | |
568 | ("libgeotiff" ,libgeotiff) | |
569 | ("libjpeg-turbo" ,libjpeg-turbo) | |
570 | ("libpng" ,libpng) | |
571 | ("libtiff" ,libtiff) | |
572 | ("libwebp" ,libwebp) | |
573 | ("pcre" ,pcre) | |
574 | ("zlib" ,zlib))) | |
575 | (home-page "http://www.gdal.org/") | |
576 | (synopsis "Raster and vector geospatial data format library") | |
577 | (description "GDAL is a translator library for raster and vector geospatial | |
578 | data formats. As a library, it presents a single raster abstract data model | |
579 | and single vector abstract data model to the calling application for all | |
580 | supported formats. It also comes with a variety of useful command line | |
581 | utilities for data translation and processing.") | |
582 | (license (list | |
583 | ;; general license | |
584 | license:expat | |
585 | ;; frmts/gtiff/tif_float.c, frmts/pcraster/libcsf, | |
586 | ;; ogr/ogrsf_frmts/dxf/intronurbs.cpp, frmts/pdf/pdfdataset.cpp | |
587 | ;; frmts/mrf/ | |
588 | license:bsd-3 | |
589 | ;; frmts/hdf4/hdf-eos/* | |
590 | ;; similar to the expat license, but without guarantee exclusion | |
591 | (license:non-copyleft "file://frmts/hdf4/hdf-eos/README") | |
592 | ;; frmts/grib/degrib/ | |
593 | license:public-domain ; with guarantee exclusion | |
594 | ;; port/cpl_minizip* | |
595 | ;; Some bsd-inspired license | |
596 | (license:non-copyleft "file://port/LICENCE_minizip") | |
597 | ;; alg/internal_libqhull | |
598 | ;; Some 5-clause license | |
599 | (license:non-copyleft "file://alg/internal_libqhull/COPYING.txt") | |
600 | ;; frmts/mrf/libLERC | |
601 | license:asl2.0)))) | |
2b9be1a6 JL |
602 | |
603 | (define-public postgis | |
604 | (package | |
605 | (name "postgis") | |
606 | (version "2.4.4") | |
607 | (source (origin | |
608 | (method url-fetch) | |
609 | (uri (string-append "https://download.osgeo.org/postgis/source/postgis-" | |
610 | version ".tar.gz")) | |
611 | (sha256 | |
612 | (base32 | |
613 | "1hm8migjb53cymp4qvg1h20yqllmy9f7x0awv5450391i6syyqq6")))) | |
614 | (build-system gnu-build-system) | |
615 | (arguments | |
616 | `(#:tests? #f | |
617 | #:make-flags | |
618 | (list (string-append "datadir=" (assoc-ref %outputs "out") "/share") | |
619 | (string-append "docdir="(assoc-ref %outputs "out") "/share/doc") | |
620 | (string-append "pkglibdir="(assoc-ref %outputs "out") "/lib") | |
621 | (string-append "bindir=" (assoc-ref %outputs "out") "/bin")) | |
622 | #:phases | |
623 | (modify-phases %standard-phases | |
624 | (add-before 'build 'fix-install-path | |
625 | (lambda* (#:key outputs #:allow-other-keys) | |
626 | (substitute* '("raster/loader/Makefile" "raster/scripts/python/Makefile") | |
627 | (("\\$\\(DESTDIR\\)\\$\\(PGSQL_BINDIR\\)") | |
628 | (string-append (assoc-ref outputs "out") "/bin")))))))) | |
629 | (inputs | |
630 | `(("gdal" ,gdal) | |
631 | ("geos" ,geos) | |
632 | ("libxml2" ,libxml2) | |
633 | ("pcre" ,pcre) | |
634 | ("postgresql" ,postgresql) | |
635 | ("proj.4" ,proj.4))) | |
636 | (native-inputs | |
637 | `(("perl" ,perl) | |
638 | ("pkg-config" ,pkg-config))) | |
639 | (home-page "https://postgis.net") | |
640 | (synopsis "Spatial database extender for PostgreSQL") | |
641 | (description "PostGIS is a spatial database extender for PostgreSQL | |
642 | object-relational database. It adds support for geographic objects allowing | |
8e3f06c9 JL |
643 | location queries to be run in SQL. This package provides a PostgreSQL |
644 | extension.") | |
2b9be1a6 JL |
645 | (license (list |
646 | ;; General license | |
647 | license:gpl2+ | |
648 | ;; loader/dbfopen, safileio.*, shapefil.h, shpopen.c | |
649 | license:expat | |
650 | ;; loader/getopt.* | |
651 | license:public-domain | |
652 | ;; doc/xsl | |
653 | license:bsd-3 ; files only say "BSD" | |
654 | ;; doc | |
655 | license:cc-by-sa3.0)))) | |
be7c64ba JL |
656 | |
657 | (define-public tegola | |
658 | (package | |
659 | (name "tegola") | |
660 | (version "0.7.0") | |
661 | (source (origin | |
662 | (method url-fetch) | |
663 | (uri (string-append | |
664 | "https://github.com/go-spatial/tegola/archive/v" | |
665 | version ".tar.gz")) | |
666 | (file-name (string-append name "-" version ".tar.gz")) | |
667 | (sha256 | |
668 | (base32 | |
669 | "09vnzxfn0r70kmd776kcdfqxhzdj11syxa0b27z4ci1k367v7viw")))) | |
670 | (build-system go-build-system) | |
671 | (arguments | |
672 | `(#:import-path "github.com/go-spatial/tegola/cmd/tegola" | |
d9ef50b3 | 673 | #:unpack-path "github.com/go-spatial/tegola" |
be7c64ba JL |
674 | #:phases |
675 | (modify-phases %standard-phases | |
676 | (add-before 'build 'set-version | |
677 | (lambda _ | |
d9ef50b3 | 678 | (with-directory-excursion "src/github.com/go-spatial/tegola" |
be7c64ba JL |
679 | (substitute* '("cmd/tegola/cmd/root.go" |
680 | "cmd/tegola_lambda/main.go") | |
681 | (("version not set") ,version))) | |
be7c64ba JL |
682 | #t))))) |
683 | (home-page "http://tegola.io") | |
684 | (synopsis "Vector tile server for maps") | |
685 | (description "Tegola is a free vector tile server written in Go. Tegola | |
686 | takes geospatial data and slices it into vector tiles that can be efficiently | |
687 | delivered to any client.") | |
688 | (license (list | |
689 | license:expat | |
690 | ;; Some packages in vendor have other licenses | |
691 | license:asl2.0 | |
692 | license:bsd-2 | |
693 | license:bsd-3 | |
694 | license:wtfpl2)))) | |
3bd7611e JL |
695 | |
696 | (define-public imposm3 | |
697 | (package | |
698 | (name "imposm3") | |
699 | (version "0.6.0-alpha.4") | |
700 | (source | |
701 | (origin | |
702 | (method url-fetch) | |
703 | (uri (string-append "https://github.com/omniscale/imposm3/archive/v" | |
704 | version ".tar.gz")) | |
705 | (file-name (string-append name "-" version ".tar.gz")) | |
706 | (sha256 | |
707 | (base32 | |
708 | "06f0kwmv52yd5m9jlckqxqmkf0cnqy3hamakrvg9lspplyqrds80")))) | |
709 | (build-system go-build-system) | |
710 | (arguments | |
711 | `(#:import-path "github.com/omniscale/imposm3/cmd/imposm" | |
bdc0c20c | 712 | #:unpack-path "github.com/omniscale/imposm3" |
3bd7611e JL |
713 | #:phases |
714 | (modify-phases %standard-phases | |
3bd7611e JL |
715 | (add-before 'build 'set-version |
716 | (lambda _ | |
717 | (substitute* "src/github.com/omniscale/imposm3/version.go" | |
718 | (("0.0.0-dev") ,version)) | |
719 | #t))))) | |
720 | (inputs | |
721 | `(("geos" ,geos) | |
722 | ("leveldb" ,leveldb))) | |
723 | (home-page "https://imposm.org/") | |
724 | (synopsis "OpenStreetMap importer for PostGIS") | |
725 | (description "Imposm is an importer for OpenStreetMap data. It reads PBF | |
726 | files and imports the data into PostgreSQL/PostGIS databases. It is designed | |
727 | to create databases that are optimized for rendering/tile/map-services.") | |
728 | (license (list | |
729 | license:asl2.0 | |
730 | ;; Some dependencies in vendor have different licenses | |
731 | license:expat | |
732 | license:bsd-2 | |
733 | license:bsd-3)))) | |
8fa3451c | 734 | |
889e94e3 JL |
735 | (define-public libosmium |
736 | (package | |
737 | (name "libosmium") | |
738 | (version "2.14.2") | |
739 | (source | |
f4daf250 TGR |
740 | (origin |
741 | (method git-fetch) | |
742 | (uri (git-reference | |
743 | (url "https://github.com/osmcode/libosmium.git") | |
744 | (commit (string-append "v" version)))) | |
745 | (file-name (git-file-name name version)) | |
746 | (sha256 | |
747 | (base32 "123ri1l0a2b9fljgpwsl7z2w4i3kmgxz79d4ns9z4mwbp8sw0250")))) | |
889e94e3 JL |
748 | (build-system cmake-build-system) |
749 | (propagated-inputs | |
750 | `(("boost" ,boost) | |
751 | ("expat" ,expat) | |
752 | ("gdal" ,gdal) | |
753 | ("geos" ,geos) | |
754 | ("proj.4" ,proj.4) | |
755 | ("protozero" ,protozero) | |
756 | ("sparsehash" ,sparsehash) | |
757 | ("zlib" ,zlib))) | |
758 | (native-inputs | |
759 | `(("doxygen" ,doxygen))) | |
760 | (home-page "https://osmcode.org/libosmium/") | |
761 | (synopsis "C++ library for working with OpenStreetMap data") | |
762 | (description "Libosmium is a fast and flexible C++ library for working with | |
763 | OpenStreetMap data.") | |
764 | (license license:boost1.0))) | |
b0e2299a JL |
765 | |
766 | (define-public osm2pgsql | |
767 | (package | |
768 | (name "osm2pgsql") | |
769 | (version "0.96.0") | |
82b47fd9 TGR |
770 | (source |
771 | (origin | |
772 | (method git-fetch) | |
773 | (uri (git-reference | |
774 | (url "https://github.com/openstreetmap/osm2pgsql.git") | |
775 | (commit version))) | |
776 | (file-name (git-file-name name version)) | |
777 | (sha256 | |
778 | (base32 "032cydh8ynaqfhdzmkvgbmqyjql668y6qln1l59l2s3ni9963bbl")) | |
779 | (modules '((guix build utils))) | |
780 | (snippet | |
781 | '(begin | |
782 | (delete-file-recursively "contrib/protozero") | |
783 | (delete-file-recursively "contrib/libosmium") | |
784 | #t)))) | |
b0e2299a JL |
785 | (build-system cmake-build-system) |
786 | (arguments | |
787 | `(#:tests? #f; tests fail because we need to setup a database | |
788 | #:configure-flags | |
789 | (list (string-append "-DOSMIUM_INCLUDE_DIR=" | |
790 | (assoc-ref %build-inputs "libosmium") | |
791 | "/include") | |
792 | (string-append "-DPROTOZERO_INCLUDE_DIR=" | |
793 | (assoc-ref %build-inputs "protozero") | |
794 | "/include")))) | |
795 | (inputs | |
796 | `(("boost" ,boost) | |
797 | ("expat" ,expat) | |
798 | ("libosmium" ,libosmium) | |
799 | ("lua" ,lua) | |
800 | ("postgresql" ,postgresql) | |
801 | ("proj.4" ,proj.4) | |
802 | ("protozero" ,protozero) | |
803 | ("zlib" ,zlib))) | |
804 | (native-inputs | |
805 | `(("python-2" ,python-2) | |
806 | ("python2-psycopg2" ,python2-psycopg2))) | |
807 | (home-page "https://github.com/openstreetmap/osm2pgsql") | |
808 | (synopsis "OSM data importer to postgresql") | |
809 | (description "Osm2pgsql is a tool for loading OpenStreetMap data into a | |
810 | PostgreSQL / PostGIS database suitable for applications like rendering into a | |
811 | map, geocoding with Nominatim, or general analysis.") | |
812 | (license license:gpl2+))) | |
6f91223f JL |
813 | |
814 | (define-public tippecanoe | |
815 | (package | |
816 | (name "tippecanoe") | |
817 | (version "1.31.5") | |
8f33d05e TGR |
818 | (source |
819 | (origin | |
820 | (method git-fetch) | |
821 | (uri (git-reference | |
822 | (url "https://github.com/mapbox/tippecanoe.git") | |
823 | (commit version))) | |
824 | (file-name (git-file-name name version)) | |
825 | (sha256 | |
826 | (base32 "1m0x931a945sr7axyhcvpwh798m58hx1zxh6ikgf9gsgqhdhmszz")))) | |
6f91223f JL |
827 | (build-system gnu-build-system) |
828 | (arguments | |
829 | `(#:phases | |
830 | (modify-phases %standard-phases (delete 'configure)) | |
831 | #:test-target "test" | |
832 | #:make-flags | |
833 | (list "CC=gcc" | |
834 | (string-append "PREFIX=" (assoc-ref %outputs "out"))))) | |
835 | (inputs | |
836 | `(("perl" ,perl) | |
837 | ("sqlite" ,sqlite) | |
838 | ("zlib" ,zlib))) | |
839 | (home-page "https://github.com/mapbox/tippecanoe") | |
840 | (synopsis "Vector tile server for maps") | |
841 | (description "Tippecanoe creates scale-independent view of data, so that | |
842 | the texture and density of features is visible at every zoom level, instead of | |
843 | dropping features at lower levels.") | |
844 | (license license:bsd-2))) | |
ed72a133 GLV |
845 | |
846 | (define-public osmctools | |
847 | (package | |
848 | (name "osmctools") | |
849 | (version "0.9") | |
850 | (source | |
851 | (origin | |
852 | (method git-fetch) | |
853 | (uri (git-reference | |
854 | (url "https://gitlab.com/osm-c-tools/osmctools") | |
855 | (commit version))) | |
856 | (file-name (git-file-name name version)) | |
857 | (sha256 | |
858 | (base32 | |
859 | "1m8d3r1q1v05pkr8k9czrmb4xjszw6hvgsf3kn9pf0v14gpn4r8f")))) | |
860 | (build-system gnu-build-system) | |
861 | (native-inputs | |
862 | `(("autoconf" ,autoconf) | |
863 | ("automake" ,automake))) | |
864 | (inputs | |
865 | `(("zlib" ,zlib))) | |
866 | (home-page "https://gitlab.com/osm-c-tools/osmctools") | |
867 | (synopsis "Tools to convert, filter and update OpenStreetMap data files") | |
868 | (description "This project contains a few tools which are used in the | |
869 | OpenStreetMap project. They can be used to convert, filter and update | |
870 | OpenStreetMap data files.") | |
871 | (license license:agpl3))) | |
ee34be73 GLV |
872 | |
873 | (define-public osm-gps-map | |
874 | (package | |
875 | (name "osm-gps-map") | |
876 | (version "1.1.0") | |
877 | (source | |
878 | (origin | |
879 | (method url-fetch) | |
880 | (uri (string-append | |
881 | "https://github.com/nzjrs/osm-gps-map/releases/download/" | |
882 | version "/osm-gps-map-" version ".tar.gz")) | |
883 | (sha256 | |
884 | (base32 | |
885 | "11imsf4cz1dpxdjh178k2s29axmq86rkfg1pqmn7incyxmjzhbwg")))) | |
886 | (build-system gnu-build-system) | |
887 | (native-inputs | |
888 | `(("gnome-common" ,gnome-common) | |
889 | ("gtk-doc" ,gtk-doc) | |
890 | ("pkg-config" ,pkg-config))) | |
891 | (inputs | |
892 | `(("cairo" ,cairo) | |
893 | ("glib" ,glib) | |
894 | ("gobject-introspection" ,gobject-introspection) | |
895 | ("gtk+" ,gtk+) | |
896 | ("libsoup" ,libsoup))) | |
897 | (home-page "https://nzjrs.github.io/osm-gps-map/") | |
898 | (synopsis "GTK+ widget for displaying OpenStreetMap tiles") | |
899 | (description | |
900 | "This package provides a GTK+ widget (and Python bindings) that when | |
901 | given GPS coordinates,draws a GPS track, and points of interest on a moving | |
902 | map display. Downloads map data from a number of websites, including | |
903 | @url{https://www.openstreetmap.org}.") | |
904 | (license license:gpl2+))) |