morecantile 5.4.1__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.
Files changed (29) hide show
  1. {morecantile-5.4.1 → morecantile-6.0.0}/.gitignore +4 -0
  2. {morecantile-5.4.1 → morecantile-6.0.0}/PKG-INFO +5 -3
  3. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/__init__.py +1 -1
  4. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/commons.py +4 -4
  5. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/models.py +5 -16
  6. {morecantile-5.4.1 → morecantile-6.0.0}/pyproject.toml +6 -4
  7. {morecantile-5.4.1 → morecantile-6.0.0}/.pre-commit-config.yaml +0 -0
  8. {morecantile-5.4.1 → morecantile-6.0.0}/LICENSE +0 -0
  9. {morecantile-5.4.1 → morecantile-6.0.0}/README.md +0 -0
  10. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/CDB1GlobalGrid.json +0 -0
  11. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/CanadianNAD83_LCC.json +0 -0
  12. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/EuropeanETRS89_LAEAQuad.json +0 -0
  13. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/GNOSISGlobalGrid.json +0 -0
  14. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/LINZAntarticaMapTilegrid.json +0 -0
  15. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/NZTM2000Quad.json +0 -0
  16. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/README.md +0 -0
  17. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/UPSAntarcticWGS84Quad.json +0 -0
  18. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/UPSArcticWGS84Quad.json +0 -0
  19. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/UTM31WGS84Quad.json +0 -0
  20. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/WGS1984Quad.json +0 -0
  21. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/WebMercatorQuad.json +0 -0
  22. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/WorldCRS84Quad.json +0 -0
  23. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/data/WorldMercatorWGS84Quad.json +0 -0
  24. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/defaults.py +0 -0
  25. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/errors.py +0 -0
  26. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/py.typed +0 -0
  27. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/scripts/__init__.py +0 -0
  28. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/scripts/cli.py +0 -0
  29. {morecantile-5.4.1 → morecantile-6.0.0}/morecantile/utils.py +0 -0
@@ -130,3 +130,7 @@ dmypy.json
130
130
 
131
131
  # PyCharm:
132
132
  .idea
133
+
134
+ # VSCode
135
+ .vscode
136
+ .vscode/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: morecantile
3
- Version: 5.4.1
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"
@@ -8,7 +8,7 @@ Refs:
8
8
 
9
9
  """
10
10
 
11
- __version__ = "5.4.1"
11
+ __version__ = "6.0.0"
12
12
 
13
13
  from .commons import BoundingBox, Coords, Tile # noqa
14
14
  from .defaults import TileMatrixSets, tms # noqa
@@ -7,10 +7,10 @@ class BoundingBox(NamedTuple):
7
7
  """A xmin,ymin,xmax,ymax coordinates tuple.
8
8
 
9
9
  Args:
10
- left (number): min horizontal coordinate.
11
- bottom (number):min vertical coordinate.
12
- right (number): max horizontal coordinate.
13
- top (number): max vertical coordinate.
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._geographic_crs, always_xy=True
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._geographic_crs, self.crs._pyproj_crs, always_xy=True
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._geographic_crs
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._geographic_crs)
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
 
@@ -1250,9 +1240,8 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
1250
1240
 
1251
1241
  for w, s, e, n in bboxes:
1252
1242
  # Clamp bounding values.
1253
- ws_contain_180th = lons_contain_antimeridian(w, self.bbox.left)
1254
1243
  es_contain_180th = lons_contain_antimeridian(e, self.bbox.right)
1255
- w = min(self.bbox.left, w) if ws_contain_180th else max(self.bbox.left, w)
1244
+ w = max(self.bbox.left, w)
1256
1245
  s = max(self.bbox.bottom, s)
1257
1246
  e = max(self.bbox.right, e) if es_contain_180th else min(self.bbox.right, e)
1258
1247
  n = min(self.bbox.top, n)
@@ -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
 
@@ -54,7 +56,7 @@ Documentation = "https://developmentseed.org/morecantile/"
54
56
  morecantile = "morecantile.scripts.cli:cli"
55
57
 
56
58
  [build-system]
57
- requires = ["flit>=3.2,<4"]
59
+ requires = ["flit_core>=3.2,<4"]
58
60
  build-backend = "flit_core.buildapi"
59
61
 
60
62
  [tool.flit.module]
@@ -114,7 +116,7 @@ filterwarnings = [
114
116
  ]
115
117
 
116
118
  [tool.bumpversion]
117
- current_version = "5.4.1"
119
+ current_version = "6.0.0"
118
120
 
119
121
  search = "{current_version}"
120
122
  replace = "{new_version}"
File without changes
File without changes