morecantile 6.1.0__py3-none-any.whl → 6.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- morecantile/__init__.py +1 -1
- morecantile/defaults.py +1 -1
- morecantile/models.py +7 -4
- morecantile/utils.py +4 -6
- {morecantile-6.1.0.dist-info → morecantile-6.2.0.dist-info}/METADATA +4 -3
- {morecantile-6.1.0.dist-info → morecantile-6.2.0.dist-info}/RECORD +9 -9
- {morecantile-6.1.0.dist-info → morecantile-6.2.0.dist-info}/WHEEL +1 -1
- {morecantile-6.1.0.dist-info → morecantile-6.2.0.dist-info}/LICENSE +0 -0
- {morecantile-6.1.0.dist-info → morecantile-6.2.0.dist-info}/entry_points.txt +0 -0
morecantile/__init__.py
CHANGED
morecantile/defaults.py
CHANGED
|
@@ -55,7 +55,7 @@ class TileMatrixSets:
|
|
|
55
55
|
"""Register TileMatrixSet(s)."""
|
|
56
56
|
for identifier in custom_tms.keys():
|
|
57
57
|
if identifier in self.tms and not overwrite:
|
|
58
|
-
raise
|
|
58
|
+
raise InvalidIdentifier(f"{identifier} is already a registered TMS.")
|
|
59
59
|
|
|
60
60
|
return TileMatrixSets({**self.tms, **custom_tms})
|
|
61
61
|
|
morecantile/models.py
CHANGED
|
@@ -510,6 +510,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
|
|
|
510
510
|
"Could not create coordinate Transformer from input CRS to the given geographic CRS"
|
|
511
511
|
"some methods might not be available.",
|
|
512
512
|
UserWarning,
|
|
513
|
+
stacklevel=1,
|
|
513
514
|
)
|
|
514
515
|
self._to_geographic = None
|
|
515
516
|
self._from_geographic = None
|
|
@@ -537,10 +538,8 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
|
|
|
537
538
|
def is_variable(self) -> bool:
|
|
538
539
|
"""Check if TMS has variable width matrix."""
|
|
539
540
|
return any(
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
for matrix in self.tileMatrices
|
|
543
|
-
]
|
|
541
|
+
True if matrix.variableMatrixWidths is not None else False
|
|
542
|
+
for matrix in self.tileMatrices
|
|
544
543
|
)
|
|
545
544
|
|
|
546
545
|
def __iter__(self):
|
|
@@ -800,6 +799,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
|
|
|
800
799
|
warnings.warn(
|
|
801
800
|
f"TileMatrix not found for level: {zoom} - Creating values from TMS Scale.",
|
|
802
801
|
UserWarning,
|
|
802
|
+
stacklevel=1,
|
|
803
803
|
)
|
|
804
804
|
|
|
805
805
|
# TODO: what if we want to construct a matrix for a level up ?
|
|
@@ -894,6 +894,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
|
|
|
894
894
|
warnings.warn(
|
|
895
895
|
f"Point ({x}, {y}) is outside TMS bounds {list(self.xy_bbox)}.",
|
|
896
896
|
PointOutsideTMSBounds,
|
|
897
|
+
stacklevel=1,
|
|
897
898
|
)
|
|
898
899
|
|
|
899
900
|
lng, lat = self._to_geographic.transform(x, y)
|
|
@@ -913,6 +914,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
|
|
|
913
914
|
warnings.warn(
|
|
914
915
|
f"Point ({lng}, {lat}) is outside TMS bounds {list(self.bbox)}.",
|
|
915
916
|
PointOutsideTMSBounds,
|
|
917
|
+
stacklevel=1,
|
|
916
918
|
)
|
|
917
919
|
|
|
918
920
|
x, y = self._from_geographic.transform(lng, lat)
|
|
@@ -1372,6 +1374,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
|
|
|
1372
1374
|
"CRS is no longer part of the GeoJSON specification."
|
|
1373
1375
|
"Other projection than EPSG:4326 might not be supported.",
|
|
1374
1376
|
UserWarning,
|
|
1377
|
+
stacklevel=1,
|
|
1375
1378
|
)
|
|
1376
1379
|
feat.update(
|
|
1377
1380
|
{
|
morecantile/utils.py
CHANGED
|
@@ -118,12 +118,10 @@ def is_power_of_two(number: int) -> bool:
|
|
|
118
118
|
def check_quadkey_support(tms: List) -> bool:
|
|
119
119
|
"""Check if a Tile Matrix Set supports quadkeys"""
|
|
120
120
|
return all(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
for i, t in enumerate(tms[:-1])
|
|
126
|
-
]
|
|
121
|
+
(t.matrixWidth == t.matrixHeight)
|
|
122
|
+
and is_power_of_two(t.matrixWidth)
|
|
123
|
+
and ((t.matrixWidth * 2) == tms[i + 1].matrixWidth)
|
|
124
|
+
for i, t in enumerate(tms[:-1])
|
|
127
125
|
)
|
|
128
126
|
|
|
129
127
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
2
|
Name: morecantile
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.2.0
|
|
4
4
|
Summary: Construct and use map tile grids (a.k.a TileMatrixSet / TMS).
|
|
5
5
|
Keywords: GIS,TMS,TileMatrixSet,Map Tile
|
|
6
6
|
Author-email: Vincent Sarago <vincent@developmentseed.com>
|
|
@@ -14,9 +14,10 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
14
14
|
Classifier: Programming Language :: Python :: 3.10
|
|
15
15
|
Classifier: Programming Language :: Python :: 3.11
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
18
|
Classifier: Topic :: Scientific/Engineering :: GIS
|
|
18
19
|
Requires-Dist: attrs
|
|
19
|
-
Requires-Dist: pyproj
|
|
20
|
+
Requires-Dist: pyproj>=3.1,<4.0
|
|
20
21
|
Requires-Dist: pydantic~=2.0
|
|
21
22
|
Requires-Dist: pytest ; extra == "benchmark"
|
|
22
23
|
Requires-Dist: pytest-benchmark ; extra == "benchmark"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
morecantile/__init__.py,sha256=
|
|
1
|
+
morecantile/__init__.py,sha256=KRnysWzcvNgWYQZkJP1uG2KO_Ca-PbfZywfToeD36AE,436
|
|
2
2
|
morecantile/commons.py,sha256=iHElysLSMu-zb3h1G1-AJnQrZ6y-2GseZkoBkOuzcZ8,1031
|
|
3
|
-
morecantile/defaults.py,sha256=
|
|
3
|
+
morecantile/defaults.py,sha256=PYqEekETggu4yLKhPuU8FTTu04qpR0w_xhewIBkFS1E,1812
|
|
4
4
|
morecantile/errors.py,sha256=rhtdpNglfEz5nC8I-BJKUr_gkOwAPwVi1vhLFJ2StYw,907
|
|
5
|
-
morecantile/models.py,sha256=
|
|
5
|
+
morecantile/models.py,sha256=muzqOjaZvIyk6mYXRywy0dT18W1eqLtyC4b1F0MgDeg,51966
|
|
6
6
|
morecantile/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
|
-
morecantile/utils.py,sha256
|
|
7
|
+
morecantile/utils.py,sha256=wEdAc8cZE7iqnuEdfRBSWSzJtYpcIaC6I9eCewhqXy8,3984
|
|
8
8
|
morecantile/data/CDB1GlobalGrid.json,sha256=VDc2ukAWtTQeCdOG8YMqsGO-D7eSzSCN1TEaBn2qLZI,36115
|
|
9
9
|
morecantile/data/CanadianNAD83_LCC.json,sha256=RuR9z5MjxKzU4KE-CutrzjpWBz9c-XXykKAxcD83veU,7267
|
|
10
10
|
morecantile/data/EuropeanETRS89_LAEAQuad.json,sha256=pR2Q7eAlLRG74SRdzYhXj19bf5qBvHrE6kzJ5cvko1Q,4679
|
|
@@ -21,8 +21,8 @@ morecantile/data/WorldCRS84Quad.json,sha256=l0Wf2faYwzRwO0mG-Tea1Vydpi7V1Oel5L9l
|
|
|
21
21
|
morecantile/data/WorldMercatorWGS84Quad.json,sha256=JaqoBSu5qVJmL-J7oSVU1etP2OPWx_aVaTc68dGX0Ec,7001
|
|
22
22
|
morecantile/scripts/__init__.py,sha256=-CJncfgWDnSZ8au-SJtgX-OFgCddlf7___d91qQcqQM,23
|
|
23
23
|
morecantile/scripts/cli.py,sha256=TOc1RjLXuTzKs2FNNHQ3eCiGqiBoDFA4fKWpOAuY12s,17364
|
|
24
|
-
morecantile-6.
|
|
25
|
-
morecantile-6.
|
|
26
|
-
morecantile-6.
|
|
27
|
-
morecantile-6.
|
|
28
|
-
morecantile-6.
|
|
24
|
+
morecantile-6.2.0.dist-info/entry_points.txt,sha256=keoXuYgnX-mdrGWwXIHqEkSZjQK_iAmtmdrtZ3sCT24,59
|
|
25
|
+
morecantile-6.2.0.dist-info/LICENSE,sha256=18IxFIta7rF_RcVSIgLUUd_alyfQ9bGoZKQm5vOarGU,1073
|
|
26
|
+
morecantile-6.2.0.dist-info/WHEEL,sha256=CpUCUxeHQbRN5UGRQHYRJorO5Af-Qy_fHMctcQ8DSGI,82
|
|
27
|
+
morecantile-6.2.0.dist-info/METADATA,sha256=fDX754cdrEPZvGR7vJR2d4jUck4aJhRZ0ALxcyDwvcs,7322
|
|
28
|
+
morecantile-6.2.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|