morecantile 5.2.2__tar.gz → 5.2.3__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 (30) hide show
  1. {morecantile-5.2.2 → morecantile-5.2.3}/.bumpversion.cfg +1 -1
  2. {morecantile-5.2.2 → morecantile-5.2.3}/PKG-INFO +1 -1
  3. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/__init__.py +1 -1
  4. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/models.py +132 -40
  5. {morecantile-5.2.2 → morecantile-5.2.3}/pyproject.toml +6 -0
  6. {morecantile-5.2.2 → morecantile-5.2.3}/.gitignore +0 -0
  7. {morecantile-5.2.2 → morecantile-5.2.3}/.pre-commit-config.yaml +0 -0
  8. {morecantile-5.2.2 → morecantile-5.2.3}/LICENSE +0 -0
  9. {morecantile-5.2.2 → morecantile-5.2.3}/README.md +0 -0
  10. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/commons.py +0 -0
  11. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/CDB1GlobalGrid.json +0 -0
  12. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/CanadianNAD83_LCC.json +0 -0
  13. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/EuropeanETRS89_LAEAQuad.json +0 -0
  14. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/GNOSISGlobalGrid.json +0 -0
  15. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/LINZAntarticaMapTilegrid.json +0 -0
  16. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/NZTM2000Quad.json +0 -0
  17. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/README.md +0 -0
  18. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/UPSAntarcticWGS84Quad.json +0 -0
  19. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/UPSArcticWGS84Quad.json +0 -0
  20. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/UTM31WGS84Quad.json +0 -0
  21. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/WGS1984Quad.json +0 -0
  22. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/WebMercatorQuad.json +0 -0
  23. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/WorldCRS84Quad.json +0 -0
  24. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/data/WorldMercatorWGS84Quad.json +0 -0
  25. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/defaults.py +0 -0
  26. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/errors.py +0 -0
  27. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/py.typed +0 -0
  28. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/scripts/__init__.py +0 -0
  29. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/scripts/cli.py +0 -0
  30. {morecantile-5.2.2 → morecantile-5.2.3}/morecantile/utils.py +0 -0
@@ -1,5 +1,5 @@
1
1
  [bumpversion]
2
- current_version = 5.2.2
2
+ current_version = 5.2.3
3
3
  commit = True
4
4
  tag = True
5
5
  tag_name = {new_version}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: morecantile
3
- Version: 5.2.2
3
+ Version: 5.2.3
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>
@@ -8,7 +8,7 @@ Refs:
8
8
 
