[PATCH 0/5] Add python-geopandas

  • Done
  • quality assurance status badge
Details
5 participants
  • Felix Gruber
  • Guillaume Le Vaillant
  • Ludovic Courtès
  • Maxime Devos
  • Xinglu Chen
Owner
unassigned
Submitted by
Felix Gruber
Severity
normal
F
F
Felix Gruber wrote on 26 Sep 2021 10:52
(address . guix-patches@gnu.org)(name . Felix Gruber)(address . felgru@posteo.net)
20210926085219.13547-1-felgru@posteo.net
This patchset adds Geopandas, an extension to work with geographic data
in Python's Pandas dataframe library.

Felix Gruber (5):
gnu: Add proj 7.2.1.
gnu: Add python-pyproj.
gnu: Add python-cligj.
gnu: Add python-fiona.
gnu: Add python-geopandas.

gnu/packages/geo.scm | 185 ++++++++++++++++++++++++++++++++++++
gnu/packages/python-xyz.scm | 26 +++++
2 files changed, 211 insertions(+)

--
2.30.2
F
F
Felix Gruber wrote on 26 Sep 2021 10:57
[PATCH 1/5] gnu: Add proj 7.2.1.
(name . Felix Gruber)(address . felgru@posteo.net)
20210926085733.14128-1-felgru@posteo.net
* gnu/packages/geo.scm (proj.7): New variable.
---
gnu/packages/geo.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 9d4a1a8955..c10b93d83f 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -511,6 +511,45 @@ fully fledged Spatial SQL capabilities.")
license:mpl1.1
license:public-domain))))
+(define-public proj.7
+ (package
+ (name "proj")
+ (version "7.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://download.osgeo.org/proj/proj-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "050apzdn0isxpsblys1shrl9ccli5vd32kgswlgx1imrbwpg915k"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags '("-DUSE_EXTERNAL_GTEST=ON")))
+ (inputs
+ `(("curl" ,curl)
+ ("libjpeg-turbo" ,libjpeg-turbo)
+ ("libtiff" ,libtiff)
+ ("sqlite" ,sqlite)))
+ (native-inputs
+ `(("googletest" ,googletest)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://proj.org/")
+ (synopsis "Coordinate transformation software")
+ (description
+ "Proj is a generic coordinate transformation software that transforms
+geospatial coordinates from one coordinate reference system (CRS) to another.
+This includes cartographic projections as well as geodetic transformations.
+PROJ includes command line applications for easy conversion of coordinates
+from text files or directly from user input. In addition, proj also exposes
+an application programming interface that lets developers use the
+functionality of proj in their own software.")
+ (license (list license:expat
+ ;; src/projections/patterson.cpp
+ license:asl2.0
+ ;; src/geodesic.*, src/tests/geodtest.cpp
+ license:x11))))
+
(define-public proj
(package
(name "proj")
--
2.30.2
F
F
Felix Gruber wrote on 26 Sep 2021 10:57
[PATCH 2/5] gnu: Add python-pyproj.
(name . Felix Gruber)(address . felgru@posteo.net)
20210926085733.14128-2-felgru@posteo.net
* gnu/packages/geo.scm (python-pyproj): New variable.
---
gnu/packages/geo.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index c10b93d83f..ee1c9c5674 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -93,6 +93,7 @@
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages python-check)
+ #:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
@@ -633,6 +634,46 @@ projections.")
;; cmake/*
license:boost1.0))))
+(define-public python-pyproj
+ (package
+ (name "python-pyproj")
+ (version "3.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyproj" version))
+ (sha256
+ (base32
+ "0xrqpy708qlyd7nqjra0dl7nvkqzaj9w0v7wq4j5pxazha9n14sa"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'set-proj-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((proj (assoc-ref inputs "proj")))
+ (setenv "PROJ_DIR" proj)
+ (substitute* "pyproj/datadir.py"
+ (("(internal_datadir = ).*$" all var)
+ (string-append var "Path(\"" proj "/share/proj\")\n")))
+ ))))))
+ (inputs
+ `(("proj" ,proj.7)))
+ (propagated-inputs
+ `(("python-certifi" ,python-certifi)))
+ (native-inputs
+ `(("python-cython" ,python-cython)
+ ("python-numpy" ,python-numpy)
+ ("python-pandas" ,python-pandas)
+ ("python-pytest" ,python-pytest)
+ ("python-xarray" ,python-xarray)))
+ (home-page "https://github.com/pyproj4/pyproj")
+ (synopsis
+ "Python interface to PROJ")
+ (description
+ "Python interface to PROJ (cartographic projections and coordinate transformations library)")
+ (license license:expat)))
+
(define-public mapnik
(package
(name "mapnik")
--
2.30.2
F
F
Felix Gruber wrote on 26 Sep 2021 10:57
[PATCH 3/5] gnu: Add python-cligj.
(name . Felix Gruber)(address . felgru@posteo.net)
20210926085733.14128-3-felgru@posteo.net
* gnu/packages/python-xyz.scm (python-cligj): New variable.
---
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 15a35cda17..97c9099e5c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -108,6 +108,7 @@
;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -3307,6 +3308,31 @@ with sensible defaults out of the box.")
(base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
(arguments `())))
+(define-public python-cligj
+ (package
+ (name "python-cligj")
+ (version "0.7.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cligj" version))
+ (sha256
+ (base32
+ "09vbkik6kyn6yrqzl2r74vaybjk8kjykvi975hy3fsrm4gb17g54"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-click" ,python-click)))
+ (native-inputs
+ `(("python-pytest-cov" ,python-pytest-cov)))
+ (home-page "https://github.com/mapbox/cligj")
+ (synopsis
+ "Click params for commmand line interfaces to GeoJSON")
+ (description
+ "cligj is for Python developers who create command line interfaces
+for geospatial data. cligj allows you to quickly build consistent,
+well-tested and interoperable CLIs for handling GeoJSON.")
+ (license license:bsd-3)))
+
(define-public python-vcversioner
(package
(name "python-vcversioner")
--
2.30.2
F
F
Felix Gruber wrote on 26 Sep 2021 10:57
[PATCH 4/5] gnu: Add python-fiona.
(name . Felix Gruber)(address . felgru@posteo.net)
20210926085733.14128-4-felgru@posteo.net
* gnu/packages/geo.scm (python-fiona): New variable.
---
gnu/packages/geo.scm | 64 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 64 insertions(+)

Toggle diff (77 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index ee1c9c5674..114677dc27 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -674,6 +674,70 @@ projections.")
"Python interface to PROJ (cartographic projections and coordinate transformations library)")
(license license:expat)))
+(define-public python-fiona
+ (package
+ (name "python-fiona")
+ (version "1.8.20")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "Fiona" version))
+ (sha256
+ (base32
+ "0fql7i7dg1xpbadmk8d26dwp91v7faixxc4wq14zg0kvhp9041d7"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'remove-local-fiona
+ (lambda _
+ ; This would otherwise interfere with finding the installed
+ ; fiona when running tests.
+ (delete-file-recursively "fiona")))
+ (replace 'check
+ (lambda* (#:key tests? outputs #:allow-other-keys)
+ (define (python-path dir)
+ (string-append dir "/lib/python"
+ ,(version-major+minor
+ (package-version python))
+ "/site-packages"))
+ (let ((out (assoc-ref outputs "out")))
+ (setenv "PYTHONPATH" (string-append (python-path out) ":"
+ (getenv "PYTHONPATH")))
+ (when tests?
+ (invoke "pytest" "-m" "not network and not wheel"))))))))
+ (inputs
+ `(("gdal" ,gdal)))
+ (propagated-inputs
+ `(("python-attrs" ,python-attrs)
+ ("python-certifi" ,python-certifi)
+ ("python-click" ,python-click)
+ ("python-click-plugins" ,python-click-plugins)
+ ("python-cligj" ,python-cligj)
+ ("python-munch" ,python-munch)
+ ("python-setuptools" ,python-setuptools)
+ ("python-six" ,python-six)
+ ("python-pytz" ,python-pytz)))
+ (native-inputs
+ `(("gdal" ,gdal) ; for gdal-config
+ ("python-boto3" ,python-boto3)
+ ("python-cython" ,python-cython)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)))
+ (home-page "http://github.com/Toblerity/Fiona")
+ (synopsis
+ "Fiona reads and writes spatial data files")
+ (description
+ "Fiona is GDAL’s neat and nimble vector API for Python programmers.
+Fiona is designed to be simple and dependable. It focuses on reading and
+writing data in standard Python IO style and relies upon familiar Python
+types and protocols such as files, dictionaries, mappings, and iterators
+instead of classes specific to OGR. Fiona can read and write real-world
+data using multi-layered GIS formats and zipped virtual file systems and
+integrates readily with other Python GIS packages such as pyproj, Rtree,
+and Shapely.")
+ (license license:bsd-3)))
+
(define-public mapnik
(package
(name "mapnik")
--
2.30.2
F
F
Felix Gruber wrote on 26 Sep 2021 10:57
[PATCH 5/5] gnu: Add python-geopandas.
(name . Felix Gruber)(address . felgru@posteo.net)
20210926085733.14128-5-felgru@posteo.net
* gnu/packages/geo.scm (python-geopandas): New variable.
---
gnu/packages/geo.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 114677dc27..2235fe93fb 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -738,6 +738,47 @@ integrates readily with other Python GIS packages such as pyproj, Rtree,
and Shapely.")
(license license:bsd-3)))
+(define-public python-geopandas
+ (package
+ (name "python-geopandas")
+ (version "0.9.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "geopandas" version))
+ (sha256
+ (base32
+ "02k389zyyjv51gd09c92vlr83sv46awdq0066jgh5i24vjs2m5v3"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? outputs #:allow-other-keys)
+ (when tests?
+ (invoke "pytest"
+ ; Disable test that fails with
+ ; NotImplementedError in pandas.
+ "-k" "not test_fillna_no_op_returns_copy"
+ ; Disable tests that require internet access.
+ "-m" "not web")))))))
+ (propagated-inputs
+ `(("python-fiona" ,python-fiona)
+ ("python-pandas" ,python-pandas)
+ ("python-pyproj" ,python-pyproj)
+ ("python-shapely" ,python-shapely)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "http://geopandas.org")
+ (synopsis "Geographic pandas extensions")
+ (description "The goal of GeoPandas is to make working with
+geospatial data in python easier. It combines the capabilities of
+pandas and shapely, providing geospatial operations in pandas and a
+high-level interface to multiple geometries to shapely. GeoPandas
+enables you to easily do operations in python that would otherwise
+require a spatial database such as PostGIS.")
+ (license license:bsd-3)))
+
(define-public mapnik
(package
(name "mapnik")
--
2.30.2
M
M
Maxime Devos wrote on 26 Sep 2021 18:53
Re: [bug#50812] [PATCH 4/5] gnu: Add python-fiona.
b12b7d8861349e48c4ffa5d16b3ea88808044013.camel@telenet.be
Felix Gruber schreef op zo 26-09-2021 om 08:57 [+0000]:
Toggle quote (4 lines)
> + (let ((out (assoc-ref outputs "out")))
> + (setenv "PYTHONPATH" (string-append (python-path out) ":"
> + (getenv "PYTHONPATH")))

(add-installed-pythonpath inputs outputs) might be useful here.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYVClgBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7p9BAP9UjITMsTmIfg68PhOcFlWVz3Al
MlyOzxQySFeo6tsY6wD+J9wHICLTd5w6ZVLC2jtSCKfkA02Wk2MNXifxXOlRwQc=
=6B00
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 26 Sep 2021 18:55
7ea318f7543719b66433d56fb1d00cf70c80464d.camel@telenet.be
Felix Gruber schreef op zo 26-09-2021 om 08:57 [+0000]:
Toggle quote (6 lines)
> + (define (python-path dir)
> + (string-append dir "/lib/python"
> + ,(version-major+minor
> + (package-version python))
> + "/site-packages"))

Maybe use the procedure 'site-packages' instead to simplify things.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYVCl/BccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uuDAP9o6DPbRZevJCpqXXZalRtY8+4t
tY7y3dxOVffBdGBywQEAia3i28rvpxp1+HpAzsml0l3L1mkLGSk2oEi2VFeCAAk=
=+Q89
-----END PGP SIGNATURE-----


F
F
Felix Gruber wrote on 26 Sep 2021 19:41
[PATCH v2 0/5] Add python-geopandas
(address . 50812@debbugs.gnu.org)
20210926174150.26146-1-felgru@posteo.net
This version of the patchset contains Maxime's proposed changes to the
fiona package.

Felix Gruber (5):
gnu: Add proj 7.2.1.
gnu: Add python-pyproj.
gnu: Add python-cligj.
gnu: Add python-fiona.
gnu: Add python-geopandas.

gnu/packages/geo.scm | 178 ++++++++++++++++++++++++++++++++++++
gnu/packages/python-xyz.scm | 26 ++++++
2 files changed, 204 insertions(+)

--
2.30.2
F
F
Felix Gruber wrote on 26 Sep 2021 19:41
[PATCH v2 1/5] gnu: Add proj 7.2.1.
(address . 50812@debbugs.gnu.org)
20210926174150.26146-2-felgru@posteo.net
* gnu/packages/geo.scm (proj.7): New variable.
---
gnu/packages/geo.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 9d4a1a8955..c10b93d83f 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -511,6 +511,45 @@ fully fledged Spatial SQL capabilities.")
license:mpl1.1
license:public-domain))))
+(define-public proj.7
+ (package
+ (name "proj")
+ (version "7.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://download.osgeo.org/proj/proj-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "050apzdn0isxpsblys1shrl9ccli5vd32kgswlgx1imrbwpg915k"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags '("-DUSE_EXTERNAL_GTEST=ON")))
+ (inputs
+ `(("curl" ,curl)
+ ("libjpeg-turbo" ,libjpeg-turbo)
+ ("libtiff" ,libtiff)
+ ("sqlite" ,sqlite)))
+ (native-inputs
+ `(("googletest" ,googletest)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://proj.org/")
+ (synopsis "Coordinate transformation software")
+ (description
+ "Proj is a generic coordinate transformation software that transforms
+geospatial coordinates from one coordinate reference system (CRS) to another.
+This includes cartographic projections as well as geodetic transformations.
+PROJ includes command line applications for easy conversion of coordinates
+from text files or directly from user input. In addition, proj also exposes
+an application programming interface that lets developers use the
+functionality of proj in their own software.")
+ (license (list license:expat
+ ;; src/projections/patterson.cpp
+ license:asl2.0
+ ;; src/geodesic.*, src/tests/geodtest.cpp
+ license:x11))))
+
(define-public proj
(package
(name "proj")
--
2.30.2
F
F
Felix Gruber wrote on 26 Sep 2021 19:41
[PATCH v2 2/5] gnu: Add python-pyproj.
(address . 50812@debbugs.gnu.org)
20210926174150.26146-3-felgru@posteo.net
* gnu/packages/geo.scm (python-pyproj): New variable.
---
gnu/packages/geo.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index c10b93d83f..ee1c9c5674 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -93,6 +93,7 @@
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages python-check)
+ #:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
@@ -633,6 +634,46 @@ projections.")
;; cmake/*
license:boost1.0))))
+(define-public python-pyproj
+ (package
+ (name "python-pyproj")
+ (version "3.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyproj" version))
+ (sha256
+ (base32
+ "0xrqpy708qlyd7nqjra0dl7nvkqzaj9w0v7wq4j5pxazha9n14sa"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'set-proj-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((proj (assoc-ref inputs "proj")))
+ (setenv "PROJ_DIR" proj)
+ (substitute* "pyproj/datadir.py"
+ (("(internal_datadir = ).*$" all var)
+ (string-append var "Path(\"" proj "/share/proj\")\n")))
+ ))))))
+ (inputs
+ `(("proj" ,proj.7)))
+ (propagated-inputs
+ `(("python-certifi" ,python-certifi)))
+ (native-inputs
+ `(("python-cython" ,python-cython)
+ ("python-numpy" ,python-numpy)
+ ("python-pandas" ,python-pandas)
+ ("python-pytest" ,python-pytest)
+ ("python-xarray" ,python-xarray)))
+ (home-page "https://github.com/pyproj4/pyproj")
+ (synopsis
+ "Python interface to PROJ")
+ (description
+ "Python interface to PROJ (cartographic projections and coordinate transformations library)")
+ (license license:expat)))
+
(define-public mapnik
(package
(name "mapnik")
--
2.30.2
F
F
Felix Gruber wrote on 26 Sep 2021 19:41
[PATCH v2 3/5] gnu: Add python-cligj.
(address . 50812@debbugs.gnu.org)
20210926174150.26146-4-felgru@posteo.net
* gnu/packages/python-xyz.scm (python-cligj): New variable.
---
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 15a35cda17..97c9099e5c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -108,6 +108,7 @@
;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -3307,6 +3308,31 @@ with sensible defaults out of the box.")
(base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
(arguments `())))
+(define-public python-cligj
+ (package
+ (name "python-cligj")
+ (version "0.7.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cligj" version))
+ (sha256
+ (base32
+ "09vbkik6kyn6yrqzl2r74vaybjk8kjykvi975hy3fsrm4gb17g54"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-click" ,python-click)))
+ (native-inputs
+ `(("python-pytest-cov" ,python-pytest-cov)))
+ (home-page "https://github.com/mapbox/cligj")
+ (synopsis
+ "Click params for commmand line interfaces to GeoJSON")
+ (description
+ "cligj is for Python developers who create command line interfaces
+for geospatial data. cligj allows you to quickly build consistent,
+well-tested and interoperable CLIs for handling GeoJSON.")
+ (license license:bsd-3)))
+
(define-public python-vcversioner
(package
(name "python-vcversioner")
--
2.30.2
F
F
Felix Gruber wrote on 26 Sep 2021 19:41
[PATCH v2 4/5] gnu: Add python-fiona.
(address . 50812@debbugs.gnu.org)
20210926174150.26146-5-felgru@posteo.net
* gnu/packages/geo.scm (python-fiona): New variable.
---
gnu/packages/geo.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)

Toggle diff (70 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index ee1c9c5674..e47f97bf8c 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -674,6 +674,63 @@ projections.")
"Python interface to PROJ (cartographic projections and coordinate transformations library)")
(license license:expat)))
+(define-public python-fiona
+ (package
+ (name "python-fiona")
+ (version "1.8.20")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "Fiona" version))
+ (sha256
+ (base32
+ "0fql7i7dg1xpbadmk8d26dwp91v7faixxc4wq14zg0kvhp9041d7"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'remove-local-fiona
+ (lambda _
+ ; This would otherwise interfere with finding the installed
+ ; fiona when running tests.
+ (delete-file-recursively "fiona")))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (add-installed-pythonpath inputs outputs)
+ (when tests?
+ (invoke "pytest" "-m" "not network and not wheel")))))))
+ (inputs
+ `(("gdal" ,gdal)))
+ (propagated-inputs
+ `(("python-attrs" ,python-attrs)
+ ("python-certifi" ,python-certifi)
+ ("python-click" ,python-click)
+ ("python-click-plugins" ,python-click-plugins)
+ ("python-cligj" ,python-cligj)
+ ("python-munch" ,python-munch)
+ ("python-setuptools" ,python-setuptools)
+ ("python-six" ,python-six)
+ ("python-pytz" ,python-pytz)))
+ (native-inputs
+ `(("gdal" ,gdal) ; for gdal-config
+ ("python-boto3" ,python-boto3)
+ ("python-cython" ,python-cython)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)))
+ (home-page "http://github.com/Toblerity/Fiona")
+ (synopsis
+ "Fiona reads and writes spatial data files")
+ (description
+ "Fiona is GDAL’s neat and nimble vector API for Python programmers.
+Fiona is designed to be simple and dependable. It focuses on reading and
+writing data in standard Python IO style and relies upon familiar Python
+types and protocols such as files, dictionaries, mappings, and iterators
+instead of classes specific to OGR. Fiona can read and write real-world
+data using multi-layered GIS formats and zipped virtual file systems and
+integrates readily with other Python GIS packages such as pyproj, Rtree,
+and Shapely.")
+ (license license:bsd-3)))
+
(define-public mapnik
(package
(name "mapnik")
--
2.30.2
F
F
Felix Gruber wrote on 26 Sep 2021 19:41
[PATCH v2 5/5] gnu: Add python-geopandas.
(address . 50812@debbugs.gnu.org)
20210926174150.26146-6-felgru@posteo.net
* gnu/packages/geo.scm (python-geopandas): New variable.
---
gnu/packages/geo.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index e47f97bf8c..8c2458ee0b 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -731,6 +731,47 @@ integrates readily with other Python GIS packages such as pyproj, Rtree,
and Shapely.")
(license license:bsd-3)))
+(define-public python-geopandas
+ (package
+ (name "python-geopandas")
+ (version "0.9.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "geopandas" version))
+ (sha256
+ (base32
+ "02k389zyyjv51gd09c92vlr83sv46awdq0066jgh5i24vjs2m5v3"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? outputs #:allow-other-keys)
+ (when tests?
+ (invoke "pytest"
+ ; Disable test that fails with
+ ; NotImplementedError in pandas.
+ "-k" "not test_fillna_no_op_returns_copy"
+ ; Disable tests that require internet access.
+ "-m" "not web")))))))
+ (propagated-inputs
+ `(("python-fiona" ,python-fiona)
+ ("python-pandas" ,python-pandas)
+ ("python-pyproj" ,python-pyproj)
+ ("python-shapely" ,python-shapely)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "http://geopandas.org")
+ (synopsis "Geographic pandas extensions")
+ (description "The goal of GeoPandas is to make working with
+geospatial data in python easier. It combines the capabilities of
+pandas and shapely, providing geospatial operations in pandas and a
+high-level interface to multiple geometries to shapely. GeoPandas
+enables you to easily do operations in python that would otherwise
+require a spatial database such as PostGIS.")
+ (license license:bsd-3)))
+
(define-public mapnik
(package
(name "mapnik")
--
2.30.2
X
X
Xinglu Chen wrote on 26 Sep 2021 22:34
Re: [bug#50812] [PATCH v2 1/5] gnu: Add proj 7.2.1.
87fstr6ppg.fsf@yoctocell.xyz
On Sun, Sep 26 2021, Felix Gruber wrote:

Toggle quote (15 lines)
> * gnu/packages/geo.scm (proj.7): New variable.
> ---
> gnu/packages/geo.scm | 39 +++++++++++++++++++++++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
> index 9d4a1a8955..c10b93d83f 100644
> --- a/gnu/packages/geo.scm
> +++ b/gnu/packages/geo.scm
> @@ -511,6 +511,45 @@ fully fledged Spatial SQL capabilities.")
> license:mpl1.1
> license:public-domain))))
>
> +(define-public proj.7

Hyphens are typically used to denote a specific version of a package,
e.g., ghc-8.8.

Toggle quote (28 lines)
> + (package
> + (name "proj")
> + (version "7.2.1")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (string-append "http://download.osgeo.org/proj/proj-"
> + version ".tar.gz"))
> + (sha256
> + (base32
> + "050apzdn0isxpsblys1shrl9ccli5vd32kgswlgx1imrbwpg915k"))))
> + (build-system cmake-build-system)
> + (arguments
> + `(#:configure-flags '("-DUSE_EXTERNAL_GTEST=ON")))
> + (inputs
> + `(("curl" ,curl)
> + ("libjpeg-turbo" ,libjpeg-turbo)
> + ("libtiff" ,libtiff)
> + ("sqlite" ,sqlite)))
> + (native-inputs
> + `(("googletest" ,googletest)
> + ("pkg-config" ,pkg-config)))
> + (home-page "https://proj.org/")
> + (synopsis "Coordinate transformation software")
> + (description
> + "Proj is a generic coordinate transformation software that transforms
> +geospatial coordinates from one coordinate reference system (CRS) to another.

Nit: I would use @acronym{CRS, coordinate reference system}.

Toggle quote (6 lines)
> +This includes cartographic projections as well as geodetic transformations.
> +PROJ includes command line applications for easy conversion of coordinates
> +from text files or directly from user input. In addition, proj also exposes
> +an application programming interface that lets developers use the
> +functionality of proj in their own software.")

The description includes three different spellings of the name---
“Proj”, “PROJ”, and “proj”. It would be good to keep things more consistent.
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFQ2VwVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5p5gP/14yDFYm7omuv7QBWgwSBTQrwuaW
whxgTtK6iE4NUjnb+3O+gJX3xWtVTnTKSmNDX85cnMo201mU897PZxx5AGgTmq4B
8BXGRQ4dXjPAFKadw2tu6oR0H/4U5KPqkiIhav06B7AHDUvXJVDh+bcu40Bgbsuv
EWsfzKAHRcV6nIE8F2RGubS5E9D/YlMiAWlgCgl81aIToHvUa5KQvyVuHmu10gPV
WsHCw4NvcDLHqo+R8tisl8Odfw9oAZ90Job6cqjygxQHrn1yAykVCTgvijPPLxqs
UZVSPcyj5k+Sjptq7LZv4hnAIF4LMgcUVK1xlfpW/hVAtqrG9sqf8q0lSMG/owfR
L0THJIBjuYGGbqPStTCNtFxGNPdyhHCIcaSZg6lcVvCD5jkX7QefRJaxBSyKWr8t
qGyE+gRMFFQj25l5aX5yINhOXwF1qya8h3DdUa6QJdcfBQyLydtWDWGHJwY1AWVh
/fhjhU3Wg3mMVBP74EPs3ID7DsMYJM3ECBsWcGxLiiiJSuvEWs9LSCd43MbHyDDY
U9Ch6saFOrVk4AEZaGf6f6+J+iNFygjEooQY6/ki1a9RWNxHXywZBq4CNpQDKiVZ
mIwG0V8sLv0wzEyLHG9UftMgG2l271ZUd//bDBjixOhZuDDSu84nGxrshzSzvtwA
o46wlvZ0Tx7Wejtf
=qeBS
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 26 Sep 2021 22:41
Re: [bug#50812] [PATCH v2 2/5] gnu: Add python-pyproj.
87czov6pee.fsf@yoctocell.xyz
On Sun, Sep 26 2021, Felix Gruber wrote:

Toggle quote (45 lines)
> * gnu/packages/geo.scm (python-pyproj): New variable.
> ---
> gnu/packages/geo.scm | 41 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
> index c10b93d83f..ee1c9c5674 100644
> --- a/gnu/packages/geo.scm
> +++ b/gnu/packages/geo.scm
> @@ -93,6 +93,7 @@
> #:use-module (gnu packages pulseaudio)
> #:use-module (gnu packages python)
> #:use-module (gnu packages python-check)
> + #:use-module (gnu packages python-crypto)
> #:use-module (gnu packages python-science)
> #:use-module (gnu packages python-web)
> #:use-module (gnu packages python-xyz)
> @@ -633,6 +634,46 @@ projections.")
> ;; cmake/*
> license:boost1.0))))
>
> +(define-public python-pyproj
> + (package
> + (name "python-pyproj")
> + (version "3.2.1")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (pypi-uri "pyproj" version))
> + (sha256
> + (base32
> + "0xrqpy708qlyd7nqjra0dl7nvkqzaj9w0v7wq4j5pxazha9n14sa"))))
> + (build-system python-build-system)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-after 'unpack 'set-proj-path
> + (lambda* (#:key inputs #:allow-other-keys)
> + (let ((proj (assoc-ref inputs "proj")))
> + (setenv "PROJ_DIR" proj)
> + (substitute* "pyproj/datadir.py"
> + (("(internal_datadir = ).*$" all var)
> + (string-append var "Path(\"" proj "/share/proj\")\n")))
> + ))))))

These brackets should not be on their own line.

Toggle quote (16 lines)
> + (inputs
> + `(("proj" ,proj.7)))
> + (propagated-inputs
> + `(("python-certifi" ,python-certifi)))
> + (native-inputs
> + `(("python-cython" ,python-cython)
> + ("python-numpy" ,python-numpy)
> + ("python-pandas" ,python-pandas)
> + ("python-pytest" ,python-pytest)
> + ("python-xarray" ,python-xarray)))
> + (home-page "https://github.com/pyproj4/pyproj")
> + (synopsis
> + "Python interface to PROJ")
> + (description
> + "Python interface to PROJ (cartographic projections and coordinate transformations library)")

Please keep lines to <=80 characters. The sentence is lacking a
subject and a period. I suggest

This package provides a Python interface to PROJ, a cartographic
projections and coordinate transformations library.
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFQ2ukVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5ljkP/AnVWSvUC+fZQHlEEn8Z0m0tA9Qb
fHwMpGV/XN4wTM371eT1lSs7MqmMaLzliCj1G4O0B7moLFC0nFmSy2aQJFkE8YY+
5zzFQMtjuP7TySd6WH+4AmY0YCTdHkXsFJn1FJ0SNMu34RhRhOexujNcwFSi6Ry9
ObXvwSAJs2my0SA+0T51coDL4um/tfaYd0BkuqyuWC9ZRAXTPQ8Dws5MUhhCWNFj
jQTtFX1K3upviqqWoUpMULP3tLVLn63QHIbNlbExVWhdD1PMPEUtnTAY8Y17tEvS
jTzeqBLMWIve7V/YlKvhNwrpXqKQXp2muv5WqcPsLc2iBxsURKD5oLIsI8IPhSPT
SevHkCgsT2NR6ti6wr0IpbBGRq4mFQcHGZlxT1sroBDRyNHbFlJUDwYbP+J/sV56
1Qpm+Ta27IzjK6YTM8H8fo9eXGPO2B7k9i9rqjOYoa8H8+r+/DjTrffnsJCems7v
8nIX5yT25tp2yUPHtB3mbo8Wihf2Gn5x93M7GKHtnxE9KBJoefCgA4ed0bO2dvZs
OWZMNXDCmAzlHuK3LUyoRxjBZm+ZNk+RIrpdb+uHFn0BjecZ7Wi0B7hZE8VaniL8
fKSRIfbMwNGzAXXQypCwETpn2i57bZ+faRzbfgL4qTpeThkGgv9EUDH/Z7afbYUH
UuqLKvE1C7CsdVM0
=bQJr
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 26 Sep 2021 22:47
Re: [bug#50812] [PATCH v2 4/5] gnu: Add python-fiona.
87a6jz6p4d.fsf@yoctocell.xyz
On Sun, Sep 26 2021, Felix Gruber wrote:

Toggle quote (58 lines)
> * gnu/packages/geo.scm (python-fiona): New variable.
> ---
> gnu/packages/geo.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 57 insertions(+)
>
> diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
> index ee1c9c5674..e47f97bf8c 100644
> --- a/gnu/packages/geo.scm
> +++ b/gnu/packages/geo.scm
> @@ -674,6 +674,63 @@ projections.")
> "Python interface to PROJ (cartographic projections and coordinate transformations library)")
> (license license:expat)))
>
> +(define-public python-fiona
> + (package
> + (name "python-fiona")
> + (version "1.8.20")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (pypi-uri "Fiona" version))
> + (sha256
> + (base32
> + "0fql7i7dg1xpbadmk8d26dwp91v7faixxc4wq14zg0kvhp9041d7"))))
> + (build-system python-build-system)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (add-before 'check 'remove-local-fiona
> + (lambda _
> + ; This would otherwise interfere with finding the installed
> + ; fiona when running tests.
> + (delete-file-recursively "fiona")))
> + (replace 'check
> + (lambda* (#:key tests? inputs outputs #:allow-other-keys)
> + (add-installed-pythonpath inputs outputs)
> + (when tests?
> + (invoke "pytest" "-m" "not network and not wheel")))))))
> + (inputs
> + `(("gdal" ,gdal)))
> + (propagated-inputs
> + `(("python-attrs" ,python-attrs)
> + ("python-certifi" ,python-certifi)
> + ("python-click" ,python-click)
> + ("python-click-plugins" ,python-click-plugins)
> + ("python-cligj" ,python-cligj)
> + ("python-munch" ,python-munch)
> + ("python-setuptools" ,python-setuptools)
> + ("python-six" ,python-six)
> + ("python-pytz" ,python-pytz)))
> + (native-inputs
> + `(("gdal" ,gdal) ; for gdal-config
> + ("python-boto3" ,python-boto3)
> + ("python-cython" ,python-cython)
> + ("python-pytest" ,python-pytest)
> + ("python-pytest-cov" ,python-pytest-cov)))
> + (home-page "http://github.com/Toblerity/Fiona")

Why not HTTPS?

Toggle quote (5 lines)
> + (synopsis
> + "Fiona reads and writes spatial data files")
> + (description
> + "Fiona is GDAL’s neat and nimble vector API for Python programmers.
> +Fiona is designed to be simple and dependable. It focuses on reading and
^
There should be two spaces after a period.

Toggle quote (3 lines)
> +writing data in standard Python IO style and relies upon familiar Python
> +types and protocols such as files, dictionaries, mappings, and iterators
> +instead of classes specific to OGR. Fiona can read and write real-world
^
Likewise.

Toggle quote (10 lines)
> +data using multi-layered GIS formats and zipped virtual file systems and
> +integrates readily with other Python GIS packages such as pyproj, Rtree,
> +and Shapely.")
> + (license license:bsd-3)))
> +
> (define-public mapnik
> (package
> (name "mapnik")
> --
> 2.30.2
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFQ3FIVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5QAEP/2uq4lezY3ijiy8UCXieWA+Lncc2
WYdyUX2Ra3PmOzQ4iuE/6KHKL3Widw87+dHWKDJMFgNmDnJURqWqmk23Ml4Uwwcv
PGVnSXmALn5Hj7OzJQJYLpsBsiuX3f6bPj8EhvQAHVLSpnTQWTssOW8Ys5b2IRsB
LdElrNWbLcrYR3li8jTpp5qzU1j21fTGd9Bt5ZFb3Oqv6zTD00bJFya2wjMWe1fE
BGpKyVM9uWu7jeZg8IuYfWxlhKsK2icTpeeuH7880UpbRuMTKgNRMnC0gt0hepEc
HMZbDnS5ScL7mPHJ31gqSjJoge/8tmWDwpjwxfFTWJziORAJJdLo4nvV4rMKSxx1
V9HY09NIZanatDMMnZxOBWR5Y7hRGgR6K5zYfkLnv0lkHlwoPkibs80HRoiGRd7J
aESc3DWxtJ8HJ3aZiCGJM8WktrOaV/a11hgedEjD2uA4dsnGStDawQbmgKDmQOgs
kGuh1S1Q3V5r9FPZckhXmaNKU4ulSmz/OhY2GagQiQRhY4qPHz56DRMgAyCzgqTK
ex6UBdQR5iqx3BT7YHx3dyi9fctvgZyeCsoxF9g0AusS8ZtBtp/2LrMfMW9IqQ1o
EoR9al19cDLkpwpbf6h2zTic+HY1ZvAXBwf+LKccY4UCE2UCZkCR+KrkqQXF+gPn
NJT/7OxZzWMFZsg3
=TU2T
-----END PGP SIGNATURE-----

X
X
Xinglu Chen wrote on 26 Sep 2021 22:51
Re: [bug#50812] [PATCH v2 5/5] gnu: Add python-geopandas.
877df36own.fsf@yoctocell.xyz
On Sun, Sep 26 2021, Felix Gruber wrote:

Toggle quote (31 lines)
> * gnu/packages/geo.scm (python-geopandas): New variable.
> ---
> gnu/packages/geo.scm | 41 +++++++++++++++++++++++++++++++++++++++++
> 1 file changed, 41 insertions(+)
>
> diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
> index e47f97bf8c..8c2458ee0b 100644
> --- a/gnu/packages/geo.scm
> +++ b/gnu/packages/geo.scm
> @@ -731,6 +731,47 @@ integrates readily with other Python GIS packages such as pyproj, Rtree,
> and Shapely.")
> (license license:bsd-3)))
>
> +(define-public python-geopandas
> + (package
> + (name "python-geopandas")
> + (version "0.9.0")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (pypi-uri "geopandas" version))
> + (sha256
> + (base32
> + "02k389zyyjv51gd09c92vlr83sv46awdq0066jgh5i24vjs2m5v3"))))
> + (build-system python-build-system)
> + (arguments
> + '(#:phases
> + (modify-phases %standard-phases
> + (replace 'check
> + (lambda* (#:key tests? outputs #:allow-other-keys)

The ‘outputs’ argument isn’t used

Toggle quote (8 lines)
> + (when tests?
> + (invoke "pytest"
> + ; Disable test that fails with
> + ; NotImplementedError in pandas.
> + "-k" "not test_fillna_no_op_returns_copy"
> + ; Disable tests that require internet access.
> + "-m" "not web")))))))

The indentation for the (when ...) form looks a bit off.

Toggle quote (13 lines)
> + (propagated-inputs
> + `(("python-fiona" ,python-fiona)
> + ("python-pandas" ,python-pandas)
> + ("python-pyproj" ,python-pyproj)
> + ("python-shapely" ,python-shapely)))
> + (native-inputs
> + `(("python-pytest" ,python-pytest)))
> + (home-page "http://geopandas.org")
> + (synopsis "Geographic pandas extensions")
> + (description "The goal of GeoPandas is to make working with
> +geospatial data in python easier. It combines the capabilities of
> +pandas and shapely, providing geospatial operations in pandas and a

“pandas” should probably be capitalized.

Toggle quote (3 lines)
> +high-level interface to multiple geometries to shapely. GeoPandas
> +enables you to easily do operations in python that would otherwise

“python” should also be capitalized.

Toggle quote (8 lines)
> +require a spatial database such as PostGIS.")
> + (license license:bsd-3)))
> +
> (define-public mapnik
> (package
> (name "mapnik")
> --
> 2.30.2
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFQ3WgVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5OXkP+weBBA1UHDL5sHan+BElhZc5mjKk
37afKZGgV04Qb0NnrKnWgS3x/bY205K2KF4Yz7D4oEzm0/krYUhvk8zbD16L4uuo
/3CoGng3weVAzw+IldTdp919rZORcbys1mxIRA57hz12RUnCzhnOhGVBXMeKm/QY
RpDKLpfhFBeXsGuzqIBJTSpf76YH2e5jtL+fmQv3LQIJK9oSZPznoSenNSxd52LA
o7x0qNfQ4rvsN3VYdpApGEBSk+DSrrLiu/kiQlP/gSFGkmsjxVfrRaDJG0EDUnRD
AYie8gsLZ4B4i1NMLLqQ015EzuLks7oHWbAr+VZj39IBYgXJaIbVwlwVh9bDBhIA
LGY35rcFe1kPFhR4VxGjvp/bthRTyU4cowJmA1GYIlnPsoMtfGsLXcZq4ugOXHWY
L5R82IImkuNd1A8LIa2lfTRt8mEQRvUjN1Ush8EEF7sruVzVLsv4a2GKhQf/aUZF
kmXuaMWonkT2zE1PQ1fRWzoV0bAvr/kCL8yes9ps79WGMfZevD7Ex78DPYmOcch4
oXOU+Q6HZDXCWmxLhG9xgyhVwl/VWa1LsYNP+pQhf363yLs21Md4458ZjLR1i88g
bbNDqeFVQtGVfBE0iH2xj4a2/P0XlSP/Ld1Lm4z53DE/n3fUuOwa9kn/7SDuGpI1
IEpTG2azrA0vgu02
=DjFe
-----END PGP SIGNATURE-----

F
F
Felix Gruber wrote on 27 Sep 2021 13:18
Re: [bug#50812] [PATCH v2 1/5] gnu: Add proj 7.2.1.
(name . Maxime Devos)(address . maximedevos@telenet.be)
5239b8dc-39b8-3402-041e-1066da2220e8@posteo.net
On 9/26/21 10:34 PM, Xinglu Chen wrote:
Toggle quote (20 lines)
> On Sun, Sep 26 2021, Felix Gruber wrote:
>
>> * gnu/packages/geo.scm (proj.7): New variable.
>> ---
>> gnu/packages/geo.scm | 39 +++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 39 insertions(+)
>>
>> diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
>> index 9d4a1a8955..c10b93d83f 100644
>> --- a/gnu/packages/geo.scm
>> +++ b/gnu/packages/geo.scm
>> @@ -511,6 +511,45 @@ fully fledged Spatial SQL capabilities.")
>> license:mpl1.1
>> license:public-domain))))
>>
>> +(define-public proj.7
>
> Hyphens are typically used to denote a specific version of a package,
> e.g., ghc-8.8.

I've named the package proj.7 as there is already a proj.4 package for
an old API-incompatible version of proj. But you're right that this is
inconsistent with how most version-specific packages are named.

Maybe we should rename proj.4? I wonder if there was a reason for naming
it this way in the first place?

Cheers,
Felix
F
F
Felix Gruber wrote on 27 Sep 2021 13:24
[PATCH v3 0/6] Add python-geopandas
(address . 50812@debbugs.gnu.org)
20210927112457.2118-1-felgru@posteo.net
This version of the patchset incorporates all of Xinglu Chen's proposed
changes, except for renaming proj.7 to proj-7. I've keept the name
proj.7 to be consistent with the name of the existing proj.4 package.

Felix Gruber (6):
gnu: Add proj 7.2.1.
gnu: Add python-pyproj.
gnu: Add python-cligj.
gnu: Add python-fiona.
gnu: Add python-geopandas.
gnu: Improve description of proj packages.

gnu/packages/geo.scm | 190 ++++++++++++++++++++++++++++++++++--
gnu/packages/python-xyz.scm | 26 +++++
2 files changed, 210 insertions(+), 6 deletions(-)

--
2.30.2
F
F
Felix Gruber wrote on 27 Sep 2021 13:24
[PATCH v3 1/6] gnu: Add proj 7.2.1.
(address . 50812@debbugs.gnu.org)
20210927112457.2118-2-felgru@posteo.net
* gnu/packages/geo.scm (proj.7): New variable.
---
gnu/packages/geo.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (52 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 9d4a1a8955..c10b93d83f 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -511,6 +511,45 @@ fully fledged Spatial SQL capabilities.")
license:mpl1.1
license:public-domain))))
+(define-public proj.7
+ (package
+ (name "proj")
+ (version "7.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "http://download.osgeo.org/proj/proj-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "050apzdn0isxpsblys1shrl9ccli5vd32kgswlgx1imrbwpg915k"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags '("-DUSE_EXTERNAL_GTEST=ON")))
+ (inputs
+ `(("curl" ,curl)
+ ("libjpeg-turbo" ,libjpeg-turbo)
+ ("libtiff" ,libtiff)
+ ("sqlite" ,sqlite)))
+ (native-inputs
+ `(("googletest" ,googletest)
+ ("pkg-config" ,pkg-config)))
+ (home-page "https://proj.org/")
+ (synopsis "Coordinate transformation software")
+ (description
+ "Proj is a generic coordinate transformation software that transforms
+geospatial coordinates from one coordinate reference system (CRS) to another.
+This includes cartographic projections as well as geodetic transformations.
+PROJ includes command line applications for easy conversion of coordinates
+from text files or directly from user input. In addition, proj also exposes
+an application programming interface that lets developers use the
+functionality of proj in their own software.")
+ (license (list license:expat
+ ;; src/projections/patterson.cpp
+ license:asl2.0
+ ;; src/geodesic.*, src/tests/geodtest.cpp
+ license:x11))))
+
(define-public proj
(package
(name "proj")
--
2.30.2
F
F
Felix Gruber wrote on 27 Sep 2021 13:24
[PATCH v3 2/6] gnu: Add python-pyproj.
(address . 50812@debbugs.gnu.org)
20210927112457.2118-3-felgru@posteo.net
* gnu/packages/geo.scm (python-pyproj): New variable.
---
gnu/packages/geo.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index c10b93d83f..cf1f737b7d 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -93,6 +93,7 @@
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages python-check)
+ #:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
@@ -633,6 +634,46 @@ projections.")
;; cmake/*
license:boost1.0))))
+(define-public python-pyproj
+ (package
+ (name "python-pyproj")
+ (version "3.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyproj" version))
+ (sha256
+ (base32
+ "0xrqpy708qlyd7nqjra0dl7nvkqzaj9w0v7wq4j5pxazha9n14sa"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'set-proj-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((proj (assoc-ref inputs "proj")))
+ (setenv "PROJ_DIR" proj)
+ (substitute* "pyproj/datadir.py"
+ (("(internal_datadir = ).*$" all var)
+ (string-append var "Path(\"" proj "/share/proj\")\n")))))))))
+ (inputs
+ `(("proj" ,proj.7)))
+ (propagated-inputs
+ `(("python-certifi" ,python-certifi)))
+ (native-inputs
+ `(("python-cython" ,python-cython)
+ ("python-numpy" ,python-numpy)
+ ("python-pandas" ,python-pandas)
+ ("python-pytest" ,python-pytest)
+ ("python-xarray" ,python-xarray)))
+ (home-page "https://github.com/pyproj4/pyproj")
+ (synopsis
+ "Python interface to PROJ")
+ (description
+ "This package provides a Python interface to PROJ, a cartographic
+projections and coordinate transformations library.")
+ (license license:expat)))
+
(define-public mapnik
(package
(name "mapnik")
--
2.30.2
F
F
Felix Gruber wrote on 27 Sep 2021 13:24
[PATCH v3 3/6] gnu: Add python-cligj.
(address . 50812@debbugs.gnu.org)
20210927112457.2118-4-felgru@posteo.net
* gnu/packages/python-xyz.scm (python-cligj): New variable.
---
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 86b1cdc2b1..91740cd0f4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -108,6 +108,7 @@
;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -3308,6 +3309,31 @@ with sensible defaults out of the box.")
(base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
(arguments `())))
+(define-public python-cligj
+ (package
+ (name "python-cligj")
+ (version "0.7.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cligj" version))
+ (sha256
+ (base32
+ "09vbkik6kyn6yrqzl2r74vaybjk8kjykvi975hy3fsrm4gb17g54"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-click" ,python-click)))
+ (native-inputs
+ `(("python-pytest-cov" ,python-pytest-cov)))
+ (home-page "https://github.com/mapbox/cligj")
+ (synopsis
+ "Click params for commmand line interfaces to GeoJSON")
+ (description
+ "cligj is for Python developers who create command line interfaces
+for geospatial data. cligj allows you to quickly build consistent,
+well-tested and interoperable CLIs for handling GeoJSON.")
+ (license license:bsd-3)))
+
(define-public python-vcversioner
(package
(name "python-vcversioner")
--
2.30.2
F
F
Felix Gruber wrote on 27 Sep 2021 13:24
[PATCH v3 5/6] gnu: Add python-geopandas.
(address . 50812@debbugs.gnu.org)
20210927112457.2118-6-felgru@posteo.net
* gnu/packages/geo.scm (python-geopandas): New variable.
---
gnu/packages/geo.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index c4cea0fa3a..2e9c6b6c8f 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -731,6 +731,47 @@ systems and integrates readily with other Python GIS packages such as
pyproj, Rtree, and Shapely.")
(license license:bsd-3)))
+(define-public python-geopandas
+ (package
+ (name "python-geopandas")
+ (version "0.9.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "geopandas" version))
+ (sha256
+ (base32
+ "02k389zyyjv51gd09c92vlr83sv46awdq0066jgh5i24vjs2m5v3"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest"
+ ; Disable test that fails with
+ ; NotImplementedError in pandas.
+ "-k" "not test_fillna_no_op_returns_copy"
+ ; Disable tests that require internet access.
+ "-m" "not web")))))))
+ (propagated-inputs
+ `(("python-fiona" ,python-fiona)
+ ("python-pandas" ,python-pandas)
+ ("python-pyproj" ,python-pyproj)
+ ("python-shapely" ,python-shapely)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "http://geopandas.org")
+ (synopsis "Geographic pandas extensions")
+ (description "The goal of GeoPandas is to make working with
+geospatial data in Python easier. It combines the capabilities of
+Pandas and Shapely, providing geospatial operations in Pandas and a
+high-level interface to multiple geometries to Shapely. GeoPandas
+enables you to easily do operations in Python that would otherwise
+require a spatial database such as PostGIS.")
+ (license license:bsd-3)))
+
(define-public mapnik
(package
(name "mapnik")
--
2.30.2
F
F
Felix Gruber wrote on 27 Sep 2021 13:24
[PATCH v3 6/6] gnu: Improve description of proj packages.
(address . 50812@debbugs.gnu.org)
20210927112457.2118-7-felgru@posteo.net
* gnu/packages/geo.scm (proj, proj.7)[description]: Consistently call
the package Proj, instead of Proj, PROJ or proj.
Use @acronym to define CRS.
---
gnu/packages/geo.scm | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

Toggle diff (44 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 2e9c6b6c8f..d8af4f71f3 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -539,12 +539,12 @@ fully fledged Spatial SQL capabilities.")
(synopsis "Coordinate transformation software")
(description
"Proj is a generic coordinate transformation software that transforms
-geospatial coordinates from one coordinate reference system (CRS) to another.
-This includes cartographic projections as well as geodetic transformations.
-PROJ includes command line applications for easy conversion of coordinates
-from text files or directly from user input. In addition, proj also exposes
-an application programming interface that lets developers use the
-functionality of proj in their own software.")
+geospatial coordinates from one @acronym{CRS, coordinate reference system}
+to another. This includes cartographic projections as well as geodetic
+transformations. Proj includes command line applications for easy
+conversion of coordinates from text files or directly from user input.
+In addition, Proj also exposes an application programming interface that
+lets developers use the functionality of Proj in their own software.")
(license (list license:expat
;; src/projections/patterson.cpp
license:asl2.0
@@ -572,12 +572,12 @@ functionality of proj in their own software.")
(synopsis "Coordinate transformation software")
(description
"Proj is a generic coordinate transformation software that transforms
-geospatial coordinates from one coordinate reference system (CRS) to another.
-This includes cartographic projections as well as geodetic transformations.
-PROJ includes command line applications for easy conversion of coordinates
-from text files or directly from user input. In addition, proj also exposes
-an application programming interface that lets developers use the
-functionality of proj in their own software.")
+geospatial coordinates from one @acronym{CRS, coordinate reference system}
+to another. This includes cartographic projections as well as geodetic
+transformations. Proj includes command line applications for easy
+conversion of coordinates from text files or directly from user input.
+In addition, Proj also exposes an application programming interface that
+lets developers use the functionality of Proj in their own software.")
(license (list license:expat
;; src/projections/patterson.cpp
license:asl2.0
--
2.30.2
F
F
Felix Gruber wrote on 27 Sep 2021 13:24
[PATCH v3 4/6] gnu: Add python-fiona.
(address . 50812@debbugs.gnu.org)
20210927112457.2118-5-felgru@posteo.net
* gnu/packages/geo.scm (python-fiona): New variable.
---
gnu/packages/geo.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)

Toggle diff (70 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index cf1f737b7d..c4cea0fa3a 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -674,6 +674,63 @@ projections.")
projections and coordinate transformations library.")
(license license:expat)))
+(define-public python-fiona
+ (package
+ (name "python-fiona")
+ (version "1.8.20")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "Fiona" version))
+ (sha256
+ (base32
+ "0fql7i7dg1xpbadmk8d26dwp91v7faixxc4wq14zg0kvhp9041d7"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'remove-local-fiona
+ (lambda _
+ ; This would otherwise interfere with finding the installed
+ ; fiona when running tests.
+ (delete-file-recursively "fiona")))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (add-installed-pythonpath inputs outputs)
+ (when tests?
+ (invoke "pytest" "-m" "not network and not wheel")))))))
+ (inputs
+ `(("gdal" ,gdal)))
+ (propagated-inputs
+ `(("python-attrs" ,python-attrs)
+ ("python-certifi" ,python-certifi)
+ ("python-click" ,python-click)
+ ("python-click-plugins" ,python-click-plugins)
+ ("python-cligj" ,python-cligj)
+ ("python-munch" ,python-munch)
+ ("python-setuptools" ,python-setuptools)
+ ("python-six" ,python-six)
+ ("python-pytz" ,python-pytz)))
+ (native-inputs
+ `(("gdal" ,gdal) ; for gdal-config
+ ("python-boto3" ,python-boto3)
+ ("python-cython" ,python-cython)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)))
+ (home-page "https://github.com/Toblerity/Fiona")
+ (synopsis
+ "Fiona reads and writes spatial data files")
+ (description
+ "Fiona is GDAL’s neat and nimble vector API for Python programmers.
+Fiona is designed to be simple and dependable. It focuses on reading
+and writing data in standard Python IO style and relies upon familiar
+Python types and protocols such as files, dictionaries, mappings, and
+iterators instead of classes specific to OGR. Fiona can read and write
+real-world data using multi-layered GIS formats and zipped virtual file
+systems and integrates readily with other Python GIS packages such as
+pyproj, Rtree, and Shapely.")
+ (license license:bsd-3)))
+
(define-public mapnik
(package
(name "mapnik")
--
2.30.2
X
X
Xinglu Chen wrote on 27 Sep 2021 14:36
Re: [bug#50812] [PATCH v2 1/5] gnu: Add proj 7.2.1.
(name . Maxime Devos)(address . maximedevos@telenet.be)
871r5a6vrb.fsf@yoctocell.xyz
On Mon, Sep 27 2021, Felix Gruber wrote:

Toggle quote (28 lines)
> On 9/26/21 10:34 PM, Xinglu Chen wrote:
>> On Sun, Sep 26 2021, Felix Gruber wrote:
>>
>>> * gnu/packages/geo.scm (proj.7): New variable.
>>> ---
>>> gnu/packages/geo.scm | 39 +++++++++++++++++++++++++++++++++++++++
>>> 1 file changed, 39 insertions(+)
>>>
>>> diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
>>> index 9d4a1a8955..c10b93d83f 100644
>>> --- a/gnu/packages/geo.scm
>>> +++ b/gnu/packages/geo.scm
>>> @@ -511,6 +511,45 @@ fully fledged Spatial SQL capabilities.")
>>> license:mpl1.1
>>> license:public-domain))))
>>>
>>> +(define-public proj.7
>>
>> Hyphens are typically used to denote a specific version of a package,
>> e.g., ghc-8.8.
>
> I've named the package proj.7 as there is already a proj.4 package for
> an old API-incompatible version of proj. But you're right that this is
> inconsistent with how most version-specific packages are named.
>
> Maybe we should rename proj.4? I wonder if there was a reason for naming
> it this way in the first place?

Yes, I think renaming it to ‘proj-4’ would be a good idea.
-----BEGIN PGP SIGNATURE-----

iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmFRurgVHHB1YmxpY0B5
b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5pvwP/0cdjgvHc2V0JDLXEzVt2TpkFslq
hvW17qoij3WVE2Jgg1ff2osMFZjx7bZXJtDRo7FMOWP7uK5kQPY89/OvttlqAVwb
m0V82OL4rOtABdN7wMkFYoBM5Wbfi5ysKJ84T08bNOAuKppAxHXhVBWoao9dtha2
wOhUORe2NcNVgwO0Co9BYGvQfViXVsjM5t6DqzMSD8WHDSBC3lflsOeGCENtWR5q
/fOMlfapsis8OxbBsAaqU4BYLyttYsbdhBKkEmz1Fa+jnZtyH/1uS6MktRuPkEWJ
csE4C19Xs7IkBrhSmoQdsuTAq3JqoJbXlcQElqKlIg4Pm6ZO02BFgKRIwImZZB23
xsM+5JRJmf0nV7Z/wyRiVOgpGxc4gaBvxPx0g7354QGtARcFsFFFu6BJKazFB9g3
8egKiBZHidub37MRU+wUhd/RYTc+EX/kmL+SgOOhu3HXqWhimCcoUYl79t50fYiL
S4EaoxOZvdfpIra6xslQGKIA19MXmYfJwKvk4bhBX1qnB11QPEhoZyLTMb97BhuO
8w2tUbAPVBfAyR8ChgcTTBUy7rjtRzBXUQaOANnFeAUsjaWUjFNQUzMSvw2BE1cW
87gRSz9a5JTrit5KP/2j6WuwQNgsxN8Kq6ITZoXWODLLHmaRCtuaJwRJEuCM7nDQ
gLV2fI97fLnRZKXo
=i7k4
-----END PGP SIGNATURE-----

G
G
Guillaume Le Vaillant wrote on 27 Sep 2021 14:49
(name . Felix Gruber)(address . felgru@posteo.net)
87pmsugot3.fsf@kitej
Toggle quote (7 lines)
> On Sun, Sep 26 2021, Felix Gruber wrote:
>
>> * gnu/packages/geo.scm (proj.7): New variable.
>> ---
>> gnu/packages/geo.scm | 39 +++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 39 insertions(+)

Hi,

Instead of adding a proj-7 package, wouldn't it be possible to update
the proj package (which is currently at version 6.3.1).

Also, according to [1], the current version of proj is 8.1.1. Can't the
newer version be used instead of 7.2.1?

-----BEGIN PGP SIGNATURE-----

iIUEAREKAC0WIQTLxZxm7Ce5cXlAaz5r6CCK3yH+PwUCYVG/aA8cZ2x2QHBvc3Rl
by5uZXQACgkQa+ggit8h/j+n6gEAn9V6E3WoWCct7ahm4th3VaX51/SafRBnr367
KPSS6gQA/0xGQg83eo5AKdiKooTdKBB5F/E+/AVmkJarEB/+4d1m
=yBR1
-----END PGP SIGNATURE-----

F
F
Felix Gruber wrote on 28 Sep 2021 08:26
(name . Guillaume Le Vaillant)(address . glv@posteo.net)
1aecf757-cf8b-261c-1427-f54b3af9df76@posteo.net
On 9/27/21 2:49 PM, Guillaume Le Vaillant wrote:
Toggle quote (5 lines)
> Hi,
>
> Instead of adding a proj-7 package, wouldn't it be possible to update
> the proj package (which is currently at version 6.3.1).

You're right, that works. I've updated the proj package to 7.2.1 and of
the packages depending on proj (obtained with `guix refresh -l proj`)
all but the following two build: python-hyperkitty and itk-snap.
I've checked that those two packages already fail to build with proj
6.3.1 due to build failures in non-proj-related dependencies.

It thus seems safe to update proj directly instead of adding a new
proj-7 package.

Toggle quote (5 lines)
> Also, according to [1], the current version of proj is 8.1.1. Can't the
> newer version be used instead of 7.2.1?
>
> [1] https://proj.org/download.html

Updating to proj 8.1.1 unfortunately breaks many dependent packages as
proj 8.0.1 removed the deprecated proj_api.h API which apparently is
still widely used.


After updating proj to 8.1.1 the following dependencies failed to build:

* `/gnu/store/004411fgpblva5gp33xc6l7ri93snsk3-vxl-2.0.2.drv'
* `/gnu/store/1p04p9zk2n4p78izl77n4d3bm15pn7xj-qmapshack-1.15.2.drv'
* `/gnu/store/3lvgc4vbrjck0q55sac038pm4r8674mp-itk-snap-3.8.0.drv'
* `/gnu/store/49f67f3lxfsnpph9qaamwf5jw4dz02i4-saga-7.9.0.drv'
* `/gnu/store/547lhnc9w46iwx6v6ysr0ij7jjmgd7d9-r-hierfstat-0.5-7.drv'
* `/gnu/store/7rjgcsmrpaxgm80nsaka1hgabhk20iq2-r-rastervis-0.50.3.drv'
* `/gnu/store/8r4d9gis8bxxh78b7v3di9w7jfbjp81g-r-zonebuilder-0.0.2.drv'
* `/gnu/store/agv23snqvrdf92pk8rw3wfxp1vb4x9rr-r-tmaptools-3.1-1.drv'
*
`/gnu/store/b4y5li1ffq86zrp3vg2hadi5c8q5cip5-r-spectre-0.5.5-1.f6648ab.drv'
* `/gnu/store/bmqqrl99c8srywankdsv75p8vmgs612i-postgis-3.1.2.drv'
* `/gnu/store/cb3bspgrsi43c41f6n8gryycwdj6an1k-insight-toolkit-4.13.2.drv'
* `/gnu/store/fxh3jwq1652vrns40vqn0j6jgn9096sv-r-rmetasim-3.1.14.drv'
* `/gnu/store/hg69zwr6xjdf84y0gjmgldrmnhc6h63m-osm2pgsql-1.2.2.drv'
* `/gnu/store/pxlq4xn2fj91zil2j8d225gwc27p16fp-r-zoon-0.6.5.drv'
* `/gnu/store/r37iqmzgz00kpk3z93jqrigmjwsp9hv4-r-zonator-0.6.0.drv'
* `/gnu/store/s8y7j2hhfb4bsifl15s8l5cixgh2ka1r-qgis-3.16.3.drv'
* `/gnu/store/vl4ssl7zj6lxkp3dz0mnx3ncs1syihdm-insight-toolkit-5.0.0.drv'
*
`/gnu/store/x9qrim5fbpxcf66c9y99kjzrcf439fki-spatialite-gui-2.1.0-beta1.drv'
*
`/gnu/store/xhn1xr91q36x4skl7jkxawnz28qjcjcy-python-cartopy-0.19.0.post1.drv'
*
`/gnu/store/y1yyq3w87yn2mph3bmpq10208m0n637j-r-cicero-monocle3-1.3.2-1.fa2fb65.drv'
* `/gnu/store/z1l6xjswk905pwb4ibwpl8z2yjjrf8vl-python-hyperkitty-1.3.3.drv'


So for now, I propose to update proj to 7.2.1 which is the last version
that still includes proj_api.h and which thus still lets us build all
the packages that depend on proj.

I'll send a v4 of the patchset with this change.

Best,
Felix
F
F
Felix Gruber wrote on 28 Sep 2021 08:34
[PATCH v4 0/5] Add python-geopandas
(address . 50812@debbugs.gnu.org)
20210928063444.466158-1-felgru@posteo.net
This version of the patchset updates the proj package to 7.2.1 instead
of adding a new proj.7 package. I've confirmed that all but two of the
packages given by `guix refresh -l proj` still build. The two failing
packages are python-hyperkitty and itk-snap which both already failed to
build before the update of proj.

There is a newer version 8.1.1 of proj, but that would break quite a lot
of dependent packages as it does not contain the deprecated proj_api.h
anymore. So for now proj 7.2.1 is the latest version of proj to which we
can update.

Felix Gruber (5):
gnu: proj: Update to 7.2.1.
gnu: Add python-pyproj.
gnu: Add python-cligj.
gnu: Add python-fiona.
gnu: Add python-geopandas.

gnu/packages/geo.scm | 167 +++++++++++++++++++++++++++++++++---
gnu/packages/python-xyz.scm | 26 ++++++
2 files changed, 182 insertions(+), 11 deletions(-)

--
2.30.2
F
F
Felix Gruber wrote on 28 Sep 2021 08:34
[PATCH v4 1/5] gnu: proj: Update to 7.2.1.
(address . 50812@debbugs.gnu.org)
20210928063444.466158-2-felgru@posteo.net
* gnu/packages/geo.scm (proj): Update to 7.2.1.
[build-system]: Change to cmake-build-system.
[arguments]: Add configure flag to find googletest.
[inputs]: Add curl, libjpeg-turbo and libtiff.
[native-inputs]: Add googletest.
[description]: Consistently call the package Proj, instead of Proj,
PROJ or proj. Use @acronym to define CRS.
---
gnu/packages/geo.scm | 28 +++++++++++++++++-----------
1 file changed, 17 insertions(+), 11 deletions(-)

Toggle diff (54 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 9d4a1a8955..ec45601ef4 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -514,7 +514,7 @@ fully fledged Spatial SQL capabilities.")
(define-public proj
(package
(name "proj")
- (version "6.3.1")
+ (version "7.2.1")
(source
(origin
(method url-fetch)
@@ -522,22 +522,28 @@ fully fledged Spatial SQL capabilities.")
version ".tar.gz"))
(sha256
(base32
- "1y46ij32j9b4x1kjnnlykcwk3kkjwkg44sfc1ziwm3a3g0ki3q3d"))))
- (build-system gnu-build-system)
+ "050apzdn0isxpsblys1shrl9ccli5vd32kgswlgx1imrbwpg915k"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags '("-DUSE_EXTERNAL_GTEST=ON")))
(inputs
- `(("sqlite" ,sqlite)))
+ `(("curl" ,curl)
+ ("libjpeg-turbo" ,libjpeg-turbo)
+ ("libtiff" ,libtiff)
+ ("sqlite" ,sqlite)))
(native-inputs
- `(("pkg-config" ,pkg-config)))
+ `(("googletest" ,googletest)
+ ("pkg-config" ,pkg-config)))
(home-page "https://proj.org/")
(synopsis "Coordinate transformation software")
(description
"Proj is a generic coordinate transformation software that transforms
-geospatial coordinates from one coordinate reference system (CRS) to another.
-This includes cartographic projections as well as geodetic transformations.
-PROJ includes command line applications for easy conversion of coordinates
-from text files or directly from user input. In addition, proj also exposes
-an application programming interface that lets developers use the
-functionality of proj in their own software.")
+geospatial coordinates from one @acronym{CRS, coordinate reference system}
+to another. This includes cartographic projections as well as geodetic
+transformations. Proj includes command line applications for easy
+conversion of coordinates from text files or directly from user input.
+In addition, Proj also exposes an application programming interface that
+lets developers use the functionality of Proj in their own software.")
(license (list license:expat
;; src/projections/patterson.cpp
license:asl2.0
--
2.30.2
F
F
Felix Gruber wrote on 28 Sep 2021 08:34
[PATCH v4 2/5] gnu: Add python-pyproj.
(address . 50812@debbugs.gnu.org)
20210928063444.466158-3-felgru@posteo.net
* gnu/packages/geo.scm (python-pyproj): New variable.
---
gnu/packages/geo.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (61 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index ec45601ef4..6fdf71c4e3 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -93,6 +93,7 @@
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
#:use-module (gnu packages python-check)
+ #:use-module (gnu packages python-crypto)
#:use-module (gnu packages python-science)
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
@@ -600,6 +601,46 @@ projections.")
;; cmake/*
license:boost1.0))))
+(define-public python-pyproj
+ (package
+ (name "python-pyproj")
+ (version "3.2.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "pyproj" version))
+ (sha256
+ (base32
+ "0xrqpy708qlyd7nqjra0dl7nvkqzaj9w0v7wq4j5pxazha9n14sa"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'set-proj-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((proj (assoc-ref inputs "proj")))
+ (setenv "PROJ_DIR" proj)
+ (substitute* "pyproj/datadir.py"
+ (("(internal_datadir = ).*$" all var)
+ (string-append var "Path(\"" proj "/share/proj\")\n")))))))))
+ (inputs
+ `(("proj" ,proj)))
+ (propagated-inputs
+ `(("python-certifi" ,python-certifi)))
+ (native-inputs
+ `(("python-cython" ,python-cython)
+ ("python-numpy" ,python-numpy)
+ ("python-pandas" ,python-pandas)
+ ("python-pytest" ,python-pytest)
+ ("python-xarray" ,python-xarray)))
+ (home-page "https://github.com/pyproj4/pyproj")
+ (synopsis
+ "Python interface to PROJ")
+ (description
+ "This package provides a Python interface to PROJ, a cartographic
+projections and coordinate transformations library.")
+ (license license:expat)))
+
(define-public mapnik
(package
(name "mapnik")
--
2.30.2
F
F
Felix Gruber wrote on 28 Sep 2021 08:34
[PATCH v4 3/5] gnu: Add python-cligj.
(address . 50812@debbugs.gnu.org)
20210928063444.466158-4-felgru@posteo.net
* gnu/packages/python-xyz.scm (python-cligj): New variable.
---
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (46 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 86b1cdc2b1..91740cd0f4 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -108,6 +108,7 @@
;;; Copyright © 2021 Simon Streit <simon@netpanic.org>
;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
;;; Copyright © 2021 Pradana Aumars <paumars@courrier.dev>
+;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -3308,6 +3309,31 @@ with sensible defaults out of the box.")
(base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
(arguments `())))
+(define-public python-cligj
+ (package
+ (name "python-cligj")
+ (version "0.7.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "cligj" version))
+ (sha256
+ (base32
+ "09vbkik6kyn6yrqzl2r74vaybjk8kjykvi975hy3fsrm4gb17g54"))))
+ (build-system python-build-system)
+ (propagated-inputs
+ `(("python-click" ,python-click)))
+ (native-inputs
+ `(("python-pytest-cov" ,python-pytest-cov)))
+ (home-page "https://github.com/mapbox/cligj")
+ (synopsis
+ "Click params for commmand line interfaces to GeoJSON")
+ (description
+ "cligj is for Python developers who create command line interfaces
+for geospatial data. cligj allows you to quickly build consistent,
+well-tested and interoperable CLIs for handling GeoJSON.")
+ (license license:bsd-3)))
+
(define-public python-vcversioner
(package
(name "python-vcversioner")
--
2.30.2
F
F
Felix Gruber wrote on 28 Sep 2021 08:34
[PATCH v4 4/5] gnu: Add python-fiona.
(address . 50812@debbugs.gnu.org)
20210928063444.466158-5-felgru@posteo.net
* gnu/packages/geo.scm (python-fiona): New variable.
---
gnu/packages/geo.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)

Toggle diff (70 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 6fdf71c4e3..4329ee118e 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -641,6 +641,63 @@ projections.")
projections and coordinate transformations library.")
(license license:expat)))
+(define-public python-fiona
+ (package
+ (name "python-fiona")
+ (version "1.8.20")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "Fiona" version))
+ (sha256
+ (base32
+ "0fql7i7dg1xpbadmk8d26dwp91v7faixxc4wq14zg0kvhp9041d7"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'remove-local-fiona
+ (lambda _
+ ; This would otherwise interfere with finding the installed
+ ; fiona when running tests.
+ (delete-file-recursively "fiona")))
+ (replace 'check
+ (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+ (add-installed-pythonpath inputs outputs)
+ (when tests?
+ (invoke "pytest" "-m" "not network and not wheel")))))))
+ (inputs
+ `(("gdal" ,gdal)))
+ (propagated-inputs
+ `(("python-attrs" ,python-attrs)
+ ("python-certifi" ,python-certifi)
+ ("python-click" ,python-click)
+ ("python-click-plugins" ,python-click-plugins)
+ ("python-cligj" ,python-cligj)
+ ("python-munch" ,python-munch)
+ ("python-setuptools" ,python-setuptools)
+ ("python-six" ,python-six)
+ ("python-pytz" ,python-pytz)))
+ (native-inputs
+ `(("gdal" ,gdal) ; for gdal-config
+ ("python-boto3" ,python-boto3)
+ ("python-cython" ,python-cython)
+ ("python-pytest" ,python-pytest)
+ ("python-pytest-cov" ,python-pytest-cov)))
+ (home-page "https://github.com/Toblerity/Fiona")
+ (synopsis
+ "Fiona reads and writes spatial data files")
+ (description
+ "Fiona is GDAL’s neat and nimble vector API for Python programmers.
+Fiona is designed to be simple and dependable. It focuses on reading
+and writing data in standard Python IO style and relies upon familiar
+Python types and protocols such as files, dictionaries, mappings, and
+iterators instead of classes specific to OGR. Fiona can read and write
+real-world data using multi-layered GIS formats and zipped virtual file
+systems and integrates readily with other Python GIS packages such as
+pyproj, Rtree, and Shapely.")
+ (license license:bsd-3)))
+
(define-public mapnik
(package
(name "mapnik")
--
2.30.2
F
F
Felix Gruber wrote on 28 Sep 2021 08:34
[PATCH v4 5/5] gnu: Add python-geopandas.
(address . 50812@debbugs.gnu.org)
20210928063444.466158-6-felgru@posteo.net
* gnu/packages/geo.scm (python-geopandas): New variable.
---
gnu/packages/geo.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 4329ee118e..329ba0a9f9 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -698,6 +698,47 @@ systems and integrates readily with other Python GIS packages such as
pyproj, Rtree, and Shapely.")
(license license:bsd-3)))
+(define-public python-geopandas
+ (package
+ (name "python-geopandas")
+ (version "0.9.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "geopandas" version))
+ (sha256
+ (base32
+ "02k389zyyjv51gd09c92vlr83sv46awdq0066jgh5i24vjs2m5v3"))))
+ (build-system python-build-system)
+ (arguments
+ '(#:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest"
+ ; Disable test that fails with
+ ; NotImplementedError in pandas.
+ "-k" "not test_fillna_no_op_returns_copy"
+ ; Disable tests that require internet access.
+ "-m" "not web")))))))
+ (propagated-inputs
+ `(("python-fiona" ,python-fiona)
+ ("python-pandas" ,python-pandas)
+ ("python-pyproj" ,python-pyproj)
+ ("python-shapely" ,python-shapely)))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "http://geopandas.org")
+ (synopsis "Geographic pandas extensions")
+ (description "The goal of GeoPandas is to make working with
+geospatial data in Python easier. It combines the capabilities of
+Pandas and Shapely, providing geospatial operations in Pandas and a
+high-level interface to multiple geometries to Shapely. GeoPandas
+enables you to easily do operations in Python that would otherwise
+require a spatial database such as PostGIS.")
+ (license license:bsd-3)))
+
(define-public mapnik
(package
(name "mapnik")
--
2.30.2
L
L
Ludovic Courtès wrote on 12 Oct 2021 18:13
Re: bug#50812: [PATCH 0/5] Add python-geopandas
(name . Felix Gruber)(address . felgru@posteo.net)
87pmsate5k.fsf_-_@gnu.org
Hi,

Felix Gruber <felgru@posteo.net> skribis:

Toggle quote (11 lines)
> This version of the patchset updates the proj package to 7.2.1 instead
> of adding a new proj.7 package. I've confirmed that all but two of the
> packages given by `guix refresh -l proj` still build. The two failing
> packages are python-hyperkitty and itk-snap which both already failed to
> build before the update of proj.
>
> There is a newer version 8.1.1 of proj, but that would break quite a lot
> of dependent packages as it does not contain the deprecated proj_api.h
> anymore. So for now proj 7.2.1 is the latest version of proj to which we
> can update.

Sounds good.

Toggle quote (7 lines)
> Felix Gruber (5):
> gnu: proj: Update to 7.2.1.
> gnu: Add python-pyproj.
> gnu: Add python-cligj.
> gnu: Add python-fiona.
> gnu: Add python-geopandas.

Applied, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

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

To respond to this issue using the mumi CLI, first switch to it
mumi current 50812
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch