[PATCH] OSM-related packages

DoneSubmitted by Julien Lepiller.
Details
2 participants
  • Björn Höfling
  • Julien Lepiller
Owner
unassigned
Severity
normal
J
J
Julien Lepiller wrote on 23 Sep 2018 22:39
(address . guix-patches@gnu.org)
20180923223952.7168c8e8@lepiller.eu
Hi,
here are 4 OSM-related packages to import data from OSM and use it tocreate vector tiles.
J
J
Julien Lepiller wrote on 23 Sep 2018 22:43
[PATCH 1/4] gnu: Add tegola.
(address . 32813@debbugs.gnu.org)
20180923204311.8086-1-julien@lepiller.eu
* gnu/packages/geo.scm (tegola): New variable.--- gnu/packages/geo.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
Toggle diff (40 lines)diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scmindex ae6ba024e..e6aafff7d 100644--- a/gnu/packages/geo.scm+++ b/gnu/packages/geo.scm@@ -760,3 +760,33 @@ location queries to be run in SQL.") license:bsd-3 ; files only say "BSD" ;; doc license:cc-by-sa3.0))))++(define-public tegola+ (package+ (name "tegola")+ (version "0.7.0")+ (source (origin+ (method url-fetch)+ (uri (string-append+ "https://github.com/go-spatial/tegola/archive/v"+ version ".tar.gz"))+ (sha256+ (base32+ "09vnzxfn0r70kmd776kcdfqxhzdj11syxa0b27z4ci1k367v7viw"))))+ (build-system go-build-system)+ (arguments+ `(#:import-path "github.com/go-spatial/tegola/cmd/tegola"+ #:unpack-path "github.com/go-spatial"+ #:phases+ (modify-phases %standard-phases+ (add-before 'build 'rename-import+ (lambda _+ (rename-file (string-append "src/github.com/go-spatial/tegola-" ,version)+ "src/github.com/go-spatial/tegola")+ #t)))))+ (home-page "http://tegola.io")+ (synopsis "Vector tile server for maps")+ (description "Tegola is a free vector tile server written in Go. Tegola+takes geospatial data and slices it into vector tiles that can be efficiently+delivered to any client.")+ (license license:expat)))-- 2.18.0
J
J
Julien Lepiller wrote on 23 Sep 2018 22:43
[PATCH 2/4] gnu: Add imposm3.
(address . 32813@debbugs.gnu.org)
20180923204311.8086-2-julien@lepiller.eu
* gnu/packages/geo.scm (imposm3): New variable.--- gnu/packages/geo.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
Toggle diff (44 lines)diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scmindex e6aafff7d..81bffcc88 100644--- a/gnu/packages/geo.scm+++ b/gnu/packages/geo.scm@@ -790,3 +790,37 @@ location queries to be run in SQL.") takes geospatial data and slices it into vector tiles that can be efficiently delivered to any client.") (license license:expat)))++(define-public imposm3+ (package+ (name "imposm3")+ (version "0.6.0-alpha.4")+ (source+ (origin+ (method url-fetch)+ (uri (string-append "https://github.com/omniscale/imposm3/archive/v"+ version ".tar.gz"))+ (file-name (string-append name "-" version ".tar.gz"))+ (sha256+ (base32+ "06f0kwmv52yd5m9jlckqxqmkf0cnqy3hamakrvg9lspplyqrds80"))))+ (build-system go-build-system)+ (arguments+ `(#:import-path "github.com/omniscale/imposm3/cmd/imposm"+ #:unpack-path "github.com/omniscale"+ #:phases+ (modify-phases %standard-phases+ (add-before 'build 'rename-import+ (lambda _+ (rename-file (string-append "src/github.com/omniscale/imposm3-" ,version)+ "src/github.com/omniscale/imposm3")+ #t)))))+ (inputs+ `(("geos" ,geos)+ ("leveldb" ,leveldb)))+ (home-page "http://imposm.org/")+ (synopsis "OpenStreetMap importer for PostGIS.")+ (description "Imposm is an importer for OpenStreetMap data. It reads PBF+files and imports the data into PostgreSQL/PostGIS databases. It is designed+to create databases that are optimized for rendering/tile/map-services.")+ (license license:asl2.0)))-- 2.18.0
J
J
Julien Lepiller wrote on 23 Sep 2018 22:43
[PATCH 3/4] gnu: Add osm2pgsql.
(address . 32813@debbugs.gnu.org)
20180923204311.8086-3-julien@lepiller.eu
* gnu/packages/geo.scm (osm2pgsql): New variable.--- gnu/packages/geo.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)
Toggle diff (40 lines)diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scmindex 81bffcc88..efc68ea85 100644--- a/gnu/packages/geo.scm+++ b/gnu/packages/geo.scm@@ -824,3 +824,33 @@ delivered to any client.") files and imports the data into PostgreSQL/PostGIS databases. It is designed to create databases that are optimized for rendering/tile/map-services.") (license license:asl2.0)))++(define-public osm2pgsql+ (package+ (name "osm2pgsql")+ (version "0.96.0")+ (source (origin+ (method url-fetch)+ (uri (string-append "https://github.com/openstreetmap/osm2pgsql/archive/"+ version ".tar.gz"))+ (file-name (string-append name "-" version ".tar.gz"))+ (sha256+ (base32+ "08y7776r4l9v9177a4q6cfdri0lpirky96m6g699hwl7v1vhw0mn"))))+ (build-system cmake-build-system)+ (arguments+ ;; failure :/+ `(#:tests? #f))+ (inputs+ `(("boost" ,boost)+ ("expat" ,expat)+ ("lua" ,lua)+ ("postgresql" ,postgresql)+ ("proj.4" ,proj.4)+ ("zlib" ,zlib)))+ (home-page "https://github.com/openstreetmap/osm2pgsql")+ (synopsis "OSM data importer to postgresql")+ (description "Osm2pgsql is a tool for loading OpenStreetMap data into a+PostgreSQL / PostGIS database suitable for applications like rendering into a+map, geocoding with Nominatim, or general analysis.")+ (license license:gpl2)))-- 2.18.0
J
J
Julien Lepiller wrote on 23 Sep 2018 22:43
[PATCH 4/4] gnu: Add tippecanoe.
(address . 32813@debbugs.gnu.org)
20180923204311.8086-4-julien@lepiller.eu
* gnu/packages/geo.scm (tippecanoe): New variable.--- gnu/packages/geo.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+)
Toggle diff (42 lines)diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scmindex efc68ea85..ed3d922d1 100644--- a/gnu/packages/geo.scm+++ b/gnu/packages/geo.scm@@ -854,3 +854,35 @@ to create databases that are optimized for rendering/tile/map-services.") PostgreSQL / PostGIS database suitable for applications like rendering into a map, geocoding with Nominatim, or general analysis.") (license license:gpl2)))++(define-public tippecanoe+ (package+ (name "tippecanoe")+ (version "1.31.5")+ (source (origin+ (method url-fetch)+ (uri (string-append "https://github.com/mapbox/tippecanoe/archive/"+ version ".tar.gz"))+ (file-name (string-append name "-" version ".tar.gz"))+ (sha256+ (base32+ "1057na1dkgjaryr7jr15lqkxpam111d3l5zdpdkqzzzpxmdjxqcf"))))+ (build-system gnu-build-system)+ (arguments+ `(#:phases+ (modify-phases %standard-phases (delete 'configure))+ #:test-target "test"+ #:make-flags+ (list "CC=gcc"+ (string-append "PREFIX=" (assoc-ref %outputs "out")))))+ (inputs+ `(("sqlite" ,sqlite)+ ("zlib" ,zlib)))+ (native-inputs+ `(("perl" ,perl)))+ (home-page "https://github.com/mapbox/tippecanoe")+ (synopsis "Vector tile server for maps")+ (description "Tippecanoe creates scale-independent view of data, so that+the texture and density of features is visible at every zoom level, instead of+dropping features at lower levels.")+ (license license:bsd-2)))-- 2.18.0
B
B
Björn Höfling wrote on 25 Sep 2018 19:04
Re: [bug#32813] [PATCH 1/4] gnu: Add tegola.
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 32813@debbugs.gnu.org)
20180925190459.2f029298@alma-ubu
On Sun, 23 Sep 2018 22:43:08 +0200Julien Lepiller <julien@lepiller.eu> wrote:
Toggle quote (46 lines)> * gnu/packages/geo.scm (tegola): New variable.> ---> gnu/packages/geo.scm | 30 ++++++++++++++++++++++++++++++> 1 file changed, 30 insertions(+)> > diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm> index ae6ba024e..e6aafff7d 100644> --- a/gnu/packages/geo.scm> +++ b/gnu/packages/geo.scm> @@ -760,3 +760,33 @@ location queries to be run in SQL.")> license:bsd-3 ; files only say "BSD"> ;; doc> license:cc-by-sa3.0))))> +> +(define-public tegola> + (package> + (name "tegola")> + (version "0.7.0")> + (source (origin> + (method url-fetch)> + (uri (string-append> + "https://github.com/go-spatial/tegola/archive/v"> + version ".tar.gz"))> + (sha256> + (base32> +> "09vnzxfn0r70kmd776kcdfqxhzdj11syxa0b27z4ci1k367v7viw"))))> + (build-system go-build-system)> + (arguments> + `(#:import-path "github.com/go-spatial/tegola/cmd/tegola"> + #:unpack-path "github.com/go-spatial"> + #:phases> + (modify-phases %standard-phases> + (add-before 'build 'rename-import> + (lambda _> + (rename-file (string-append> "src/github.com/go-spatial/tegola-" ,version)> + "src/github.com/go-spatial/tegola")> + #t)))))> + (home-page "http://tegola.io")> + (synopsis "Vector tile server for maps")> + (description "Tegola is a free vector tile server written in> Go. Tegola +takes geospatial data and slices it into vector tiles> that can be efficiently +delivered to any client.")> + (license license:expat)))
Hi Julien,
thanks for the patch-set!
Here are my remarks:
Import for go-system missing:
+ #:use-module (guix build-system go)
./pre-inst-env guix lint $REVIEW_PACKAGEgnu/packages/geo.scm:770:12: tegola@0.7.0: the source file name should contain the package name
--> i.e. add to the source a line:(file-name (string-append name "-" version ".zip"))
Under directory 'vendor' are a bunch of dependencies. I never used Go,so I ask carefully:
* Do we already have them as a package (or some of them)?* Can those be snipped away?* If not, please check the licenses. With licensecheck, I found atleast:
Apache 2.0BSD-2BSD-3
And here is one I didn't know yet and I think we don't yet have alicense term for it in Guix :-)

vendor/github.com/BurntSushi/toml/COPYING
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Isn't that nice? :-)
I ran the program and got:
./pre-inst-env guix environment --ad-hoc tegola -- tegola versionversion not set
But I wouldn't invest too much time into this one, as long as the"serve" command works (havn't tried that).
Thanks,
Björn
-----BEGIN PGP SIGNATURE-----Version: GnuPG v2
iEYEARECAAYFAluqarwACgkQvyhstlk+X/3G6gCfbwLHq9Oiu3IUcfSfONKd81YiT50AnjWDyxlEl0lxN22Ivo4C+7eVtrhZ=kJMG-----END PGP SIGNATURE-----

B
B
Björn Höfling wrote on 25 Sep 2018 19:16
Re: [bug#32813] [PATCH 2/4] gnu: Add imposm3.
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 32813@debbugs.gnu.org)
20180925191617.255bc41c@alma-ubu
On Sun, 23 Sep 2018 22:43:09 +0200Julien Lepiller <julien@lepiller.eu> wrote:
Toggle quote (19 lines)> * gnu/packages/geo.scm (imposm3): New variable.> ---> gnu/packages/geo.scm | 34 ++++++++++++++++++++++++++++++++++> 1 file changed, 34 insertions(+)> > diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm> index e6aafff7d..81bffcc88 100644> --- a/gnu/packages/geo.scm> +++ b/gnu/packages/geo.scm> @@ -790,3 +790,37 @@ location queries to be run in SQL.")> takes geospatial data and slices it into vector tiles that can be> efficiently delivered to any client.")> (license license:expat)))> +> +(define-public imposm3> + (package> + (name "imposm3")> + (version "0.6.0-alpha.4")
Is there a reason you chose the -alpha.4 instead of 0.5.0?
[..]
Toggle quote (2 lines)> + (home-page "http://imposm.org/")
Use https.

Toggle quote (7 lines)> + (synopsis "OpenStreetMap importer for PostGIS.")> + (description "Imposm is an importer for OpenStreetMap data. It> reads PBF +files and imports the data into PostgreSQL/PostGIS> databases. It is designed +to create databases that are optimized> for rendering/tile/map-services.")> + (license license:asl2.0)))
/pre-inst-env guix lint $REVIEW_PACKAGEgnu/packages/geo.scm:798:2: imposm3@0.6.0-alpha.4: permanent redirect from http://imposm.org/ to https://imposm.org/gnu/packages/geo.scm:825:14: imposm3@0.6.0-alpha.4: no period allowed at the end of the synopsis
As with tegola, there are some dependencies in the 'vendors' directory.Either unbundle them or add their licenses to the license field.
This does not work too: ./pre-inst-env guix environment --ad-hoc imposm3 -- imposm version0.0.0-dev

