jupytergis-lab 0.1.7__py3-none-any.whl → 0.2.0__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.
Files changed (37) hide show
  1. jupytergis_lab/__init__.py +4 -1
  2. jupytergis_lab/_version.py +1 -1
  3. jupytergis_lab/notebook/gis_document.py +2 -1
  4. jupytergis_lab/notebook/objects/_schema/__init__.py +1 -1
  5. jupytergis_lab/notebook/objects/_schema/geoTiffSource.py +1 -1
  6. jupytergis_lab/notebook/objects/_schema/geojson.py +502 -0
  7. jupytergis_lab/notebook/objects/_schema/geojsonsource.py +5 -496
  8. jupytergis_lab/notebook/objects/_schema/hillshadeLayer.py +1 -1
  9. jupytergis_lab/notebook/objects/_schema/imageLayer.py +1 -1
  10. jupytergis_lab/notebook/objects/_schema/imageSource.py +1 -1
  11. jupytergis_lab/notebook/objects/_schema/jgis.py +3 -2
  12. jupytergis_lab/notebook/objects/_schema/rasterDemSource.py +1 -1
  13. jupytergis_lab/notebook/objects/_schema/rasterlayer.py +1 -1
  14. jupytergis_lab/notebook/objects/_schema/rastersource.py +1 -1
  15. jupytergis_lab/notebook/objects/_schema/shapefileSource.py +1 -1
  16. jupytergis_lab/notebook/objects/_schema/vectorTileLayer.py +1 -1
  17. jupytergis_lab/notebook/objects/_schema/vectorlayer.py +1 -1
  18. jupytergis_lab/notebook/objects/_schema/vectortilesource.py +1 -1
  19. jupytergis_lab/notebook/objects/_schema/videoSource.py +1 -1
  20. jupytergis_lab/notebook/objects/_schema/webGlLayer.py +1 -1
  21. {jupytergis_lab-0.1.7.data → jupytergis_lab-0.2.0.data}/data/share/jupyter/labextensions/@jupytergis/jupytergis-lab/package.json +5 -5
  22. jupytergis_lab-0.2.0.data/data/share/jupyter/labextensions/@jupytergis/jupytergis-lab/static/432.b9e4425867aaf84b8265.js +1 -0
  23. jupytergis_lab-0.2.0.data/data/share/jupyter/labextensions/@jupytergis/jupytergis-lab/static/484.dcb8adb9ab352d9a020a.js +1 -0
  24. jupytergis_lab-0.2.0.data/data/share/jupyter/labextensions/@jupytergis/jupytergis-lab/static/remoteEntry.eb20cd6997ba0e04fdd4.js +1 -0
  25. {jupytergis_lab-0.1.7.data → jupytergis_lab-0.2.0.data}/data/share/jupyter/labextensions/@jupytergis/jupytergis-lab/static/third-party-licenses.json +2 -14
  26. {jupytergis_lab-0.1.7.dist-info → jupytergis_lab-0.2.0.dist-info}/METADATA +3 -2
  27. jupytergis_lab-0.2.0.dist-info/RECORD +38 -0
  28. {jupytergis_lab-0.1.7.dist-info → jupytergis_lab-0.2.0.dist-info}/WHEEL +1 -1
  29. jupytergis_lab-0.1.7.data/data/share/jupyter/labextensions/@jupytergis/jupytergis-lab/static/373.c9665cd61cec2cac6c92.js +0 -1
  30. jupytergis_lab-0.1.7.data/data/share/jupyter/labextensions/@jupytergis/jupytergis-lab/static/432.da334fecdbdcf578023a.js +0 -1
  31. jupytergis_lab-0.1.7.data/data/share/jupyter/labextensions/@jupytergis/jupytergis-lab/static/484.d47a4ad6c7ea5bdd6cd4.js +0 -1
  32. jupytergis_lab-0.1.7.data/data/share/jupyter/labextensions/@jupytergis/jupytergis-lab/static/remoteEntry.a53ddce78208ca06727f.js +0 -1
  33. jupytergis_lab-0.1.7.dist-info/RECORD +0 -38
  34. {jupytergis_lab-0.1.7.data → jupytergis_lab-0.2.0.data}/data/share/jupyter/labextensions/@jupytergis/jupytergis-lab/install.json +0 -0
  35. {jupytergis_lab-0.1.7.data → jupytergis_lab-0.2.0.data}/data/share/jupyter/labextensions/@jupytergis/jupytergis-lab/static/234.c2d7ed33ae9ca2244b0d.js +0 -0
  36. {jupytergis_lab-0.1.7.data → jupytergis_lab-0.2.0.data}/data/share/jupyter/labextensions/@jupytergis/jupytergis-lab/static/style.js +0 -0
  37. {jupytergis_lab-0.1.7.dist-info → jupytergis_lab-0.2.0.dist-info}/licenses/LICENSE +0 -0
@@ -11,9 +11,12 @@ except ImportError:
11
11
  import sys
12
12
 
13
13
  if sys.platform == "emscripten":
14
- raise ImportError("Cannot use the JupyterGIS Python API in a JupyterLite kernel yet")
14
+ raise ImportError(
15
+ "Cannot use the JupyterGIS Python API in a JupyterLite kernel yet"
16
+ )
15
17
 
16
18
  from .notebook import GISDocument # noqa
17
19
 
20
+
18
21
  def _jupyter_labextension_paths():
19
22
  return [{"src": "labextension", "dest": "@jupytergis/jupytergis-lab"}]
@@ -1,4 +1,4 @@
1
1
  # This file is auto-generated by Hatchling. As such, do not:
2
2
  # - modify
3
3
  # - track in version control e.g. be sure to add to .gitignore
4
- __version__ = VERSION = '0.1.7'
4
+ __version__ = VERSION = '0.2.0'
@@ -69,6 +69,7 @@ class GISDocument(CommWidget):
69
69
  self.ydoc["sources"] = self._sources = Map()
70
70
  self.ydoc["options"] = self._options = Map()
71
71
  self.ydoc["layerTree"] = self._layerTree = Array()
72
+ self.ydoc["metadata"] = self._metadata = Map()
72
73
 
73
74
  if path is None:
74
75
  if latitude is not None:
@@ -320,7 +321,7 @@ class GISDocument(CommWidget):
320
321
  source_id = self._add_source(OBJECT_FACTORY.create_source(source, self))
321
322
 
