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