Otherwise fine.
Björn
-----BEGIN PGP SIGNATURE-----Version: GnuPG v2
iEYEARECAAYFAluqbWIACgkQvyhstlk+X/3bMQCePZIy//J1nQT7ai3oZMnOAgjsvLMAoKM5cbUfvHYLdISXMRR4rAfyj3lj=hqU5-----END PGP SIGNATURE-----

B
B
Björn Höfling wrote on 25 Sep 2018 19:37
Re: [bug#32813] [PATCH 3/4] gnu: Add osm2pgsql.
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 32813@debbugs.gnu.org)
20180925193740.0284e415@alma-ubu
On Sun, 23 Sep 2018 22:43:10 +0200Julien Lepiller <julien@lepiller.eu> wrote:
Toggle quote (19 lines)> * gnu/packages/geo.scm (osm2pgsql): New variable.> ---> gnu/packages/geo.scm | 30 ++++++++++++++++++++++++++++++> 1 file changed, 30 insertions(+)> > diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm> index 81bffcc88..efc68ea85 100644> --- a/gnu/packages/geo.scm> +++ b/gnu/packages/geo.scm> @@ -824,3 +824,33 @@ delivered to any client.")> files and imports the data into PostgreSQL/PostGIS databases. It is> designed to create databases that are optimized for> rendering/tile/map-services.") (license license:asl2.0)))> +> +(define-public osm2pgsql> + (package> + (name "osm2pgsql")> + (version "0.96.0")
[..]
Toggle quote (2 lines)> + (license license:gpl2)))
Hm. The COPYING file says gpl2.The README is saying nothing about the license. A LICENSE file ismissing.Most .cpp/.h files do not have a header and do not clarify it.But these 3 do:
./parse-osmium.cpp: *No copyright* GPL (v2 or later)./parse-osmium.hpp: *No copyright* GPL (v2 or later)./tests/test-options-projection.cpp: GPL (v2 or later)
Is this (list gpl2 gpl2+) ?!
Found more:
./contrib/protozero/LICENSE.from_folly: *No copyright* Apache License (v2.0)./contrib/protozero/LICENSE.md: BSD 2-clause "Simplified" License./contrib/libosmium/osmium/*: BSL
Does it make sense/have you tried tounbundle protozero and libosmonium:
https://github.com/mapbox/protozerohttps://github.com/osmcode/libosmium
Either unbundle or add to copyright line.
Missing import:
#:use-module (gnu packages lua)
Otherwise, LGTM
Thanks,
Björn

-- Dipl.-Inf. Björn HöflingSoftware Developer (GIS, Java)http://www.bjoernhoefling.de/+49-176-666 875 06USt-IdNr: DE275885245
-----BEGIN PGP SIGNATURE-----Version: GnuPG v2
iEYEARECAAYFAluqcmUACgkQvyhstlk+X/0PwwCfRn7yDEjPhFlz6lTC7c1EPfSRqpQAnjIoPPs+iE1fLhF6TnMtFO8YdXrn=AF1g-----END PGP SIGNATURE-----

B
B
Björn Höfling wrote on 25 Sep 2018 19:39
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 32813@debbugs.gnu.org)
20180925193927.61740ea4@alma-ubu
On Sun, 23 Sep 2018 22:43:10 +0200Julien Lepiller <julien@lepiller.eu> wrote:
Toggle quote (20 lines)> * gnu/packages/geo.scm (osm2pgsql): New variable.> ---> gnu/packages/geo.scm | 30 ++++++++++++++++++++++++++++++> 1 file changed, 30 insertions(+)> > diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm> index 81bffcc88..efc68ea85 100644> --- a/gnu/packages/geo.scm> +++ b/gnu/packages/geo.scm> @@ -824,3 +824,33 @@ delivered to any client.")> files and imports the data into PostgreSQL/PostGIS databases. It is> designed to create databases that are optimized for> rendering/tile/map-services.") (license license:asl2.0)))> +> +(define-public osm2pgsql> + (package> + (name "osm2pgsql")
> + (build-system cmake-build-system)
Sorry, missed one more:
Import missing:
#:use-module (guix build-system cmake)

Björn
-----BEGIN PGP SIGNATURE-----Version: GnuPG v2
iEYEARECAAYFAluqctAACgkQvyhstlk+X/3eswCgmtKF1CdzkuHUA2vhbEkNdoFQE6QAni2++VKt5M7Wi4E7oaB6vmn+CyPG=K986-----END PGP SIGNATURE-----

B
B
Björn Höfling wrote on 25 Sep 2018 19:52
Re: [bug#32813] [PATCH 4/4] gnu: Add tippecanoe.
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 32813@debbugs.gnu.org)
20180925195201.0fe73098@alma-ubu
On Sun, 23 Sep 2018 22:43:11 +0200Julien Lepiller <julien@lepiller.eu> wrote:
Toggle quote (18 lines)> * gnu/packages/geo.scm (tippecanoe): New variable.> ---> gnu/packages/geo.scm | 32 ++++++++++++++++++++++++++++++++> 1 file changed, 32 insertions(+)> > diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm> index efc68ea85..ed3d922d1 100644> --- a/gnu/packages/geo.scm> +++ b/gnu/packages/geo.scm> @@ -854,3 +854,35 @@ to create databases that are optimized for> rendering/tile/map-services.") PostgreSQL / PostGIS database suitable> for applications like rendering into a map, geocoding with Nominatim,> or general analysis.") (license license:gpl2)))> +> +(define-public tippecanoe> + (package> + (name "tippecanoe")
[..]
Toggle quote (6 lines)> + (inputs> + `(("sqlite" ,sqlite)> + ("zlib" ,zlib)))> + (native-inputs> + `(("perl" ,perl)))
filters/limit-tiles-to-bbox uses perl, but perl is in native-inputs.Is this meant to be used only at compile-time?On the other hand, this file is not in the store item's bin directory,so it looks like it's fine that way.
Thanks for that series!
Björn
-----BEGIN PGP SIGNATURE-----Version: GnuPG v2
iEYEARECAAYFAluqdcIACgkQvyhstlk+X/0uXwCfXGawx0iHl1P2B42tUkAFSONnNEEAnROYZddyiJUIxeNUEb8IHEcXGA33=FGjT-----END PGP SIGNATURE-----

J
J
Julien Lepiller wrote on 29 Sep 2018 12:47
Re: [bug#32813] [PATCH] OSM-related packages
(address . 32813@debbugs.gnu.org)
20180929124719.44bd3122@lepiller.eu
Le Sun, 23 Sep 2018 22:39:52 +0200,Julien Lepiller <julien@lepiller.eu> a écrit :
Toggle quote (5 lines)> Hi,> > here are 4 OSM-related packages to import data from OSM and use it to> create vector tiles.
Pushed as be7c64ba2d82f6d800ad6577ff8e9e6306071977 -6f91223fd4889301a099f75ecc855031a300fcfe after addressing Björn'sremarks. I managed to unbundle libosmium and protozero, but not godependencies of imposm and tegola.
J
J
Julien Lepiller wrote on 29 Sep 2018 14:11
(address . 32813-done@debbugs.gnu.org)
20180929141133.1bf8ac01@lepiller.eu
Le Sat, 29 Sep 2018 12:47:19 +0200,Julien Lepiller <julien@lepiller.eu> a écrit :
Toggle quote (12 lines)> Le Sun, 23 Sep 2018 22:39:52 +0200,> Julien Lepiller <julien@lepiller.eu> a écrit :> > > Hi,> > > > here are 4 OSM-related packages to import data from OSM and use it> > to create vector tiles. > > Pushed as be7c64ba2d82f6d800ad6577ff8e9e6306071977 -> 6f91223fd4889301a099f75ecc855031a300fcfe after addressing Björn's> remarks. I managed to unbundle libosmium and protozero, but not go> dependencies of imposm and tegola.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 32813@debbugs.gnu.org