[Git][debian-gis-team/morecantile][master] 5 commits: New upstream version 7.0.2
Antonio Valentino (@antonio.valentino)
gitlab at salsa.debian.org
Sat Jan 10 17:38:15 GMT 2026
Antonio Valentino pushed to branch master at Debian GIS Project / morecantile
Commits:
197bae23 by Antonio Valentino at 2026-01-10T17:25:43+00:00
New upstream version 7.0.2
- - - - -
a7a52af2 by Antonio Valentino at 2026-01-10T17:25:43+00:00
Update upstream source from tag 'upstream/7.0.2'
Update to upstream version '7.0.2'
with Debian dir 27976690a94f33c951c0d70afff73ec5f77dc91b
- - - - -
d5edae4d by Antonio Valentino at 2026-01-10T17:26:36+00:00
New upstream release
- - - - -
35903332 by Antonio Valentino at 2026-01-10T17:27:41+00:00
Update dates in d/copyright
- - - - -
d9b4804b by Antonio Valentino at 2026-01-10T17:30:23+00:00
Drop 0001-Fix-data-path.patch and 0002-Fix-typos.patch
- - - - -
12 changed files:
- CHANGES.md
- debian/changelog
- debian/copyright
- − debian/patches/0001-Fix-data-path.patch
- − debian/patches/0002-Fix-typos.patch
- − debian/patches/series
- docs/src/cli.md
- morecantile/__init__.py
- morecantile/models.py
- morecantile/scripts/cli.py
- pyproject.toml
- tests/test_models.py
Changes:
=====================================
CHANGES.md
=====================================
@@ -1,6 +1,10 @@
## Unreleased
+## 7.0.2 (2026-01-05)
+
+* fix `_lr` and `_ul` methods for `bottomLeft` TMS
+
## 7.0.1 (2025-12-19)
* fix and improve type hints
=====================================
debian/changelog
=====================================
@@ -1,3 +1,13 @@
+morecantile (7.0.2-1) UNRELEASED; urgency=medium
+
+ * New upstream release.
+ * Update dates in d/copyright.
+ * debian/patches:
+ - Drop 0001-Fix-data-path.patch and 0002-Fix-typos.patch,
+ applied upstream.
+
+ -- Antonio Valentino <antonio.valentino at tiscali.it> Sat, 10 Jan 2026 17:25:52 +0000
+
morecantile (7.0.1-1) unstable; urgency=low
* Initial release (Closes: #1124244).
=====================================
debian/copyright
=====================================
@@ -21,7 +21,7 @@ Copyright: 1994-2025, Open Geospatial Consortium. All Rights Reserved.
License: Apache-2.0
Files: debian/*
-Copyright: 2025, Antonio Valentino <antonio.valentino at tiscali.it>
+Copyright: 2025-2026, Antonio Valentino <antonio.valentino at tiscali.it>
License: Expat
License: Expat
=====================================
debian/patches/0001-Fix-data-path.patch deleted
=====================================
@@ -1,22 +0,0 @@
-From: Antonio Valentino <antonio.valentino at tiscali.it>
-Date: Mon, 29 Dec 2025 11:30:24 +0000
-Subject: Fix data path
-
-Forwarded: https://github.com/developmentseed/morecantile/pull/196
----
- tests/test_models.py | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/tests/test_models.py b/tests/test_models.py
-index 3f4490e..2f1cb50 100644
---- a/tests/test_models.py
-+++ b/tests/test_models.py
-@@ -14,7 +14,7 @@ from morecantile.commons import Tile
- from morecantile.errors import InvalidIdentifier
- from morecantile.models import CRS, CRSWKT, CRSUri, TileMatrix, TileMatrixSet
-
--data_dir = os.path.join(os.path.dirname(__file__), "../morecantile/data")
-+data_dir = os.path.join(os.path.dirname(morecantile.__file__), "data")
- tilesets = [
- os.path.join(data_dir, f) for f in os.listdir(data_dir) if f.endswith(".json")
- ]
=====================================
debian/patches/0002-Fix-typos.patch deleted
=====================================
@@ -1,36 +0,0 @@
-From: Antonio Valentino <antonio.valentino at tiscali.it>
-Date: Mon, 29 Dec 2025 11:47:21 +0000
-Subject: Fix typos
-
-Forwarded: https://github.com/developmentseed/morecantile/pull/197
----
- docs/src/cli.md | 2 +-
- morecantile/scripts/cli.py | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/docs/src/cli.md b/docs/src/cli.md
-index ab73fc3..7105ab9 100644
---- a/docs/src/cli.md
-+++ b/docs/src/cli.md
-@@ -129,7 +129,7 @@ Options:
- --epsg INTEGER EPSG number. [required]
- --extent FLOAT... left, bottom, right, top Bounding box of the Tile Matrix Set. [required]
- --name TEXT Identifier of the custom TMS.
-- --minzoom INTEGER Minumum Zoom level.
-+ --minzoom INTEGER Minimum Zoom level.
- --maxzoom INTEGER Maximum Zoom level.
- --tile-width INTEGER Width of each tile.
- --tile-height INTEGER Height of each tile.
-diff --git a/morecantile/scripts/cli.py b/morecantile/scripts/cli.py
-index be2fb65..5888ba4 100644
---- a/morecantile/scripts/cli.py
-+++ b/morecantile/scripts/cli.py
-@@ -436,7 +436,7 @@ def tms(identifier):
- help="Identifier of the custom TMS.",
- default="CustomTileMatrixSet",
- )
-- at click.option("--minzoom", type=int, default=0, help="Minumum Zoom level.")
-+ at click.option("--minzoom", type=int, default=0, help="Minimum Zoom level.")
- @click.option("--maxzoom", type=int, default=24, help="Maximum Zoom level.")
- @click.option("--tile-width", type=int, default=256, help="Width of each tile.")
- @click.option("--tile-height", type=int, default=256, help="Height of each tile.")
=====================================
debian/patches/series deleted
=====================================
@@ -1,2 +0,0 @@
-0001-Fix-data-path.patch
-0002-Fix-typos.patch
=====================================
docs/src/cli.md
=====================================
@@ -129,7 +129,7 @@ Options:
--epsg INTEGER EPSG number. [required]
--extent FLOAT... left, bottom, right, top Bounding box of the Tile Matrix Set. [required]
--name TEXT Identifier of the custom TMS.
- --minzoom INTEGER Minumum Zoom level.
+ --minzoom INTEGER Minimum Zoom level.
--maxzoom INTEGER Maximum Zoom level.
--tile-width INTEGER Width of each tile.
--tile-height INTEGER Height of each tile.
=====================================
morecantile/__init__.py
=====================================
@@ -8,7 +8,7 @@ Refs:
"""
-__version__ = "7.0.1"
+__version__ = "7.0.2"
from .commons import BoundingBox, Coords, Tile # noqa
from .defaults import TileMatrixSets, tms # noqa
=====================================
morecantile/models.py
=====================================
@@ -1127,7 +1127,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True, extra="ignore"):
y_coord = (
origin_y - t.y * matrix.cellSize * matrix.tileHeight
if matrix.cornerOfOrigin == "topLeft"
- else origin_y + t.y * matrix.cellSize * matrix.tileHeight
+ else origin_y + (t.y + 1) * matrix.cellSize * matrix.tileHeight
)
return Coords(x_coord, y_coord)
@@ -1162,7 +1162,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True, extra="ignore"):
y_coord = (
origin_y - (t.y + 1) * matrix.cellSize * matrix.tileHeight
if matrix.cornerOfOrigin == "topLeft"
- else origin_y + (t.y + 1) * matrix.cellSize * matrix.tileHeight
+ else origin_y + t.y * matrix.cellSize * matrix.tileHeight
)
return Coords(x_coord, y_coord)
=====================================
morecantile/scripts/cli.py
=====================================
@@ -436,7 +436,7 @@ def tms(identifier):
help="Identifier of the custom TMS.",
default="CustomTileMatrixSet",
)
- at click.option("--minzoom", type=int, default=0, help="Minumum Zoom level.")
+ at click.option("--minzoom", type=int, default=0, help="Minimum Zoom level.")
@click.option("--maxzoom", type=int, default=24, help="Maximum Zoom level.")
@click.option("--tile-width", type=int, default=256, help="Width of each tile.")
@click.option("--tile-height", type=int, default=256, help="Height of each tile.")
=====================================
pyproject.toml
=====================================
@@ -119,7 +119,7 @@ filterwarnings = [
]
[tool.bumpversion]
-current_version = "7.0.1"
+current_version = "7.0.2"
search = "{current_version}"
replace = "{new_version}"
=====================================
tests/test_models.py
=====================================
@@ -10,11 +10,11 @@ import pytest
from pydantic import ValidationError
import morecantile
-from morecantile.commons import Tile
+from morecantile.commons import BoundingBox, Coords, Tile
from morecantile.errors import InvalidIdentifier
from morecantile.models import CRS, CRSWKT, CRSUri, TileMatrix, TileMatrixSet
-data_dir = os.path.join(os.path.dirname(__file__), "../morecantile/data")
+data_dir = os.path.join(os.path.dirname(morecantile.__file__), "data")
tilesets = [
os.path.join(data_dir, f) for f in os.listdir(data_dir) if f.endswith(".json")
]
@@ -804,6 +804,21 @@ def test_bottomleft_origin():
-20037508.342789244,
)
assert tms.xy_bounds(0, 0, 0) == wmTopLeft.xy_bounds(0, 0, 0)
+
+ # bottomLeft corner can also be used as
+ # origin making TileRow increase towards the top
+ assert tms.xy_bounds(1, 1, 1) == wmTopLeft.xy_bounds(1, 0, 1)
+ assert tms.xy_bounds(1, 0, 1) == wmTopLeft.xy_bounds(1, 1, 1)
+
+ assert tms._ul(0, 0, 0) == wmTopLeft._ul(0, 0, 0)
+ assert tms._lr(0, 0, 0) == wmTopLeft._lr(0, 0, 0)
+
+ # TileRow is inverted
+ assert tms._ul(0, 0, 1).y == wmTopLeft._ul(0, 1, 1).y
+ assert tms._ul(0, 1, 1).y == wmTopLeft._ul(0, 0, 1).y
+ assert tms._lr(0, 0, 1).y == wmTopLeft._lr(0, 1, 1).y
+ assert tms._lr(0, 1, 1).y == wmTopLeft._lr(0, 0, 1).y
+
assert tms.bounds(0, 0, 0) == wmTopLeft.bounds(0, 0, 0)
assert tms.xy_bounds(0, 0, 1).left == -20037508.342789244
@@ -884,3 +899,43 @@ def test_webmercator_bounds():
)
assert tms.bounds(0, 0, 1).left == -180.0
assert tms.bounds(1, 0, 1).right == 180.0
+
+
+def test_bbox_bottom_left():
+ """Ref: issue #193"""
+ extent = [-100_000, -100_000, 100_000, 100_000]
+ tms = TileMatrixSet.custom(
+ extent,
+ pyproj.CRS.from_epsg(3857),
+ minzoom=0,
+ maxzoom=2,
+ corner_of_origin="bottomLeft",
+ )
+ assert tms.xy_bbox == BoundingBox(
+ left=-100_000,
+ bottom=-100_000,
+ right=100_000,
+ top=100_000,
+ )
+
+ assert tms.xy_bounds(Tile(x=0, y=0, z=0)) == BoundingBox(
+ left=-100_000,
+ bottom=-100_000,
+ right=100_000,
+ top=100_000,
+ )
+
+ assert tms._ul(Tile(x=0, y=0, z=0)) == Coords(x=-100000.0, y=100000.0)
+ assert tms._lr(Tile(x=0, y=0, z=0)) == Coords(x=100000.0, y=-100000.0)
+
+ assert tms._ul(Tile(x=0, y=0, z=1)) == Coords(x=-100000.0, y=0.0)
+ assert tms._lr(Tile(x=0, y=0, z=1)) == Coords(x=0.0, y=-100000.0)
+
+ assert tms._ul(Tile(x=1, y=0, z=1)) == Coords(x=0.0, y=0.0)
+ assert tms._lr(Tile(x=1, y=0, z=1)) == Coords(x=100000.0, y=-100000.0)
+
+ assert tms._ul(Tile(x=0, y=1, z=1)) == Coords(x=-100000.0, y=100000.0)
+ assert tms._lr(Tile(x=0, y=1, z=1)) == Coords(x=0.0, y=0.0)
+
+ assert tms._ul(Tile(x=1, y=1, z=1)) == Coords(x=0.0, y=100000.0)
+ assert tms._lr(Tile(x=1, y=1, z=1)) == Coords(x=100000.0, y=0)
View it on GitLab: https://salsa.debian.org/debian-gis-team/morecantile/-/compare/122d4706076b26c27522e991f232292811dcd871...d9b4804b6944399e53061e248b60bf5ea637acbf
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/morecantile/-/compare/122d4706076b26c27522e991f232292811dcd871...d9b4804b6944399e53061e248b60bf5ea637acbf
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20260110/06026b6f/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list