morecantile 5.2.0__py3-none-any.whl → 5.2.2__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 CHANGED
@@ -8,7 +8,7 @@ Refs:
8
8
 
9
9
  """
10
10
 
11
- __version__ = "5.2.0"
11
+ __version__ = "5.2.2"
12
12
 
13
13
  from .commons import BoundingBox, Coords, Tile # noqa
14
14
  from .defaults import TileMatrixSets, tms # noqa
@@ -1,5 +1,5 @@
1
1
  # tileMatrixSet json documents
2
2
 
3
- TileMatrixSet from http://schemas.opengis.net/tms/1.0/json/examples/
3
+ TileMatrixSet from https://schemas.opengis.net/tms/2.0/json/examples/tilematrixset/
4
4
 
5
5
  `NZTM2000` and `LINZAntarticaMapTilegrid` are from GDAL https://github.com/OSGeo/gdal/pull/2505/files#diff-33251b8c7db3e78835102ded8d11d851
@@ -1,5 +1,5 @@
1
1
  {
2
- "id": "WorldCRS84Quad",
2
+ "id": "WGS1984Quad",
3
3
  "title": "EPSG:4326 for the World",
4
4
  "uri": "http://www.opengis.net/def/tilematrixset/OGC/1.0/WorldCRS84Quad",
5
5
  "crs": "http://www.opengis.net/def/crs/EPSG/0/4326",
@@ -322,4 +322,4 @@
322
322
  "matrixHeight": 8388608
323
323
  }
324
324
  ]
325
- }
325
+ }
morecantile/models.py CHANGED
@@ -64,15 +64,12 @@ class CRSUri(BaseModel):
64
64
 
65
65
 
66
66
  class CRSWKT(BaseModel):
67
- """Coordinate Reference System (CRS) from WKT."""
67
+ """Coordinate Reference System (CRS) from WKT encoded as PROJJSON Object."""
68
68
 
69
69
  wkt: Annotated[
70
- str,
70
+ Dict,
71
71
  Field(
72
- description="Reference to one coordinate reference system (CRS) as WKT string",
73
- examples=[
74
- 'GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]',
75
- ],
72
+ description="An object defining the CRS using the JSON encoding for Well-known text representation of coordinate reference systems 2.0",
76
73
  ),
77
74
  ]
78
75
 
@@ -109,7 +106,7 @@ class CRS(RootModel[Union[str, Union[CRSUri, CRSWKT, CRSRef]]]):
109
106
  self._pyproj_crs = pyproj.CRS.from_user_input(str(self.root.uri))
110
107
 
111
108
  elif isinstance(self.root, CRSWKT):
112
- self._pyproj_crs = pyproj.CRS.from_wkt(self.root.wkt)
109
+ self._pyproj_crs = pyproj.CRS.from_json_dict(self.root.wkt)
113
110
 
114
111
  elif isinstance(self.root, CRSRef):
115
112
  raise NotImplementedError(
@@ -660,10 +657,10 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
660
657
  try:
661
658
  pyproj.CRS.from_user_input(crs_data)
662
659
  except CRSError:
663
- crs_data = {"wkt": crs.to_wkt()}
660
+ crs_data = {"wkt": crs.to_json_dict()}
664
661
 
665
662
  else:
666
- crs_data = {"wkt": crs.to_wkt()}
663
+ crs_data = {"wkt": crs.to_json_dict()}
667
664
 
668
665
  return cls(
669
666
  crs=crs_data,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: morecantile
3
- Version: 5.2.0
3
+ Version: 5.2.2
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>
@@ -1,8 +1,8 @@
1
- morecantile/__init__.py,sha256=qrbhF4eLNolD6XXCZZn98TOwwGcznFXIonXVUU39JMU,436
1
+ morecantile/__init__.py,sha256=olaQSuWOHHJbkEE6t25_i-TB1zaWcAePW5ulgHD6dKY,436
2
2
  morecantile/commons.py,sha256=nOj5f5K5EbDZiC0QTK2f14Mpkz6YIZyCaaUI0S9aWIw,1015
3
3
  morecantile/defaults.py,sha256=9lvHmZ9WM_J5uNCS9VWEy8O5_x2dA2Spvk4H5aHv6UQ,1804
4
4
  morecantile/errors.py,sha256=rhtdpNglfEz5nC8I-BJKUr_gkOwAPwVi1vhLFJ2StYw,907
5
- morecantile/models.py,sha256=Hh_rhw28MZayDrzeUvUmgYjAMNcWCwDJSOllMbJAX68,48816
5
+ morecantile/models.py,sha256=fnAgJsKgKssC6wUq8xi3hG-1qbcS-RSGSGBBkkqNJz8,48718
6
6
  morecantile/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  morecantile/utils.py,sha256=J37ixKq_lJC23bqJSAf01mfS-ZEHizvt2uqVE47dPRE,3364
8
8
  morecantile/data/CDB1GlobalGrid.json,sha256=VDc2ukAWtTQeCdOG8YMqsGO-D7eSzSCN1TEaBn2qLZI,36115
@@ -11,18 +11,18 @@ morecantile/data/EuropeanETRS89_LAEAQuad.json,sha256=pR2Q7eAlLRG74SRdzYhXj19bf5q
11
11
  morecantile/data/GNOSISGlobalGrid.json,sha256=xFrneT5mwP3gJkDeCTkyuSXniw9Afdoa1PqdbqmVRaA,74685
12
12
  morecantile/data/LINZAntarticaMapTilegrid.json,sha256=dPfxQgpQlCAaaecmems9lTeFkPLbg0iBFqh5ItL-cpQ,5176
13
13
  morecantile/data/NZTM2000Quad.json,sha256=PAbOQYz4-TWduSqPVCpbEuaFwNBuVLDbefVVxFN531k,8457
14
- morecantile/data/README.md,sha256=raRWxSQ6FO-vzkbcwQB_DKKditbRwNvynfFegsaK4Ek,242
14
+ morecantile/data/README.md,sha256=b0ipEXJ24gR_7UmAdZuRxb_UjvQxuzqrJQOYMED-JUo,257
15
15
  morecantile/data/UPSAntarcticWGS84Quad.json,sha256=mmvm_HNKHpZloQPiN53LsIm8Ix9qZIV9CSxnkTRa--Y,7374
16
16
  morecantile/data/UPSArcticWGS84Quad.json,sha256=BupbyUtl1gZOrah5wnVUfOa1cKV_6RShjGx5Q56ReBI,7365
17
17
  morecantile/data/UTM31WGS84Quad.json,sha256=-cDrMJ-LFEFug7pVL85PKCdzTIWfiJwevv_QE5811Bs,7367
18
- morecantile/data/WGS1984Quad.json,sha256=tZMpBJS0fRAwJecH8VR7gvDh2g8F5kPqh6dcCni6VgI,6932
18
+ morecantile/data/WGS1984Quad.json,sha256=7qnkuMBPAjdahGREta6_uScNkDoK7pUbplA3froQnrs,6930
19
19
  morecantile/data/WebMercatorQuad.json,sha256=kEaPEAaZrD8vQZo2OvcQlS1Q7lq3ums-uPJs46aPceY,7844
20
20
  morecantile/data/WorldCRS84Quad.json,sha256=l0Wf2faYwzRwO0mG-Tea1Vydpi7V1Oel5L9l2NXHogk,7072
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=zSE15udt2Mb8IR9XB01gm8k_L65ON4_WAkpcJmQazlI,16859
24
- morecantile-5.2.0.dist-info/entry_points.txt,sha256=keoXuYgnX-mdrGWwXIHqEkSZjQK_iAmtmdrtZ3sCT24,59
25
- morecantile-5.2.0.dist-info/LICENSE,sha256=18IxFIta7rF_RcVSIgLUUd_alyfQ9bGoZKQm5vOarGU,1073
26
- morecantile-5.2.0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
27
- morecantile-5.2.0.dist-info/METADATA,sha256=FTjfT1E8CTVu--HO5dg03V0ur3Tk3nvNPqRkErad9w0,6890
28
- morecantile-5.2.0.dist-info/RECORD,,
24
+ morecantile-5.2.2.dist-info/entry_points.txt,sha256=keoXuYgnX-mdrGWwXIHqEkSZjQK_iAmtmdrtZ3sCT24,59
25
+ morecantile-5.2.2.dist-info/LICENSE,sha256=18IxFIta7rF_RcVSIgLUUd_alyfQ9bGoZKQm5vOarGU,1073
26
+ morecantile-5.2.2.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
27
+ morecantile-5.2.2.dist-info/METADATA,sha256=AzDUe0Q7S7VB3ycLqng79KqQF0PXr_Lw11n9R92JKOY,6890
28
+ morecantile-5.2.2.dist-info/RECORD,,