summary refs log tree commit diff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2022-05-06 11:22:58 +0200
committerRicardo Wurmus <rekado@elephly.net>2022-05-06 13:02:59 +0200
commit0d73287d9735f607b1f1bb3b1230553c7b4c7972 (patch)
treef7cd058632ba39ba512ad4d227a3a747dff25be6
parentea3cfeb665e4221ded31c896496f73c8aac01022 (diff)
downloadguix-0d73287d9735f607b1f1bb3b1230553c7b4c7972.tar.gz
gnu: Add python-mercantile.
* gnu/packages/python-xyz.scm (python-mercantile): New variable.
-rw-r--r--gnu/packages/python-xyz.scm26
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index cf3e201b1a..cde610455f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24403,6 +24403,32 @@ Stamen, and supports custom tilesets with Mapbox or Cloudmade API keys.  It
 supports Image, Video, GeoJSON and TopoJSON overlays.")
     (license license:expat)))
 
+(define-public python-mercantile
+  (package
+    (name "python-mercantile")
+    (version "1.2.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "mercantile" version))
+       (sha256
+        (base32 "0sxmndhzzrvss5irsgzfrk51k6jihwcb7661992mizdgbnqnsg7s"))))
+    (build-system python-build-system)
+    (propagated-inputs (list python-click))
+    (native-inputs
+     (list python-check-manifest python-hypothesis python-pytest))
+    (home-page "https://github.com/mapbox/mercantile")
+    (synopsis "Web mercator XYZ tile utilities")
+    (description "The mercantile module provides @code{ul(xtile, ytile, zoom)}
+and @code{bounds(xtile, ytile, zoom)} functions that respectively return the
+upper left corner and bounding longitudes and latitudes for XYZ tiles, a
+@code{xy(lng, lat)} function that returns spherical mercator x and y
+coordinates, a @code{tile(lng, lat, zoom)} function that returns the tile
+containing a given point, and quadkey conversion functions
+@code{quadkey(xtile, ytile, zoom)} and @code{quadkey_to_tile(quadkey)} for
+translating between quadkey and tile coordinates.")
+    (license license:bsd-3)))
+
 (define-public jube
   (package
     ;; This is a command-line tool, so no "python-" prefix.