morecantile 3.3.0__py3-none-any.whl → 4.0.0a0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: morecantile
3
- Version: 3.3.0
3
+ Version: 4.0.0a0
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>
@@ -17,6 +17,7 @@ Classifier: Topic :: Scientific/Engineering :: GIS
17
17
  Requires-Dist: attrs
18
18
  Requires-Dist: pyproj~=3.1
19
19
  Requires-Dist: pydantic
20
+ Requires-Dist: cachetools
20
21
  Requires-Dist: pre-commit ; extra == "dev"
21
22
  Requires-Dist: mkdocs ; extra == "docs"
22
23
  Requires-Dist: mkdocs-material ; extra == "docs"
@@ -25,6 +26,7 @@ Requires-Dist: rasterio>=1.2.1 ; extra == "rasterio"
25
26
  Requires-Dist: mercantile ; extra == "test"
26
27
  Requires-Dist: pytest ; extra == "test"
27
28
  Requires-Dist: pytest-cov ; extra == "test"
29
+ Requires-Dist: rasterio>=1.2.1 ; extra == "test"
28
30
  Project-URL: Documentation, https://developmentseed.org/morecantile/
29
31
  Project-URL: Source, https://github.com/developmentseed/morecantile
30
32
  Provides-Extra: dev
@@ -34,26 +36,10 @@ Provides-Extra: test
34
36
 
35
37
  # Morecantile
36
38
 
37
- ```
38
- +-------------+-------------+ ymax
39
- | | |
40
- | x: 0 | x: 1 |
41
- | y: 0 | y: 0 |
42
- | z: 1 | z: 1 |
43
- | | |
44
- +-------------+-------------+
45
- | | |
46
- | x: 0 | x: 1 |
47
- | y: 1 | y: 1 |
48
- | z: 1 | z: 1 |
49
- | | |
50
- +-------------+-------------+ ymin
51
-
52
- xmin xmax
53
- ```
54
-
55
39
  <p align="center">
56
- <em>Construct and use map tile grids (a.k.a TileMatrixSet / TMS).</em>
40
+ <img height="500" src="https://github.com/developmentseed/morecantile/assets/10407788/a1523c6d-e255-4dc6-a201-20029715858a"/>
41
+ <p align="center">Construct and use map tile grids (a.k.a TileMatrixSet / TMS).</p>
42
+
57
43
  </p>
58
44
  <p align="center">
59
45
  <a href="https://github.com/developmentseed/morecantile/actions?query=workflow%3ACI" target="_blank">
@@ -83,7 +69,12 @@ xmin xmax
83
69
 