322
323
  layer = {
323
- "type": LayerType.RasterLayer,
324
+ "type": LayerType.ImageLayer,
324
325
  "name": name,
325
326
  "visible": True,
326
327
  "parameters": {"source": source_id, "opacity": opacity},
@@ -1,3 +1,3 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: schema
3
- # timestamp: 2024-12-06T09:33:45+00:00
3
+ # timestamp: 2025-01-10T12:03:11+00:00
@@ -1,6 +1,6 @@
1
1
  # generated by datamodel-codegen:
2
2
  # filename: geoTiffSource.json
3
- # timestamp: 2024-12-06T09:33:45+00:00
3
+ # timestamp: 2025-01-10T12:03:11+00:00
4
4
 
5
5
  from __future__ import annotations
6
6
 
@@ -0,0 +1,502 @@
1
+ # generated by datamodel-codegen:
2
+ # filename: geojson.json
3
+ # timestamp: 2025-01-10T12:03:11+00:00
4
+
5
+ from __future__ import annotations
6
+
7
+ from enum import Enum
8
+ from typing import Any, Dict, List, Optional, Union
9
+
10
+ from pydantic import BaseModel, Field, RootModel
11
+
12
+
13
+ class Type(Enum):
14
+ Point = 'Point'
15
+
16
+
17
+ class GeoJSON1(BaseModel):
18
+ type: Type
19
+ coordinates: List[float] = Field(..., min_length=2)
20
+ bbox: Optional[List[float]] = Field(None, min_length=4)
21
+
22
+
23
+ class Type1(Enum):
24
+ LineString = 'LineString'
25
+
26
+
27
+ class Coordinate(RootModel[List[float]]):
28
+ root: List[float]
29
+
30
+
31
+ class GeoJSON2(BaseModel):
32
+ type: Type1
33
+ coordinates: List[Coordinate] = Field(..., min_length=2)
34
+ bbox: Optional[List[float]] = Field(None, min_length=4)
35
+
36
+
37
+ class Type2(Enum):
38
+ Polygon = 'Polygon'
39
+
40
+
41
+ class GeoJSON3(BaseModel):
42
+ type: Type2
43
+ coordinates: List[List[Coordinate]]
44
+ bbox: Optional[List[float]] = Field(None, min_length=4)
45
+
46
+
47
+ class Type3(Enum):
48
+ MultiPoint = 'MultiPoint'
49
+
50
+
51
+ class GeoJSON4(BaseModel):
52
+ type: Type3
53
+ coordinates: List[List[float]]
54
+ bbox: Optional[List[float]] = Field(None, min_length=4)
55
+
56
+
57
+ class Type4(Enum):
58
+ MultiLineString = 'MultiLineString'
59
+
60
+
61
+ class GeoJSON5(BaseModel):
62
+ type: Type4
63
+ coordinates: List[List[Coordinate]]
64
+ bbox: Optional[List[float]] = Field(None, min_length=4)
65
+
66
+
67
+ class Type5(Enum):
68
+ MultiPolygon = 'MultiPolygon'
69
+
70
+
71
+ class GeoJSON6(BaseModel):
72
+ type: Type5
73
+ coordinates: List[List[List[Coordinate]]]
74
+ bbox: Optional[List[float]] = Field(None, min_length=4)
75
+
76
+
77
+ class Type6(Enum):
78
+ GeometryCollection = 'GeometryCollection'
79
+
80
+
81
+ class Type7(Enum):
82
+ Point = 'Point'
83
+
84
+
85
+ class Geometries(BaseModel):
86
+ type: Type7
87
+ coordinates: List[float] = Field(..., min_length=2)
88
+ bbox: Optional[List[float]] = Field(None, min_length=4)
89
+
90
+
91
+ class Type8(Enum):
92
+ LineString = 'LineString'
93
+
94
+
95
+ class Geometries1(BaseModel):
96
+ type: Type8
97
+ coordinates: List[Coordinate] = Field(..., min_length=2)
98
+ bbox: Optional[List[float]] = Field(None, min_length=4)
99
+
100
+
101
+ class Type9(Enum):
102
+ Polygon = 'Polygon'
103
+
104
+
105
+ class Geometries2(BaseModel):
106
+ type: Type9
107
+ coordinates: List[List[Coordinate]]
108
+ bbox: Optional[List[float]] = Field(None, min_length=4)
109
+
110
+
111
+ class Type10(Enum):
112
+ MultiPoint = 'MultiPoint'
113
+
114
+
115
+ class Geometries3(BaseModel):
116
+ type: Type10
117
+ coordinates: List[List[float]]
118
+ bbox: Optional[List[float]] = Field(None, min_length=4)
119
+
120
+
121
+ class Type11(Enum):
122
+ MultiLineString = 'MultiLineString'
123
+
124
+
125
+ class Geometries4(BaseModel):
126
+ type: Type11
127
+ coordinates: List[List[Coordinate]]
128
+ bbox: Optional[List[float]] = Field(None, min_length=4)
129
+
130
+
131
+ class Type12(Enum):
132
+ MultiPolygon = 'MultiPolygon'
133
+
134
+
135
+ class Geometries5(BaseModel):
136
+ type: Type12
137
+ coordinates: List[List[List[Coordinate]]]
138
+ bbox: Optional[List[float]] = Field(None, min_length=4)
139
+
140
+
141
+ class GeoJSON7(BaseModel):
142
+ type: Type6
143
+ geometries: List[
144
+ Union[
145
+ Geometries, Geometries1, Geometries2, Geometries3, Geometries4, Geometries5
146
+ ]
147
+ ]
148
+ bbox: Optional[List[float]] = Field(None, min_length=4)
149
+
150
+
151
+ class Type13(Enum):
152
+ Feature = 'Feature'
153
+
154
+
155
+ class Type14(Enum):
156
+ Point = 'Point'
157
+
158
+
159
+ class Geometry(BaseModel):
160
+ type: Type14
161
+ coordinates: List[float] = Field(..., min_length=2)
162
+ bbox: Optional[List[float]] = Field(None, min_length=4)
163
+
164
+
165
+ class Type15(Enum):
166
+ LineString = 'LineString'
167
+
168
+
169
+ class Geometry1(BaseModel):
170
+ type: Type15
171
+ coordinates: List[Coordinate] = Field(..., min_length=2)
172
+ bbox: Optional[List[float]] = Field(None, min_length=4)
173
+
174
+
175
+ class Type16(Enum):
176
+ Polygon = 'Polygon'
177
+
178
+
179
+ class Geometry2(BaseModel):
180
+ type: Type16
181
+ coordinates: List[List[Coordinate]]
182
+ bbox: Optional[List[float]] = Field(None, min_length=4)
183
+
184
+
185
+ class Type17(Enum):
186
+ MultiPoint = 'MultiPoint'
187
+
188
+
189
+ class Geometry3(BaseModel):
190
+ type: Type17
191
+ coordinates: List[List[float]]
192
+ bbox: Optional[List[float]] = Field(None, min_length=4)
193
+
194
+
195
+ class Type18(Enum):
196
+ MultiLineString = 'MultiLineString'
197
+
198
+
199
+ class Geometry4(BaseModel):
200
+ type: Type18
201
+ coordinates: List[List[Coordinate]]
202
+ bbox: Optional[List[float]] = Field(None, min_length=4)
203
+
204
+
205
+ class Type19(Enum):
206
+ MultiPolygon = 'MultiPolygon'
207
+
208
+
209
+ class Geometry5(BaseModel):
210
+ type: Type19
211
+ coordinates: List[List[List[Coordinate]]]
212
+ bbox: Optional[List[float]] = Field(None, min_length=4)
213
+
214
+
215
+ class Type20(Enum):
216
+ GeometryCollection = 'GeometryCollection'
217
+
218
+
219
+ class Type21(Enum):
220
+ Point = 'Point'
221
+
222
+
223
+ class Geometries6(BaseModel):
224
+ type: Type21
225
+ coordinates: List[float] = Field(..., min_length=2)
226
+ bbox: Optional[List[float]] = Field(None, min_length=4)
227
+
228
+
229
+ class Type22(Enum):
230
+ LineString = 'LineString'
231
+
232
+
233
+ class Geometries7(BaseModel):
234
+ type: Type22
235
+ coordinates: List[Coordinate] = Field(..., min_length=2)
236
+ bbox: Optional[List[float]] = Field(None, min_length=4)
237
+
238
+
239
+ class Type23(Enum):
240
+ Polygon = 'Polygon'
241
+
242
+
243
+ class Geometries8(BaseModel):
244
+ type: Type23
245
+ coordinates: List[List[Coordinate]]
246
+ bbox: Optional[List[float]] = Field(None, min_length=4)
247
+
248
+
249
+ class Type24(Enum):
250
+ MultiPoint = 'MultiPoint'
251
+
252
+
253
+ class Geometries9(BaseModel):
254
+ type: Type24
255
+ coordinates: List[List[float]]
256
+ bbox: Optional[List[float]] = Field(None, min_length=4)
257
+
258
+
259
+ class Type25(Enum):
260
+ MultiLineString = 'MultiLineString'
261
+
262
+
263
+ class Geometries10(BaseModel):
264
+ type: Type25
265
+ coordinates: List[List[Coordinate]]
266
+ bbox: Optional[List[float]] = Field(None, min_length=4)
267
+
268
+
269
+ class Type26(Enum):
270
+ MultiPolygon = 'MultiPolygon'
271
+
272
+
273
+ class Geometries11(BaseModel):
274
+ type: Type26
275
+ coordinates: List[List[List[Coordinate]]]
276
+ bbox: Optional[List[float]] = Field(None, min_length=4)
277
+
278
+
279
+ class Geometry6(BaseModel):
280
+ type: Type20
281
+ geometries: List[
282
+ Union[
283
+ Geometries6,
284
+ Geometries7,
285
+ Geometries8,
286
+ Geometries9,
287
+ Geometries10,
288
+ Geometries11,
289
+ ]
290
+ ]
291
+ bbox: Optional[List[float]] = Field(None, min_length=4)
292
+
293
+
294
+ class GeoJSON8(BaseModel):
295
+ type: Type13
296
+ id: Optional[Union[float, str]] = None
297
+ properties: Optional[Dict[str, Any]] = None
298
+ geometry: Optional[
299
+ Union[
300
+ Geometry, Geometry1, Geometry2, Geometry3, Geometry4, Geometry5, Geometry6
301
+ ]
302
+ ] = None
303
+ bbox: Optional[List[float]] = Field(None, min_length=4)
304
+
305
+
306
+ class Type27(Enum):
307
+ FeatureCollection = 'FeatureCollection'
308
+
309
+
310
+ class Type28(Enum):
311
+ Feature = 'Feature'
312
+
313
+
314
+ class Type29(Enum):
315
+ Point = 'Point'
316
+
317
+
318
+ class Geometry7(BaseModel):
319
+ type: Type29
320
+ coordinates: List[float] = Field(..., min_length=2)
321
+ bbox: Optional[List[float]] = Field(None, min_length=4)
322
+
323
+
324
+ class Type30(Enum):
325
+ LineString = 'LineString'
326
+
327
+
328
+ class Geometry8(BaseModel):
329
+ type: Type30
330
+ coordinates: List[Coordinate] = Field(..., min_length=2)
331
+ bbox: Optional[List[float]] = Field(None, min_length=4)
332
+
333
+
334
+ class Type31(Enum):
335
+ Polygon = 'Polygon'
336
+
337
+
338
+ class Geometry9(BaseModel):
339
+ type: Type31
340
+ coordinates: List[List[Coordinate]]
341
+ bbox: Optional[List[float]] = Field(None, min_length=4)
342
+
343
+
344
+ class Type32(Enum):
345
+ MultiPoint = 'MultiPoint'
346
+
347
+
348
+ class Geometry10(BaseModel):
349
+ type: Type32
350
+ coordinates: List[List[float]]
351
+ bbox: Optional[List[float]] = Field(None, min_length=4)
352
+
353
+
354
+ class Type33(Enum):
355
+ MultiLineString = 'MultiLineString'
356
+
357
+
358
+ class Geometry11(BaseModel):
359
+ type: Type33
360
+ coordinates: List[List[Coordinate]]
361
+ bbox: Optional[List[float]] = Field(None, min_length=4)
362
+
363
+
364
+ class Type34(Enum):
365
+ MultiPolygon = 'MultiPolygon'
366
+
367
+
368
+ class Geometry12(BaseModel):
369
+ type: Type34
370
+ coordinates: List[List[List[Coordinate]]]
371
+ bbox: Optional[List[float]] = Field(None, min_length=4)
372
+
373
+
374
+ class Type35(Enum):
375
+ GeometryCollection = 'GeometryCollection'
376
+
377
+
378
+ class Type36(Enum):
379
+ Point = 'Point'
380
+
381
+
382
+ class Geometries12(BaseModel):
383
+ type: Type36
384
+ coordinates: List[float] = Field(..., min_length=2)
385
+ bbox: Optional[List[float]] = Field(None, min_length=4)
386
+
387
+
388
+ class Type37(Enum):
389
+ LineString = 'LineString'
390
+
391
+
392
+ class Geometries13(BaseModel):
393
+ type: Type37
394
+ coordinates: List[Coordinate] = Field(..., min_length=2)
395
+ bbox: Optional[List[float]] = Field(None, min_length=4)
396
+
397
+
398
+ class Type38(Enum):
399
+ Polygon = 'Polygon'
400
+
401
+
402
+ class Geometries14(BaseModel):
403
+ type: Type38
404
+ coordinates: List[List[Coordinate]]
405
+ bbox: Optional[List[float]] = Field(None, min_length=4)
406
+
407
+
408
+ class Type39(Enum):
409
+ MultiPoint = 'MultiPoint'
410
+
411
+
412
+ class Geometries15(BaseModel):
413
+ type: Type39
414
+ coordinates: List[List[float]]
415
+ bbox: Optional[List[float]] = Field(None, min_length=4)
416
+
417
+
418
+ class Type40(Enum):
419
+ MultiLineString = 'MultiLineString'
420
+
421
+
422
+ class Geometries16(BaseModel):
423
+ type: Type40
424
+ coordinates: List[List[Coordinate]]
425
+ bbox: Optional[List[float]] = Field(None, min_length=4)
426
+
427
+
428
+ class Type41(Enum):
429
+ MultiPolygon = 'MultiPolygon'
430
+
431
+
432
+ class Geometries17(BaseModel):
433
+ type: Type41
434
+ coordinates: List[List[List[Coordinate]]]
435
+ bbox: Optional[List[float]] = Field(None, min_length=4)
436
+
437
+
438
+ class Geometry13(BaseModel):
439
+ type: Type35
440
+ geometries: List[
441
+ Union[
442
+ Geometries12,
443
+ Geometries13,
444
+ Geometries14,
445
+ Geometries15,
446
+ Geometries16,
447
+ Geometries17,
448
+ ]
449
+ ]
450
+ bbox: Optional[List[float]] = Field(None, min_length=4)
451
+
452
+
453
+ class Feature(BaseModel):
454
+ type: Type28
455
+ id: Optional[Union[float, str]] = None
456
+ properties: Optional[Dict[str, Any]] = None
457
+ geometry: Optional[
458
+ Union[
459
+ Geometry7,
460
+ Geometry8,
461
+ Geometry9,
462
+ Geometry10,
463
+ Geometry11,
464
+ Geometry12,
465
+ Geometry13,
466
+ ]
467
+ ] = None
468
+ bbox: Optional[List[float]] = Field(None, min_length=4)
469
+
470
+
471
+ class GeoJSON9(BaseModel):
472
+ type: Type27
473
+ features: List[Feature]
474
+ bbox: Optional[List[float]] = Field(None, min_length=4)
475
+
476
+
477
+ class GeoJSON(
478
+ RootModel[
479
+ Union[
480
+ GeoJSON1,
481
+ GeoJSON2,
482
+ GeoJSON3,
483
+ GeoJSON4,
484
+ GeoJSON5,
485
+ GeoJSON6,
486
+ GeoJSON7,
487
+ GeoJSON8,
488
+ GeoJSON9,
489
+ ]
490
+ ]
491
+ ):
492
+ root: Union[
493
+ GeoJSON1,
494
+ GeoJSON2,
495
+ GeoJSON3,
496
+ GeoJSON4,
497
+ GeoJSON5,
498
+ GeoJSON6,
499
+ GeoJSON7,
500
+ GeoJSON8,
501
+ GeoJSON9,
502
+ ] = Field(..., title='GeoJSON')