9
9
  """
10
10
 
11
- __version__ = "5.2.2"
11
+ __version__ = "5.2.3"
12
12
 
13
13
  from .commons import BoundingBox, Coords, Tile # noqa
14
14
  from .defaults import TileMatrixSets, tms # noqa
@@ -54,11 +54,13 @@ class CRSUri(BaseModel):
54
54
  uri: Annotated[
55
55
  AnyUrl,
56
56
  Field(
57
- description="Reference to one coordinate reference system (CRS) as URI",
58
- examples=[
59
- "http://www.opengis.net/def/crs/EPSG/0/3978",
60
- "urn:ogc:def:crs:EPSG::2193",
61
- ],
57
+ json_schema_extra={
58
+ "description": "Reference to one coordinate reference system (CRS) as URI",
59
+ "exemples": [
60
+ "http://www.opengis.net/def/crs/EPSG/0/3978",
61
+ "urn:ogc:def:crs:EPSG::2193",
62
+ ],
63
+ }
62
64
  ),
63
65
  ]
64
66
 
@@ -69,7 +71,9 @@ class CRSWKT(BaseModel):
69
71
  wkt: Annotated[
70
72
  Dict,
71
73
  Field(
72
- description="An object defining the CRS using the JSON encoding for Well-known text representation of coordinate reference systems 2.0",
74
+ json_schema_extra={
75
+ "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
79
 
@@ -80,7 +84,9 @@ class CRSRef(BaseModel):
80
84
  referenceSystem: Annotated[
81
85
  Dict[str, Any],
82
86
  Field(
83
- description="A reference system data structure as defined in the MD_ReferenceSystem of the ISO 19115",
87
+ json_schema_extra={
88
+ "description": "A reference system data structure as defined in the MD_ReferenceSystem of the ISO 19115",
89
+ }
84
90
  ),
85
91
  ]
86
92
 
@@ -178,19 +184,35 @@ class TMSBoundingBox(BaseModel, arbitrary_types_allowed=True):
178
184
 
179
185
  lowerLeft: Annotated[
180
186
  BoundsType,
181
- Field(description="A 2D Point in the CRS indicated elsewhere"),
187
+ Field(
188
+ json_schema_extra={
189
+ "description": "A 2D Point in the CRS indicated elsewhere",
190
+ }
191
+ ),
182
192
  ]
183
193
  upperRight: Annotated[
184
194
  BoundsType,
185
- Field(description="A 2D Point in the CRS indicated elsewhere"),
195
+ Field(
196
+ json_schema_extra={
197
+ "description": "A 2D Point in the CRS indicated elsewhere",
198
+ }
199
+ ),
186
200
  ]
187
201
  crs: Annotated[
188
202
  Optional[CRS],
189
- Field(description="Coordinate Reference System (CRS)"),
203
+ Field(
204
+ json_schema_extra={
205
+ "description": "Coordinate Reference System (CRS)",
206
+ }
207
+ ),
190
208
  ] = None
191
209
  orderedAxes: Annotated[
192
210
  Optional[axesInfo],
193
- Field(description="Ordered list of names of the dimensions defined in the CRS"),
211
+ Field(
212
+ json_schema_extra={
213
+ "description": "Ordered list of names of the dimensions defined in the CRS",
214
+ }
215
+ ),
194
216
  ] = None
195
217
 
196
218
 
@@ -205,7 +227,9 @@ class variableMatrixWidth(BaseModel):
205
227
  Field(
206
228
  ge=2,
207
229
  multiple_of=1,
208
- description="Number of tiles in width that coalesce in a single tile for these rows",
230
+ json_schema_extra={
231
+ "description": "Number of tiles in width that coalesce in a single tile for these rows",
232
+ },
209
233
  ),
210
234
  ]
211
235
  minTileRow: Annotated[
@@ -213,7 +237,9 @@ class variableMatrixWidth(BaseModel):
213
237
  Field(
214
238
  ge=0,
215
239
  multiple_of=1,
216
- description="First tile row where the coalescence factor applies for this tilematrix",
240
+ json_schema_extra={
241
+ "description": "First tile row where the coalescence factor applies for this tilematrix",
242
+ },
217
243
  ),
218
244
  ]
219
245
  maxTileRow: Annotated[
@@ -221,7 +247,9 @@ class variableMatrixWidth(BaseModel):
221
247
  Field(
222
248
  ge=0,
223
249
  multiple_of=1,
224
- description="Last tile row where the coalescence factor applies for this tilematrix",
250
+ json_schema_extra={
251
+ "description": "Last tile row where the coalescence factor applies for this tilematrix",
252
+ },
225
253
  ),
226
254
  ]
227
255
 
@@ -237,46 +265,66 @@ class TileMatrix(BaseModel, extra="forbid"):
237
265
  title: Annotated[
238
266
  Optional[str],
239
267
  Field(
240
- description="Title of this tile matrix, normally used for display to a human"
268
+ json_schema_extra={
269
+ "description": "Title of this tile matrix, normally used for display to a human",
270
+ }
241
271
  ),
242
272
  ] = None
243
273
  description: Annotated[
244
274
  Optional[str],
245
275
  Field(
246
- description="Brief narrative description of this tile matrix set, normally available for display to a human",
276
+ json_schema_extra={
277
+ "description": "Brief narrative description of this tile matrix set, normally available for display to a human",
278
+ }
247
279
  ),
248
280
  ] = None
249
281
  keywords: Annotated[
250
282
  Optional[List[str]],
251
283
  Field(
252
- description="Unordered list of one or more commonly used or formalized word(s) or phrase(s) used to describe this dataset",
284
+ json_schema_extra={
285
+ "description": "Unordered list of one or more commonly used or formalized word(s) or phrase(s) used to describe this dataset",
286
+ }
253
287
  ),
254
288
  ] = None
255
289
  id: Annotated[
256
290
  str,
257
291
  Field(
258
292
  pattern=r"^\-?[0-9]+$",
259
- description="Identifier selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile. Implementation of 'identifier'",
293
+ json_schema_extra={
294
+ "description": "Identifier selecting one of the scales defined in the TileMatrixSet and representing the scaleDenominator the tile. Implementation of 'identifier'",
295
+ },
260
296
  ),
261
297
  ]
262
298
  scaleDenominator: Annotated[
263
299
  float,
264
- Field(description="Scale denominator of this tile matrix"),
300
+ Field(
301
+ json_schema_extra={
302
+ "description": "Scale denominator of this tile matrix",
303
+ }
304
+ ),
265
305
  ]
266
306
  cellSize: Annotated[
267
307
  float,
268
- Field(description="Cell size of this tile matrix"),
308
+ Field(
309
+ json_schema_extra={
310
+ "description": "Cell size of this tile matrix",
311
+ }
312
+ ),
269
313
  ]
270
314
  cornerOfOrigin: Annotated[
271
315
  Literal["topLeft", "bottomLeft"],
272
316
  Field(
273
- description="The corner of the tile matrix (_topLeft_ or _bottomLeft_) used as the origin for numbering tile rows and columns. This corner is also a corner of the (0, 0) tile.",
317
+ json_schema_extra={
318
+ "description": "The corner of the tile matrix (_topLeft_ or _bottomLeft_) used as the origin for numbering tile rows and columns. This corner is also a corner of the (0, 0) tile.",
319
+ }
274
320
  ),
275
321
  ] = "topLeft"
276
322
  pointOfOrigin: Annotated[
277
323
  BoundsType,
278
324
  Field(
279
- description="Precise position in CRS coordinates of the corner of origin (e.g. the top-left corner) for this tile matrix. This position is also a corner of the (0, 0) tile. In previous version, this was 'topLeftCorner' and 'cornerOfOrigin' did not exist.",
325
+ json_schema_extra={
326
+ "description": "Precise position in CRS coordinates of the corner of origin (e.g. the top-left corner) for this tile matrix. This position is also a corner of the (0, 0) tile. In previous version, this was 'topLeftCorner' and 'cornerOfOrigin' did not exist.",
327
+ }
280
328
  ),
281
329
  ]
282
330
  tileWidth: Annotated[
@@ -284,7 +332,9 @@ class TileMatrix(BaseModel, extra="forbid"):
284
332
  Field(
285
333
  ge=1,
286
334
  multiple_of=1,
287
- description="Width of each tile of this tile matrix in pixels",
335
+ json_schema_extra={
336
+ "description": "Width of each tile of this tile matrix in pixels",
337
+ },
288
338
  ),
289
339
  ]
290
340
  tileHeight: Annotated[
@@ -292,7 +342,9 @@ class TileMatrix(BaseModel, extra="forbid"):
292
342
  Field(
293
343
  ge=1,
294
344
  multiple_of=1,
295
- description="Height of each tile of this tile matrix in pixels",
345
+ json_schema_extra={
346
+ "description": "Height of each tile of this tile matrix in pixels",
347
+ },
296
348
  ),
297
349
  ]
298
350
  matrixWidth: Annotated[
@@ -300,7 +352,9 @@ class TileMatrix(BaseModel, extra="forbid"):
300
352
  Field(
301
353
  ge=1,
302
354
  multiple_of=1,
303
- description="Width of the matrix (number of tiles in width)",
355
+ json_schema_extra={
356
+ "description": "Width of the matrix (number of tiles in width)",
357
+ },
304
358
  ),
305
359
  ]
306
360
  matrixHeight: Annotated[
@@ -308,12 +362,18 @@ class TileMatrix(BaseModel, extra="forbid"):
308
362
  Field(
309
363
  ge=1,
310
364
  multiple_of=1,
311
- description="Height of the matrix (number of tiles in height)",
365
+ json_schema_extra={
366
+ "description": "Height of the matrix (number of tiles in height)",
367
+ },
312
368
  ),
313
369
  ]
314
370
  variableMatrixWidths: Annotated[
315
371
  Optional[List[variableMatrixWidth]],
316
- Field(description="Describes the rows that has variable matrix width"),
372
+ Field(
373
+ json_schema_extra={
374
+ "description": "Describes the rows that has variable matrix width",
375
+ }
376
+ ),
317
377
  ] = None
318
378
 
319
379
  def get_coalesce_factor(self, row: int) -> int:
@@ -350,51 +410,83 @@ class TileMatrixSet(BaseModel, arbitrary_types_allowed=True):
350
410
  title: Annotated[
351
411
  Optional[str],
352
412
  Field(
353
- description="Title of this tile matrix set, normally used for display to a human",
413
+ json_schema_extra={
414
+ "description": "Title of this tile matrix set, normally used for display to a human",
415
+ }
416
+ ),
417
+ ] = None
418
+ description: Annotated[
419
+ Optional[str],
420
+ Field(
421
+ json_schema_extra={
422
+ "description": "Brief narrative description of this tile matrix set, normally available for display to a human",
423
+ }
354
424
  ),
355
425
  ] = None
356
- description: Optional[str] = Field(
357
- None,
358
- description="Brief narrative description of this tile matrix set, normally available for display to a human",
359
- )
360
426
  keywords: Annotated[
361
427
  Optional[List[str]],
362
428
  Field(
363
- description="Unordered list of one or more commonly used or formalized word(s) or phrase(s) used to describe this tile matrix set",
429
+ json_schema_extra={
430
+ "description": "Unordered list of one or more commonly used or formalized word(s) or phrase(s) used to describe this tile matrix set",
431
+ }
364
432
  ),
365
433
  ] = None
366
434
  id: Annotated[
367
435
  Optional[str],
368
436
  Field(
369
437
  pattern=r"^[\w\d_\-]+$",
370
- description="Tile matrix set identifier. Implementation of 'identifier'",
438
+ json_schema_extra={
439
+ "description": "Tile matrix set identifier. Implementation of 'identifier'",
440
+ },
371
441
  ),
372
442
  ] = None
373
443
  uri: Annotated[
374
444
  Optional[str],
375
- Field(description="Reference to an official source for this tileMatrixSet"),
445
+ Field(
446
+ json_schema_extra={
447
+ "description": "Reference to an official source for this tileMatrixSet",
448
+ }
449
+ ),
376
450
  ] = None
377
451
  orderedAxes: Annotated[
378
452
  Optional[axesInfo],
379
- Field(description="Ordered list of names of the dimensions defined in the CRS"),
453
+ Field(
454
+ json_schema_extra={
455
+ "description": "Ordered list of names of the dimensions defined in the CRS",
456
+ }
457
+ ),
380
458
  ] = None
381
459
  crs: Annotated[
382
460
  CRS,
383
- Field(description="Coordinate Reference System (CRS)"),
461
+ Field(
462
+ json_schema_extra={
463
+ "description": "Coordinate Reference System (CRS)",
464
+ }
465
+ ),
384
466
  ]
385
467
  wellKnownScaleSet: Annotated[
386
468
  Optional[AnyHttpUrl],
387
- Field(description="Reference to a well-known scale set"),
469
+ Field(
470
+ json_schema_extra={
471
+ "description": "Reference to a well-known scale set",
472
+ }
473
+ ),
388
474
  ] = None
389
475
  boundingBox: Annotated[
390
476
  Optional[TMSBoundingBox],
391
477
  Field(
392
- description="Minimum bounding rectangle surrounding the tile matrix set, in the supported CRS",
478
+ json_schema_extra={
479
+ "description": "Minimum bounding rectangle surrounding the tile matrix set, in the supported CRS",
480
+ }
393
481
  ),
394
482
  ] = None
395
483
  tileMatrices: Annotated[
396
484
  List[TileMatrix],
397
- Field(description="Describes scale levels and its tile matrices"),
485
+ Field(
486
+ json_schema_extra={
487
+ "description": "Describes scale levels and its tile matrices",
488
+ }
489
+ ),
398
490
  ]
399
491
 
400
492
  # Private attributes
@@ -104,3 +104,9 @@ ignore = [
104
104
 
105
105
  [tool.ruff.per-file-ignores]
106
106
  "tests/*.py" = ["D1"]
107
+
108
+
109
+ [tool.pytest.ini_options]
110
+ filterwarnings = [
111
+ "ignore:You will likely lose important projection*:UserWarning",
112
+ ]
File without changes
File without changes
File without changes