geo.scm
| 1 | ;;; GNU Guix --- Functional package management for GNU |
| 2 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
| 3 | ;;; |
| 4 | ;;; This file is part of GNU Guix. |
| 5 | ;;; |
| 6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
| 7 | ;;; under the terms of the GNU General Public License as published by |
| 8 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
| 9 | ;;; your option) any later version. |
| 10 | ;;; |
| 11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
| 12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | ;;; GNU General Public License for more details. |
| 15 | ;;; |
| 16 | ;;; You should have received a copy of the GNU General Public License |
| 17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
| 18 | |
| 19 | (define-module (more packages geo) |
| 20 | #:use-module (guix packages) |
| 21 | #:use-module (guix download) |
| 22 | #:use-module (guix git-download) |
| 23 | #:use-module (guix build-system cmake) |
| 24 | #:use-module (guix build-system gnu) |
| 25 | #:use-module (guix build-system go) |
| 26 | #:use-module ((guix licenses) #:prefix license:) |
| 27 | #:use-module (gnu packages) |
| 28 | #:use-module (gnu packages boost) |
| 29 | #:use-module (gnu packages compression) |
| 30 | #:use-module (gnu packages databases) |
| 31 | #:use-module (gnu packages datastructures) |
| 32 | #:use-module (gnu packages documentation) |
| 33 | #:use-module (gnu packages geo) |
| 34 | #:use-module (gnu packages image) |
| 35 | #:use-module (gnu packages lua) |
| 36 | #:use-module (gnu packages pcre) |
| 37 | #:use-module (gnu packages perl) |
| 38 | #:use-module (gnu packages pkg-config) |
| 39 | #:use-module (gnu packages web) |
| 40 | #:use-module (gnu packages xml)) |
| 41 | |
| 42 | (define-public tegola |
| 43 | (package |
| 44 | (name "tegola") |
| 45 | (version "0.7.0") |
| 46 | (source (origin |
| 47 | (method url-fetch) |
| 48 | (uri (string-append |
| 49 | "https://github.com/go-spatial/tegola/archive/v" |
| 50 | version ".tar.gz")) |
| 51 | (sha256 |
| 52 | (base32 |
| 53 | "09vnzxfn0r70kmd776kcdfqxhzdj11syxa0b27z4ci1k367v7viw")))) |
| 54 | (build-system go-build-system) |
| 55 | (arguments |
| 56 | `(#:import-path "github.com/go-spatial/tegola/cmd/tegola" |
| 57 | #:unpack-path "github.com/go-spatial" |
| 58 | #:phases |
| 59 | (modify-phases %standard-phases |
| 60 | (add-before 'build 'rename-import |
| 61 | (lambda _ |
| 62 | (rename-file (string-append "src/github.com/go-spatial/tegola-" ,version) |
| 63 | "src/github.com/go-spatial/tegola") |
| 64 | #t))))) |
| 65 | (home-page "http://tegola.io") |
| 66 | (synopsis "Vector tile server for maps") |
| 67 | (description "Tegola is a free vector tile server written in Go. Tegola |
| 68 | takes geospatial data and slices it into vector tiles that can be efficiently |
| 69 | delivered to any client.") |
| 70 | (license license:expat))) |
| 71 | |
| 72 | (define-public protozero |
| 73 | (package |
| 74 | (name "protozero") |
| 75 | (version "1.6.3") |
| 76 | (source |
| 77 | (origin |
| 78 | (method url-fetch) |
| 79 | (uri (string-append "https://github.com/mapbox/protozero/archive/v" |
| 80 | version ".tar.gz")) |
| 81 | (file-name (string-append name "-" version ".tar.gz")) |
| 82 | (sha256 |
| 83 | (base32 |
| 84 | "1xaj4phz1r7xn0vgdfvfkz8b0bizgb6mavjky1zqcvdmbwgwgly5")))) |
| 85 | (build-system cmake-build-system) |
| 86 | (home-page "https://github.com/mapbox/protozero") |
| 87 | (synopsis "Minimalistic protocol buffer decoder and encoder in C++") |
| 88 | (description "Protozero is a minimalistic protocol buffer decored and |
| 89 | encoder in C++. The developer using protozero has to manually translate the |
| 90 | @file{.proto} description into code.") |
| 91 | (license (list |
| 92 | license:asl2.0; for folly |
| 93 | license:bsd-2)))) |
| 94 | |
| 95 | (define-public libosmium |
| 96 | (package |
| 97 | (name "libosmium") |
| 98 | (version "2.14.2") |
| 99 | (source |
| 100 | (origin |
| 101 | (method url-fetch) |
| 102 | (uri (string-append "https://github.com/osmcode/libosmium/archive/v" |
| 103 | version ".tar.gz")) |
| 104 | (file-name (string-append name "-" version ".tar.gz")) |
| 105 | (sha256 |
| 106 | (base32 |
| 107 | "0d9b46qiw7zkw1h9lygjdwqxnbhm3c7v8kydzw9f9f778cyagc94")))) |
| 108 | (build-system cmake-build-system) |
| 109 | (inputs |
| 110 | `(("boost" ,boost) |
| 111 | ("expat" ,expat) |
| 112 | ("gdal" ,gdal) |
| 113 | ("geos" ,geos) |
| 114 | ("proj.4" ,proj.4) |
| 115 | ("protozero" ,protozero) |
| 116 | ("sparsehash" ,sparsehash) |
| 117 | ("zlib" ,zlib))) |
| 118 | (native-inputs |
| 119 | `(("doxygen" ,doxygen))) |
| 120 | (home-page "https://osmcode.org/libosmium") |
| 121 | (synopsis "C++ library for working with OpenStreetMap data") |
| 122 | (description "Libosmium is a fast and flexible C++ library for working with |
| 123 | OpenStreetMap data.") |
| 124 | (license license:boost1.0))) |
| 125 | |
| 126 | (define-public imposm3 |
| 127 | (package |
| 128 | (name "imposm3") |
| 129 | (version "0.6.0-alpha.4") |
| 130 | (source |
| 131 | (origin |
| 132 | (method url-fetch) |
| 133 | (uri (string-append "https://github.com/omniscale/imposm3/archive/v" |
| 134 | version ".tar.gz")) |
| 135 | (file-name (string-append name "-" version ".tar.gz")) |
| 136 | (sha256 |
| 137 | (base32 |
| 138 | "06f0kwmv52yd5m9jlckqxqmkf0cnqy3hamakrvg9lspplyqrds80")))) |
| 139 | (build-system go-build-system) |
| 140 | (arguments |
| 141 | `(#:import-path "github.com/omniscale/imposm3/cmd/imposm" |
| 142 | #:unpack-path "github.com/omniscale" |
| 143 | #:phases |
| 144 | (modify-phases %standard-phases |
| 145 | (add-before 'build 'rename-import |
| 146 | (lambda _ |
| 147 | (rename-file (string-append "src/github.com/omniscale/imposm3-" ,version) |
| 148 | "src/github.com/omniscale/imposm3") |
| 149 | #t))))) |
| 150 | (inputs |
| 151 | `(("geos" ,geos) |
| 152 | ("leveldb" ,leveldb))) |
| 153 | (home-page "http://imposm.org/") |
| 154 | (synopsis "OpenStreetMap importer for PostGIS.") |
| 155 | (description "OpenStreetMap importer for PostGIS.") |
| 156 | (license license:asl2.0))) |
| 157 | |
| 158 | (define-public osmconvert |
| 159 | (package |
| 160 | (name "osmconvert") |
| 161 | (version "0") |
| 162 | (source (origin |
| 163 | (method url-fetch) |
| 164 | (uri (string-append "http://m.m.i24.cc/osmconvert.c")) |
| 165 | (sha256 |
| 166 | (base32 |
| 167 | "19glwq8w5sl8579zxbpydj56lybs94nrf47f3i2xjwlkmzrlljfv")))) |
| 168 | (build-system gnu-build-system) |
| 169 | (arguments |
| 170 | `(#:tests? #f; no tests |
| 171 | #:phases |
| 172 | (modify-phases %standard-phases |
| 173 | (delete 'unpack) |
| 174 | (delete 'configure) |
| 175 | (delete 'install) |
| 176 | (replace 'build |
| 177 | (lambda* (#:key inputs outputs #:allow-other-keys) |
| 178 | (mkdir-p (string-append (assoc-ref outputs "out") "/bin")) |
| 179 | (invoke "gcc" (assoc-ref inputs "source") "-lz" "-o" |
| 180 | (string-append (assoc-ref outputs "out") "/bin/osmconvert")) |
| 181 | (chmod (string-append (assoc-ref outputs "out") "/bin/osmconvert") |
| 182 | #o755) |
| 183 | #t))))) |
| 184 | (inputs |
| 185 | `(("zlib" ,zlib))) |
| 186 | (home-page "") |
| 187 | (synopsis "") |
| 188 | (description "") |
| 189 | (license license:agpl3+))) |
| 190 | |
| 191 | (define-public osm2pgsql |
| 192 | (package |
| 193 | (name "osm2pgsql") |
| 194 | (version "0.96.0") |
| 195 | (source (origin |
| 196 | (method url-fetch) |
| 197 | (uri (string-append "https://github.com/openstreetmap/osm2pgsql/archive/" |
| 198 | version ".tar.gz")) |
| 199 | (file-name (string-append name "-" version ".tar.gz")) |
| 200 | (sha256 |
| 201 | (base32 |
| 202 | "08y7776r4l9v9177a4q6cfdri0lpirky96m6g699hwl7v1vhw0mn")))) |
| 203 | (build-system cmake-build-system) |
| 204 | (arguments |
| 205 | ;; failure |
| 206 | `(#:tests? #f)) |
| 207 | (inputs |
| 208 | `(("boost" ,boost) |
| 209 | ("expat" ,expat) |
| 210 | ("lua" ,lua) |
| 211 | ("postgresql" ,postgresql) |
| 212 | ("proj.4" ,proj.4) |
| 213 | ("zlib" ,zlib))) |
| 214 | (home-page "") |
| 215 | (synopsis "") |
| 216 | (description "") |
| 217 | (license license:gpl2))) |
| 218 | |
| 219 | (define-public tippecanoe |
| 220 | (package |
| 221 | (name "tippecanoe") |
| 222 | (version "1.31.5") |
| 223 | (source (origin |
| 224 | (method url-fetch) |
| 225 | (uri (string-append "https://github.com/mapbox/tippecanoe/archive/" |
| 226 | version ".tar.gz")) |
| 227 | (file-name (string-append name "-" version ".tar.gz")) |
| 228 | (sha256 |
| 229 | (base32 |
| 230 | "1057na1dkgjaryr7jr15lqkxpam111d3l5zdpdkqzzzpxmdjxqcf")))) |
| 231 | (build-system gnu-build-system) |
| 232 | (arguments |
| 233 | `(#:phases |
| 234 | (modify-phases %standard-phases (delete 'configure)) |
| 235 | #:test-target "test" |
| 236 | #:make-flags |
| 237 | (list "CC=gcc" |
| 238 | (string-append "PREFIX=" (assoc-ref %outputs "out"))))) |
| 239 | (inputs |
| 240 | `(("sqlite" ,sqlite) |
| 241 | ("zlib" ,zlib))) |
| 242 | (native-inputs |
| 243 | `(("perl" ,perl))) |
| 244 | (home-page "") |
| 245 | (synopsis "") |
| 246 | (description "") |
| 247 | (license license:bsd-2))) |
| 248 |