84
70
  Morecantile is like [mercantile](https://github.com/mapbox/mercantile) (the best tool to work with Web Mercator tile indexes), but with support for other TileMatrixSet grids.
85
71
 
86
- **Morecantile** follows the **OGC Two Dimensional Tile Matrix Set** specification found in [http://docs.opengeospatial.org/is/17-083r2/17-083r2.html](http://docs.opengeospatial.org/is/17-083r2/17-083r2.html)
72
+ **Morecantile** follows the **OGC Two Dimensional Tile Matrix Set** specification **2.0** found in [https://docs.ogc.org/is/17-083r4/17-083r4.html](https://docs.ogc.org/is/17-083r4/17-083r4.html)
73
+
74
+ | Morecantile Version | OGC Specification Version | Link
75
+ | ------------------- | ------------------------- |---------
76
+ | 4.0 | 2.0 | https://docs.ogc.org/is/17-083r4/17-083r4.html
77
+ | 3.0 and earlier | 1.0 | http://docs.opengeospatial.org/is/17-083r2/17-083r2.html
87
78
 
88
79
  **Note**: Variable matrix width tile set are not supported.
89
80
 
@@ -94,17 +85,54 @@ $ python -m pip install -U pip
94
85
  $ python -m pip install morecantile
95
86
 
96
87
  # Or install from source:
97
-
98
88
  $ python -m pip install -U pip
99
89
  $ python -m pip install git+https://github.com/developmentseed/morecantile.git
100
90
  ```
101
91
 
92
+ ## Usage
93
+
94
+ ```python
95
+ import morecantile
96
+
97
+ tms = morecantile.tms.get("WebMercatorQuad")
98
+
99
+ # Get TMS bounding box
100
+ print(tms.xy_bbox)
101
+ >>> BoundingBox(
102
+ left=-20037508.342789244,
103
+ bottom=-20037508.34278919,
104
+ right=20037508.34278919,
105
+ top=20037508.342789244,
106
+ )
107
+
108
+ # Get the bounds for tile Z=4, X=10, Y=10 in the TMS's CRS (e.g epsg:3857)
109
+ print(tms.xy_bounds(morecantile.Tile(10, 10, 4)))
110
+ >>> BoundingBox(
111
+ left=5009377.085697308,
112
+ bottom=-7514065.628545959,
113
+ right=7514065.628545959,
114
+ top=-5009377.085697308,
115
+ )
116
+
117
+ # Get the bounds for tile Z=4, X=10, Y=10 in Geographic CRS (e.g epsg:4326)
118
+ print(tms.bounds(morecantile.Tile(10, 10, 4)))
119
+ >>> BoundingBox(
120
+ left=44.999999999999964,
121
+ bottom=-55.776573018667634,
122
+ right=67.4999999999999,
123
+ top=-40.97989806962009,
124
+ )
125
+ ```
126
+
127
+ More info can be found at https://developmentseed.org/morecantile/usage/
128
+
102
129
  ### Defaults Grids
103
130
 
131
+ `morecantile` provides a set of default TMS grids:
132
+
104
133
  - **CanadianNAD83_LCC**: Lambert conformal conic NAD83 for Canada - EPSG:3978
105
134
  - **EuropeanETRS89_LAEAQuad**: ETRS89-extended / LAEA Europe - EPGS:3035
106
135
  - **LINZAntarticaMapTilegrid**: LINZ Antarctic Map Tile Grid (Ross Sea Region) - EPSG:5482
107
- - **NZTM2000**: LINZ NZTM2000 Map Tile Grid - EPSG:2193
108
136
  - **NZTM2000Quad**: LINZ NZTM2000 Map Tile Grid - EPSG:2193
109
137
  - **UPSAntarcticWGS84Quad**: Universal Polar Stereographic WGS 84 Quad for Antarctic - EPSG:5042
110
138
  - **UPSArcticWGS84Quad**: Universal Polar Stereographic WGS 84 Quad for Arctic - EPSG:5041
@@ -114,13 +142,16 @@ $ python -m pip install git+https://github.com/developmentseed/morecantile.git
114
142
  - **WorldCRS84Quad**: CRS84 for the World
115
143
  - **WorldMercatorWGS84Quad**: Elliptical Mercator projection - EPGS:3395
116
144
 
117
- ref: http://schemas.opengis.net/tms/1.0/json/examples/
145
+ ref: https://schemas.opengis.net/tms/2.0/json/examples/tilematrixset/
118
146
 
119
147
  ## Implementations
120
148
 
121
149
  - [rio-tiler](https://github.com/cogeotiff/rio-tiler): Create tile from raster using Morecantile TMS.
122
- - [timvt](https://github.com/developmentseed/timvt): A lightweight PostGIS based dynamic vector tile server.
150
+ - [titiler](https://github.com/developmentseed/titiler): A modern dynamic tile server built on top of FastAPI and Rasterio/GDAL.
151
+ - [tipg](https://github.com/developmentseed/tipg): OGC Features and Tiles API.
123
152
  - [planetcantile](https://github.com/AndrewAnnex/planetcantile): Tile matrix sets for other planets.
153
+ - [supermorecado](https://github.com/developmentseed/supermorecado): Extend the functionality of morecantile with additional commands.
154
+
124
155
 
125
156
  ## Changes
126
157
 
@@ -0,0 +1,26 @@
1
+ morecantile/__init__.py,sha256=xiYjERwG1fmSzdVUz0UXMeXmDYQry2iqQut9dPzcQ8c,438
2
+ morecantile/commons.py,sha256=nOj5f5K5EbDZiC0QTK2f14Mpkz6YIZyCaaUI0S9aWIw,1015
3
+ morecantile/defaults.py,sha256=gMhQ2fVXlPGRlRQtZT0z3CByClZp_yStVnsxkutljBg,1748
4
+ morecantile/errors.py,sha256=rhtdpNglfEz5nC8I-BJKUr_gkOwAPwVi1vhLFJ2StYw,907
5
+ morecantile/models.py,sha256=h5WXQryOoBDM2u40oTWmP7PxBIqETsJYomCZpyWmX4k,39247
6
+ morecantile/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
+ morecantile/utils.py,sha256=J37ixKq_lJC23bqJSAf01mfS-ZEHizvt2uqVE47dPRE,3364
8
+ morecantile/data/CanadianNAD83_LCC.json,sha256=RuR9z5MjxKzU4KE-CutrzjpWBz9c-XXykKAxcD83veU,7267
9
+ morecantile/data/EuropeanETRS89_LAEAQuad.json,sha256=pR2Q7eAlLRG74SRdzYhXj19bf5qBvHrE6kzJ5cvko1Q,4679
10
+ morecantile/data/LINZAntarticaMapTilegrid.json,sha256=dPfxQgpQlCAaaecmems9lTeFkPLbg0iBFqh5ItL-cpQ,5176
11
+ morecantile/data/NZTM2000Quad.json,sha256=PAbOQYz4-TWduSqPVCpbEuaFwNBuVLDbefVVxFN531k,8457
12
+ morecantile/data/README.md,sha256=raRWxSQ6FO-vzkbcwQB_DKKditbRwNvynfFegsaK4Ek,242
13
+ morecantile/data/UPSAntarcticWGS84Quad.json,sha256=mmvm_HNKHpZloQPiN53LsIm8Ix9qZIV9CSxnkTRa--Y,7374
14
+ morecantile/data/UPSArcticWGS84Quad.json,sha256=BupbyUtl1gZOrah5wnVUfOa1cKV_6RShjGx5Q56ReBI,7365
15
+ morecantile/data/UTM31WGS84Quad.json,sha256=-cDrMJ-LFEFug7pVL85PKCdzTIWfiJwevv_QE5811Bs,7367
16
+ morecantile/data/WGS1984Quad.json,sha256=tZMpBJS0fRAwJecH8VR7gvDh2g8F5kPqh6dcCni6VgI,6932
17
+ morecantile/data/WebMercatorQuad.json,sha256=lOt6LFULgDk4mbxRbieESBLmHNmSOgccdWsnoDaVXYE,7843
18
+ morecantile/data/WorldCRS84Quad.json,sha256=l0Wf2faYwzRwO0mG-Tea1Vydpi7V1Oel5L9l2NXHogk,7072
19
+ morecantile/data/WorldMercatorWGS84Quad.json,sha256=JaqoBSu5qVJmL-J7oSVU1etP2OPWx_aVaTc68dGX0Ec,7001
20
+ morecantile/scripts/__init__.py,sha256=-CJncfgWDnSZ8au-SJtgX-OFgCddlf7___d91qQcqQM,23
21
+ morecantile/scripts/cli.py,sha256=_jak-sAa25q96POKCqpJkjLeSNyLYpv6oKslkbxivVA,16657
22
+ morecantile-4.0.0a0.dist-info/entry_points.txt,sha256=keoXuYgnX-mdrGWwXIHqEkSZjQK_iAmtmdrtZ3sCT24,59
23
+ morecantile-4.0.0a0.dist-info/LICENSE,sha256=18IxFIta7rF_RcVSIgLUUd_alyfQ9bGoZKQm5vOarGU,1073
24
+ morecantile-4.0.0a0.dist-info/WHEEL,sha256=EZbGkh7Ie4PoZfRQ8I0ZuP9VklN_TvcZ6DSE5Uar4z4,81
25
+ morecantile-4.0.0a0.dist-info/METADATA,sha256=PcBM3Tq2KwZ_9uigUWIAUohZdk8axAx-LCb-6_1SfI0,6734
26
+ morecantile-4.0.0a0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: flit 3.8.0
2
+ Generator: flit 3.9.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,242 +0,0 @@
1
- {
2
- "type": "TileMatrixSetType",
3
- "title": "LINZ NZTM2000 Map Tile Grid",
4
- "abstract": "See https://www.linz.govt.nz/data/linz-data-service/guides-and-documentation/nztm2000-map-tile-service-schema",
5
- "identifier": "NZTM2000",
6
- "supportedCRS": "urn:ogc:def:crs:EPSG::2193",
7
- "boundingBox": {
8
- "type": "BoundingBoxType",
9
- "crs": "urn:ogc:def:crs:EPSG::2193",
10
- "lowerCorner": [
11
- 3087000,
12
- 274000
13
- ],
14
- "upperCorner": [
15
- 7173000,
16
- 3327000
17
- ]
18
- },
19
- "tileMatrix": [
20
- {
21
- "type": "TileMatrixType",
22
- "identifier": "0",
23
- "scaleDenominator": 32000000,
24
- "topLeftCorner": [
25
- 10000000,
26
- -1000000
27
- ],
28
- "tileWidth": 256,
29
- "tileHeight": 256,
30
- "matrixWidth": 2,
31
- "matrixHeight": 4
32
- },
33
- {
34
- "type": "TileMatrixType",
35
- "identifier": "1",
36
- "scaleDenominator": 16000000,
37
- "topLeftCorner": [
38
- 10000000,
39
- -1000000
40
- ],
41
- "tileWidth": 256,
42
- "tileHeight": 256,
43
- "matrixWidth": 4,
44
- "matrixHeight": 8
45
- },
46
- {
47
- "type": "TileMatrixType",
48
- "identifier": "2",
49
- "scaleDenominator": 8000000,
50
- "topLeftCorner": [
51
- 10000000,
52
- -1000000
53
- ],
54
- "tileWidth": 256,
55
- "tileHeight": 256,
56
- "matrixWidth": 8,
57
- "matrixHeight": 16
58
- },
59
- {
60
- "type": "TileMatrixType",
61
- "identifier": "3",
62
- "scaleDenominator": 4000000,
63
- "topLeftCorner": [
64
- 10000000,
65
- -1000000
66
- ],
67
- "tileWidth": 256,
68
- "tileHeight": 256,
69
- "matrixWidth": 16,
70
- "matrixHeight": 32
71
- },
72
- {
73
- "type": "TileMatrixType",
74
- "identifier": "4",
75
- "scaleDenominator": 2000000,
76
- "topLeftCorner": [
77
- 10000000,
78
- -1000000
79
- ],
80
- "tileWidth": 256,
81
- "tileHeight": 256,
82
- "matrixWidth": 32,
83
- "matrixHeight": 64
84
- },
85
- {
86
- "type": "TileMatrixType",
87
- "identifier": "5",
88
- "scaleDenominator": 1000000,
89
- "topLeftCorner": [
90
- 10000000,
91
- -1000000
92
- ],
93
- "tileWidth": 256,
94
- "tileHeight": 256,
95
- "matrixWidth": 64,
96
- "matrixHeight": 128
97
- },
98
- {
99
- "type": "TileMatrixType",
100
- "identifier": "6",
101
- "scaleDenominator": 500000,
102
- "topLeftCorner": [
103
- 10000000,
104
- -1000000
105
- ],
106
- "tileWidth": 256,
107
- "tileHeight": 256,
108
- "matrixWidth": 128,
109
- "matrixHeight": 256
110
- },
111
- {
112
- "type": "TileMatrixType",
113
- "identifier": "7",
114
- "scaleDenominator": 250000,
115
- "topLeftCorner": [
116
- 10000000,
117
- -1000000
118
- ],
119
- "tileWidth": 256,
120
- "tileHeight": 256,
121
- "matrixWidth": 256,
122
- "matrixHeight": 512
123
- },
124
- {
125
- "type": "TileMatrixType",
126
- "identifier": "8",
127
- "scaleDenominator": 100000,
128
- "topLeftCorner": [
129
- 10000000,
130
- -1000000
131
- ],
132
- "tileWidth": 256,
133
- "tileHeight": 256,
134
- "matrixWidth": 640,
135
- "matrixHeight": 1280
136
- },
137
- {
138
- "type": "TileMatrixType",
139
- "identifier": "9",
140
- "scaleDenominator": 50000,
141
- "topLeftCorner": [
142
- 10000000,
143
- -1000000
144
- ],
145
- "tileWidth": 256,
146
- "tileHeight": 256,
147
- "matrixWidth": 1280,
148
- "matrixHeight": 2560
149
- },
150
- {
151
- "type": "TileMatrixType",
152
- "identifier": "10",
153
- "scaleDenominator": 25000,
154
- "topLeftCorner": [
155
- 10000000,
156
- -1000000
157
- ],
158
- "tileWidth": 256,
159
- "tileHeight": 256,
160
- "matrixWidth": 2560,
161
- "matrixHeight": 5120
162
- },
163
- {
164
- "type": "TileMatrixType",
165
- "identifier": "11",
166
- "scaleDenominator": 10000,
167
- "topLeftCorner": [
168
- 10000000,
169
- -1000000
170
- ],
171
- "tileWidth": 256,
172
- "tileHeight": 256,
173
- "matrixWidth": 6400,
174
- "matrixHeight": 12800
175
- },
176
- {
177
- "type": "TileMatrixType",
178
- "identifier": "12",
179
- "scaleDenominator": 5000,
180
- "topLeftCorner": [
181
- 10000000,
182
- -1000000
183
- ],
184
- "tileWidth": 256,
185
- "tileHeight": 256,
186
- "matrixWidth": 12800,
187
- "matrixHeight": 25600
188
- },
189
- {
190
- "type": "TileMatrixType",
191
- "identifier": "13",
192
- "scaleDenominator": 2500,
193
- "topLeftCorner": [
194
- 10000000,
195
- -1000000
196
- ],
197
- "tileWidth": 256,
198
- "tileHeight": 256,
199
- "matrixWidth": 25600,
200
- "matrixHeight": 51200
201
- },
202
- {
203
- "type": "TileMatrixType",
204
- "identifier": "14",
205
- "scaleDenominator": 1000,
206
- "topLeftCorner": [
207
- 10000000,
208
- -1000000
209
- ],
210
- "tileWidth": 256,
211
- "tileHeight": 256,
212
- "matrixWidth": 64000,
213
- "matrixHeight": 128000
214
- },
215
- {
216
- "type": "TileMatrixType",
217
- "identifier": "15",
218
- "scaleDenominator": 500,
219
- "topLeftCorner": [
220
- 10000000,
221
- -1000000
222
- ],
223
- "tileWidth": 256,
224
- "tileHeight": 256,
225
- "matrixWidth": 128000,
226
- "matrixHeight": 256000
227
- },
228
- {
229
- "type": "TileMatrixType",
230
- "identifier": "16",
231
- "scaleDenominator": 250,
232
- "topLeftCorner": [
233
- 10000000,
234
- -1000000
235
- ],
236
- "tileWidth": 256,
237
- "tileHeight": 256,
238
- "matrixWidth": 256000,
239
- "matrixHeight": 512000
240
- }
241
- ]
242
- }
@@ -1,27 +0,0 @@
1
- morecantile/__init__.py,sha256=cdkgr4fLpB3MmoA4qcPfGX9wlQmqpl_9dvmyyY8evaI,436
2
- morecantile/commons.py,sha256=nOj5f5K5EbDZiC0QTK2f14Mpkz6YIZyCaaUI0S9aWIw,1015
3
- morecantile/defaults.py,sha256=F-QxTzXGhvdKcsGyfYXr2oixCqAXA4PU6KNZCcvYMGA,1865
4
- morecantile/errors.py,sha256=X6sHfFUu6rz-OZQVLsewudTRyBuwJssdQK1uAIdCLNQ,818
5
- morecantile/models.py,sha256=YORs31hRLDztjktMrxePpau2wm7SV50YCn0pUpucqTU,34209
6
- morecantile/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
- morecantile/utils.py,sha256=y5jFjrIEmgaSRUTp65zYU2P7Gtvh3vZtIRsXvWbDeGM,3007
8
- morecantile/data/CanadianNAD83_LCC.json,sha256=TgT10fJV-oEfI0kRNcX1vRUWS-aODawBQGlfqe4lK54,10093
9
- morecantile/data/EuropeanETRS89_LAEAQuad.json,sha256=axTfRLPBYAi3_enHs39hbLQqLfRLAcJq1tTCmC3DCZk,8530
10
- morecantile/data/LINZAntarticaMapTilegrid.json,sha256=KXK27B68qk84kJoQVbb6aYZXc8NIxh_Nrbjeplwk5zQ,5204
11
- morecantile/data/NZTM2000.json,sha256=CeZ_RhrO5peJCke5YR_1Xucx2p-6Dg11A54Okph_0Lo,6576
12
- morecantile/data/NZTM2000Quad.json,sha256=kfopCLymnQlw9uXwFzqc3yxoY8CDhwzZzl_WwPHaBWc,7020
13
- morecantile/data/README.md,sha256=raRWxSQ6FO-vzkbcwQB_DKKditbRwNvynfFegsaK4Ek,242
14
- morecantile/data/UPSAntarcticWGS84Quad.json,sha256=4EJSpZ42eCJ4DIRsBzxWlASNtCNJk3qW91fcQwCaGKY,9893
15
- morecantile/data/UPSArcticWGS84Quad.json,sha256=vhknhGCN0wOCzFfqt8zlzd1Oc1oUO74Kr22zN3dMejc,9887
16
- morecantile/data/UTM31WGS84Quad.json,sha256=m7y0_RU6m695kiVBdCX_QqNRt3lp2AJxh2T61e2oXDA,9679
17
- morecantile/data/WGS1984Quad.json,sha256=HUYAhJsdjUmJ3SINAxKneTLCvFytMoKphR26Yb-7aM0,6866
18
- morecantile/data/WebMercatorQuad.json,sha256=aLlYOIhR73R7resgaA6iEuzaRDXM5GY9jYGMmYaQo68,10276
19
- morecantile/data/WorldCRS84Quad.json,sha256=Xc79e2QCdFcFxinWpp82qj0oZDylRhmk2mYorNzMCQs,6865
20
- morecantile/data/WorldMercatorWGS84Quad.json,sha256=OvNdMR7ypeCCSgYUdPw7d8KESFPjtonPHh_774OOO1E,10138
21
- morecantile/scripts/__init__.py,sha256=-CJncfgWDnSZ8au-SJtgX-OFgCddlf7___d91qQcqQM,23
22
- morecantile/scripts/cli.py,sha256=qeBC66Y1CuBGAN6Tnfg2lBUv-Rio95A9TTvAv3aR9fQ,16665
23
- morecantile-3.3.0.dist-info/entry_points.txt,sha256=keoXuYgnX-mdrGWwXIHqEkSZjQK_iAmtmdrtZ3sCT24,59
24
- morecantile-3.3.0.dist-info/LICENSE,sha256=18IxFIta7rF_RcVSIgLUUd_alyfQ9bGoZKQm5vOarGU,1073
25
- morecantile-3.3.0.dist-info/WHEEL,sha256=rSgq_JpHF9fHR1lx53qwg_1-2LypZE_qmcuXbVUq948,81
26
- morecantile-3.3.0.dist-info/METADATA,sha256=16WrQuw5dWaiyO0gjWSKnQXOLS4_3GnuuSbQSDgJtfA,5591
27
- morecantile-3.3.0.dist-info/RECORD,,