morecantile 5.4.2__tar.gz → 6.0.0__tar.gz
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-5.4.2 → morecantile-6.0.0}/.gitignore +4 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/PKG-INFO +5 -3
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/__init__.py +1 -1
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/commons.py +4 -4
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/models.py +4 -14
- {morecantile-5.4.2 → morecantile-6.0.0}/pyproject.toml +5 -3
- {morecantile-5.4.2 → morecantile-6.0.0}/.pre-commit-config.yaml +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/LICENSE +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/README.md +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/CDB1GlobalGrid.json +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/CanadianNAD83_LCC.json +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/EuropeanETRS89_LAEAQuad.json +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/GNOSISGlobalGrid.json +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/LINZAntarticaMapTilegrid.json +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/NZTM2000Quad.json +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/README.md +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/UPSAntarcticWGS84Quad.json +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/UPSArcticWGS84Quad.json +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/UTM31WGS84Quad.json +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/WGS1984Quad.json +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/WebMercatorQuad.json +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/WorldCRS84Quad.json +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/data/WorldMercatorWGS84Quad.json +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/defaults.py +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/errors.py +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/py.typed +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/scripts/__init__.py +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/scripts/cli.py +0 -0
- {morecantile-5.4.2 → morecantile-6.0.0}/morecantile/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: morecantile
|
|
3
|
-
Version:
|
|
3
|
+
Version: 6.0.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>
|
|
@@ -20,8 +20,10 @@ Requires-Dist: pyproj~=3.1
|
|
|
20
20
|
Requires-Dist: pydantic~=2.0
|
|
21
21
|
Requires-Dist: pre-commit ; extra == "dev"
|
|
22
22
|
Requires-Dist: bump-my-version ; extra == "dev"
|
|
23
|
-
Requires-Dist: mkdocs ; extra == "docs"
|
|
24
|
-
Requires-Dist: mkdocs-material ; extra == "docs"
|
|
23
|
+
Requires-Dist: mkdocs>=1.4.3 ; extra == "docs"
|
|
24
|
+
Requires-Dist: mkdocs-material[imaging]>=9.5 ; extra == "docs"
|
|
25
|
+
Requires-Dist: griffe-inherited-docstrings>=1.0.0 ; extra == "docs"
|
|
26
|
+
Requires-Dist: mkdocstrings[python]>=0.25.1 ; extra == "docs"
|
|
25
27
|
Requires-Dist: pygments ; extra == "docs"
|
|
26
28
|
Requires-Dist: rasterio>=1.2.1 ; extra == "rasterio"
|
|
27
29
|
Requires-Dist: mercantile ; extra == "test"
|
|
@@ -7,10 +7,10 @@ class BoundingBox(NamedTuple):
|
|
|
7
7
|
"""A xmin,ymin,xmax,ymax coordinates tuple.
|
|
8
8
|
|
|
9
9
|
Args:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
left (number): min horizontal coordinate.
|
|
11
|
+
bottom (number):min vertical coordinate.
|
|
12
|
+
right (number): max horizontal coordinate.
|
|
13
|
+
top (number): max vertical coordinate.
|
|
14
14
|
|
|
15
15
|
Examples:
|
|
16
16
|
>>> BoundingBox(-180.0, -90.0, 180.0, 90.0)
|
|
@@ -40,7 +40,6 @@ from morecantile.utils import (
|
|
|
40
40
|
NumType = Union[float, int]
|
|
41
41
|
BoundsType = Tuple[NumType, NumType]
|
|
42
42
|
LL_EPSILON = 1e-11
|
|
43
|
-
WGS84_CRS = pyproj.CRS.from_epsg(4326)
|
|
44
43
|
axesInfo = Annotated[List[str], Field(min_length=2, max_length=2)]
|
|
45
44
|
|
|
46
45
|
|
|
@@ -486,7 +485,6 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
|
|
|
486
485
|
]
|
|
487
486
|
|
|
488
487
|
# Private attributes
|
|
489
|
-
_geographic_crs: pyproj.CRS = PrivateAttr(default=WGS84_CRS)
|
|
490
488
|
_to_geographic: pyproj.Transformer = PrivateAttr()
|
|
491
489
|
_from_geographic: pyproj.Transformer = PrivateAttr()
|
|
492
490
|
|
|
@@ -494,16 +492,12 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
|
|
|
494
492
|
"""Set private attributes."""
|
|
495
493
|
super().__init__(**data)
|
|
496
494
|
|
|
497
|
-
self._geographic_crs = pyproj.CRS.from_user_input(
|
|
498
|
-
data.get("_geographic_crs", WGS84_CRS)
|
|
499
|
-
)
|
|
500
|
-
|
|
501
495
|
try:
|
|
502
496
|
self._to_geographic = pyproj.Transformer.from_crs(
|
|
503
|
-
self.crs._pyproj_crs, self.
|
|
497
|
+
self.crs._pyproj_crs, self.crs._pyproj_crs.geodetic_crs, always_xy=True
|
|
504
498
|
)
|
|
505
499
|
self._from_geographic = pyproj.Transformer.from_crs(
|
|
506
|
-
self.
|
|
500
|
+
self.crs._pyproj_crs.geodetic_crs, self.crs._pyproj_crs, always_xy=True
|
|
507
501
|
)
|
|
508
502
|
except ProjError:
|
|
509
503
|
warnings.warn(
|
|
@@ -555,7 +549,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
|
|
|
555
549
|
@cached_property
|
|
556
550
|
def geographic_crs(self) -> pyproj.CRS:
|
|
557
551
|
"""Return the TMS's geographic CRS."""
|
|
558
|
-
return self.
|
|
552
|
+
return self.crs._pyproj_crs.geodetic_crs
|
|
559
553
|
|
|
560
554
|
@cached_property
|
|
561
555
|
def rasterio_crs(self):
|
|
@@ -565,7 +559,7 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
|
|
|
565
559
|
@cached_property
|
|
566
560
|
def rasterio_geographic_crs(self):
|
|
567
561
|
"""Return the geographic CRS as a rasterio CRS."""
|
|
568
|
-
return to_rasterio_crs(self.
|
|
562
|
+
return to_rasterio_crs(self.crs._pyproj_crs.geodetic_crs)
|
|
569
563
|
|
|
570
564
|
@property
|
|
571
565
|
def minzoom(self) -> int:
|
|
@@ -656,7 +650,6 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
|
|
|
656
650
|
title: Optional[str] = None,
|
|
657
651
|
id: Optional[str] = None,
|
|
658
652
|
ordered_axes: Optional[List[str]] = None,
|
|
659
|
-
geographic_crs: pyproj.CRS = WGS84_CRS,
|
|
660
653
|
screen_pixel_size: float = 0.28e-3,
|
|
661
654
|
decimation_base: int = 2,
|
|
662
655
|
**kwargs: Any,
|
|
@@ -689,8 +682,6 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
|
|
|
689
682
|
Tile Matrix Set title
|
|
690
683
|
id: str, optional
|
|
691
684
|
Tile Matrix Set identifier
|
|
692
|
-
geographic_crs: pyproj.CRS
|
|
693
|
-
Geographic (lat,lon) coordinate reference system (default is EPSG:4326)
|
|
694
685
|
ordered_axes: list of str, optional
|
|
695
686
|
Override Axis order (e.g `["N", "S"]`) else default to CRS's metadata
|
|
696
687
|
screen_pixel_size: float, optional
|
|
@@ -769,7 +760,6 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
|
|
|
769
760
|
tileMatrices=tile_matrices,
|
|
770
761
|
id=id,
|
|
771
762
|
title=title,
|
|
772
|
-
_geographic_crs=geographic_crs,
|
|
773
763
|
**kwargs,
|
|
774
764
|
)
|
|
775
765
|
|
|
@@ -41,8 +41,10 @@ dev = [
|
|
|
41
41
|
"bump-my-version",
|
|
42
42
|
]
|
|
43
43
|
docs = [
|
|
44
|
-
"mkdocs",
|
|
45
|
-
"mkdocs-material",
|
|
44
|
+
"mkdocs>=1.4.3",
|
|
45
|
+
"mkdocs-material[imaging]>=9.5",
|
|
46
|
+
"griffe-inherited-docstrings>=1.0.0",
|
|
47
|
+
"mkdocstrings[python]>=0.25.1",
|
|
46
48
|
"pygments",
|
|
47
49
|
]
|
|
48
50
|
|
|
@@ -114,7 +116,7 @@ filterwarnings = [
|
|
|
114
116
|
]
|
|
115
117
|
|
|
116
118
|
[tool.bumpversion]
|
|
117
|
-
current_version = "
|
|
119
|
+
current_version = "6.0.0"
|
|
118
120
|
|
|
119
121
|
search = "{current_version}"
|
|
120
122
|
replace = "{new_version}"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|