geobox 1.3.1__py3-none-any.whl → 1.3.3__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.
- geobox/api.py +6 -11
- geobox/enums.py +0 -6
- geobox/query.py +6 -8
- geobox/raster.py +8 -2
- geobox/tileset.py +66 -30
- geobox/user.py +4 -7
- geobox/utils.py +7 -0
- geobox/vectorlayer.py +30 -0
- {geobox-1.3.1.dist-info → geobox-1.3.3.dist-info}/METADATA +1 -1
- {geobox-1.3.1.dist-info → geobox-1.3.3.dist-info}/RECORD +13 -13
- {geobox-1.3.1.dist-info → geobox-1.3.3.dist-info}/WHEEL +0 -0
- {geobox-1.3.1.dist-info → geobox-1.3.3.dist-info}/licenses/LICENSE +0 -0
- {geobox-1.3.1.dist-info → geobox-1.3.3.dist-info}/top_level.txt +0 -0
geobox/api.py
CHANGED
|
@@ -781,16 +781,14 @@ class GeoboxClient:
|
|
|
781
781
|
return VectorLayerView.get_view_by_name(self, name, user_id)
|
|
782
782
|
|
|
783
783
|
|
|
784
|
-
def create_tileset(self, name: str, layers: List[
|
|
784
|
+
def create_tileset(self, name: str, layers: List[Union['VectorLayer', 'VectorLayerView']], display_name: str = None, description: str = None,
|
|
785
785
|
min_zoom: int = None, max_zoom: int = None, user_id: int = None) -> 'Tileset':
|
|
786
786
|
"""
|
|
787
787
|
Create a new tileset.
|
|
788
788
|
|
|
789
789
|
Args:
|
|
790
790
|
name (str): The name of the tileset.
|
|
791
|
-
layers (List[
|
|
792
|
-
- layer_type: The type of the layer. valid values are "vector" and "view".
|
|
793
|
-
- layer_uuid: The uuid of the layer.
|
|
791
|
+
layers (List['VectorLayer' | 'VectorLayerView']): list of vectorlayer and view objects to add to tileset.
|
|
794
792
|
display_name (str, optional): The display name of the tileset.
|
|
795
793
|
description (str, optional): The description of the tileset.
|
|
796
794
|
min_zoom (int, optional): The minimum zoom level of the tileset.
|
|
@@ -802,19 +800,16 @@ class GeoboxClient:
|
|
|
802
800
|
|
|
803
801
|
Example:
|
|
804
802
|
>>> from geobox import GeoboxClient
|
|
803
|
+
>>> from geobox.tileset import Tileset
|
|
805
804
|
>>> client = GeoboxClient()
|
|
806
|
-
>>>
|
|
807
|
-
|
|
808
|
-
... "layer_type": "vector",
|
|
809
|
-
... "layer_uuid": "12345678-1234-5678-1234-567812345678"
|
|
810
|
-
... }
|
|
811
|
-
... ]
|
|
805
|
+
>>> layer = client.get_vector(uuid="12345678-1234-5678-1234-567812345678")
|
|
806
|
+
>>> view = client.get_view(uuid="12345678-1234-5678-1234-567812345678")
|
|
812
807
|
>>> tileset = client.create_tileset(name="your_tileset_name",
|
|
813
808
|
... display_name="Your Tileset",
|
|
814
809
|
... description="Your description",
|
|
815
810
|
... min_zoom=0,
|
|
816
811
|
... max_zoom=14,
|
|
817
|
-
... layers=
|
|
812
|
+
... layers=[layer, view])
|
|
818
813
|
"""
|
|
819
814
|
return Tileset.create_tileset(api=self,
|
|
820
815
|
name=name,
|
geobox/enums.py
CHANGED
geobox/query.py
CHANGED
|
@@ -582,7 +582,7 @@ class Query(Base):
|
|
|
582
582
|
super()._unshare(self.endpoint, users)
|
|
583
583
|
|
|
584
584
|
|
|
585
|
-
def get_shared_users(self, search: str, skip: int = 0, limit: int = 10) -> List['User']:
|
|
585
|
+
def get_shared_users(self, search: str = None, skip: int = 0, limit: int = 10) -> List['User']:
|
|
586
586
|
"""
|
|
587
587
|
Retrieves the list of users the query is shared with.
|
|
588
588
|
|
|
@@ -624,18 +624,16 @@ class Query(Base):
|
|
|
624
624
|
return endpoint
|
|
625
625
|
|
|
626
626
|
|
|
627
|
-
def save_as_layer(self, layer_name: str, layer_type: 'QueryGeometryType') ->
|
|
627
|
+
def save_as_layer(self, layer_name: str, layer_type: 'QueryGeometryType' = None) -> Task:
|
|
628
628
|
"""
|
|
629
629
|
Saves the query as a new layer.
|
|
630
630
|
|
|
631
631
|
Args:
|
|
632
|
-
sql (str): The SQL statement for the query.
|
|
633
|
-
params (list): The parameters for the SQL statement.
|
|
634
632
|
layer_name (str): The name of the new layer.
|
|
635
|
-
layer_type (QueryGeometryType): The type of the new layer.
|
|
633
|
+
layer_type (QueryGeometryType, optional): The type of the new layer.
|
|
636
634
|
|
|
637
635
|
Returns:
|
|
638
|
-
|
|
636
|
+
Task: The response task object.
|
|
639
637
|
|
|
640
638
|
Raises:
|
|
641
639
|
PermissionError: If the query is a read-only system query.
|
|
@@ -645,7 +643,7 @@ class Query(Base):
|
|
|
645
643
|
>>> from geobox.query import Query
|
|
646
644
|
>>> client = GeoboxClient()
|
|
647
645
|
>>> query = Query.get_query(client, uuid="12345678-1234-5678-1234-567812345678")
|
|
648
|
-
>>> query.save_as_layer(layer_name='test'
|
|
646
|
+
>>> query.save_as_layer(layer_name='test')
|
|
649
647
|
"""
|
|
650
648
|
self._check_access()
|
|
651
649
|
|
|
@@ -659,7 +657,7 @@ class Query(Base):
|
|
|
659
657
|
"sql": self.sql,
|
|
660
658
|
"params": params,
|
|
661
659
|
"layer_name": layer_name,
|
|
662
|
-
"layer_type": layer_type.value
|
|
660
|
+
"layer_type": layer_type.value if layer_type else None
|
|
663
661
|
})
|
|
664
662
|
|
|
665
663
|
endpoint = urljoin(self.BASE_ENDPOINT, 'saveAsLayer/')
|
geobox/raster.py
CHANGED
|
@@ -510,13 +510,13 @@ class Raster(Base):
|
|
|
510
510
|
'colormap_name': kwargs.get('colormap_name'),
|
|
511
511
|
'colormap': kwargs.get('colormap')
|
|
512
512
|
})
|
|
513
|
-
query_string = urlencode(
|
|
513
|
+
query_string = urlencode(params)
|
|
514
514
|
endpoint = urljoin(self.api.base_url, f'{self.endpoint}render/{z}/{x}/{y}.png')
|
|
515
515
|
endpoint = urljoin(endpoint, f'?{query_string}')
|
|
516
516
|
return endpoint
|
|
517
517
|
|
|
518
518
|
|
|
519
|
-
def get_tile_pbf_url(self, x: int, y: int, z: int) -> str:
|
|
519
|
+
def get_tile_pbf_url(self, x: int, y: int, z: int, indexes: str = None) -> str:
|
|
520
520
|
"""
|
|
521
521
|
Get the URL of the tile.
|
|
522
522
|
|
|
@@ -524,6 +524,7 @@ class Raster(Base):
|
|
|
524
524
|
x (int): The x coordinate of the tile.
|
|
525
525
|
y (int): The y coordinate of the tile.
|
|
526
526
|
z (int): The zoom level of the tile.
|
|
527
|
+
indexes (str, optional): list of comma separated band indexes to be rendered. e.g. 1, 2, 3
|
|
527
528
|
|
|
528
529
|
Returns:
|
|
529
530
|
str: The URL of the tile.
|
|
@@ -535,7 +536,12 @@ class Raster(Base):
|
|
|
535
536
|
>>> raster = Raster.get_raster(client, uuid="12345678-1234-5678-1234-567812345678")
|
|
536
537
|
>>> raster.get_tile_pbf_url(x=10, y=20, z=1)
|
|
537
538
|
"""
|
|
539
|
+
params = clean_data({
|
|
540
|
+
'indexes': indexes
|
|
541
|
+
})
|
|
542
|
+
query_string = urlencode(params)
|
|
538
543
|
endpoint = urljoin(self.api.base_url, f'{self.endpoint}tiles/{z}/{x}/{y}.pbf')
|
|
544
|
+
endpoint = urljoin(endpoint, f'?{query_string}')
|
|
539
545
|
return endpoint
|
|
540
546
|
|
|
541
547
|
|
geobox/tileset.py
CHANGED
|
@@ -3,8 +3,8 @@ from typing import Dict, List, Optional, Union, TYPE_CHECKING
|
|
|
3
3
|
|
|
4
4
|
from .base import Base
|
|
5
5
|
from .vectorlayer import VectorLayer
|
|
6
|
+
from .view import VectorLayerView
|
|
6
7
|
from .task import Task
|
|
7
|
-
from .enums import TilesetLayerType
|
|
8
8
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
10
|
from . import GeoboxClient
|
|
@@ -35,7 +35,7 @@ class Tileset(Base):
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
@classmethod
|
|
38
|
-
def create_tileset(cls, api: 'GeoboxClient', name: str, layers: List[
|
|
38
|
+
def create_tileset(cls, api: 'GeoboxClient', name: str, layers: List[Union['VectorLayer', 'VectorLayerView']], display_name: str = None, description: str = None,
|
|
39
39
|
min_zoom: int = None, max_zoom: int = None, user_id: int = None) -> 'Tileset':
|
|
40
40
|
"""
|
|
41
41
|
Create a new tileset.
|
|
@@ -43,9 +43,7 @@ class Tileset(Base):
|
|
|
43
43
|
Args:
|
|
44
44
|
api (GeoboxClient): The GeoboxClient instance for making requests.
|
|
45
45
|
name (str): The name of the tileset.
|
|
46
|
-
layers (List[
|
|
47
|
-
- layer_type: The type of the layer. valid values are "vector" and "view".
|
|
48
|
-
- layer_uuid: The uuid of the layer.
|
|
46
|
+
layers (List['VectorLayer' | 'VectorLayerView']): list of vectorlayer and view objects to add to tileset.
|
|
49
47
|
display_name (str, optional): The display name of the tileset.
|
|
50
48
|
description (str, optional): The description of the tileset.
|
|
51
49
|
min_zoom (int, optional): The minimum zoom level of the tileset.
|
|
@@ -59,34 +57,46 @@ class Tileset(Base):
|
|
|
59
57
|
>>> from geobox import GeoboxClient
|
|
60
58
|
>>> from geobox.tileset import Tileset
|
|
61
59
|
>>> client = GeoboxClient()
|
|
62
|
-
>>>
|
|
63
|
-
|
|
64
|
-
... "layer_type": "vector",
|
|
65
|
-
... "layer_uuid": "12345678-1234-5678-1234-567812345678"
|
|
66
|
-
... }
|
|
67
|
-
... ]
|
|
60
|
+
>>> layer = client.get_vector(uuid="12345678-1234-5678-1234-567812345678")
|
|
61
|
+
>>> view = client.get_view(uuid="12345678-1234-5678-1234-567812345678")
|
|
68
62
|
>>> tileset = Tileset.create_tileset(client,
|
|
69
63
|
... name="your_tileset_name",
|
|
70
64
|
... display_name="Your Tileset",
|
|
71
65
|
... description="Your description",
|
|
72
66
|
... min_zoom=0,
|
|
73
67
|
... max_zoom=14,
|
|
74
|
-
... layers=
|
|
68
|
+
... layers=[layer, view])
|
|
75
69
|
or
|
|
76
70
|
>>> tileset = client.create_tileset(name="your_tileset_name",
|
|
77
71
|
... display_name="Your Tileset",
|
|
78
72
|
... description="Your description",
|
|
79
73
|
... min_zoom=0,
|
|
80
74
|
... max_zoom=14,
|
|
81
|
-
... layers=
|
|
75
|
+
... layers=[layer, view])
|
|
82
76
|
"""
|
|
77
|
+
formatted_layers = []
|
|
78
|
+
for item in layers:
|
|
79
|
+
if type(item) == VectorLayer:
|
|
80
|
+
item_type = 'vector'
|
|
81
|
+
|
|
82
|
+
elif type(item) == VectorLayerView:
|
|
83
|
+
item_type = 'view'
|
|
84
|
+
|
|
85
|
+
else:
|
|
86
|
+
continue
|
|
87
|
+
|
|
88
|
+
formatted_layers.append({
|
|
89
|
+
'layer_type': item_type,
|
|
90
|
+
'layer_uuid': item.uuid
|
|
91
|
+
})
|
|
92
|
+
|
|
83
93
|
data = {
|
|
84
94
|
"name": name,
|
|
85
95
|
"display_name": display_name,
|
|
86
96
|
"description": description,
|
|
87
97
|
"min_zoom": min_zoom,
|
|
88
98
|
"max_zoom": max_zoom,
|
|
89
|
-
"layers":
|
|
99
|
+
"layers": formatted_layers,
|
|
90
100
|
"user_id": user_id
|
|
91
101
|
}
|
|
92
102
|
return super()._create(api, cls.BASE_ENDPOINT, data, factory_func=lambda api, item: Tileset(api, item['uuid'], item))
|
|
@@ -283,7 +293,7 @@ class Tileset(Base):
|
|
|
283
293
|
super().delete(urljoin(self.BASE_ENDPOINT, f'{self.uuid}/'))
|
|
284
294
|
|
|
285
295
|
|
|
286
|
-
def
|
|
296
|
+
def get_layers(self, **kwargs) -> List['VectorLayer']:
|
|
287
297
|
"""
|
|
288
298
|
Retrieves the layers of the tileset with optional parameters.
|
|
289
299
|
|
|
@@ -307,13 +317,14 @@ class Tileset(Base):
|
|
|
307
317
|
Example:
|
|
308
318
|
|
|
309
319
|
Returns:
|
|
310
|
-
List: A list of VectorLayer instances.
|
|
320
|
+
List: A list of VectorLayer or VectorLayerView instances.
|
|
311
321
|
|
|
312
322
|
Example:
|
|
313
323
|
>>> from geobox import GeoboxClient
|
|
314
324
|
>>> from geobox.tileset import Tileset
|
|
315
325
|
>>> client = GeoboxClient()
|
|
316
|
-
>>>
|
|
326
|
+
>>> tileset = Tileset.get_tileset(client, uuid="12345678-1234-5678-1234-567812345678")
|
|
327
|
+
>>> layers = tileset.get_layers()
|
|
317
328
|
"""
|
|
318
329
|
params = {
|
|
319
330
|
'f': 'json',
|
|
@@ -328,57 +339,82 @@ class Tileset(Base):
|
|
|
328
339
|
'shared': kwargs.get('shared', False)
|
|
329
340
|
}
|
|
330
341
|
endpoint = urljoin(self.BASE_ENDPOINT, f'{self.uuid}/layers/')
|
|
331
|
-
return super()._get_list(self.api, endpoint, params, factory_func=lambda api, item: VectorLayer(api, item['uuid'], item['layer_type'], item)
|
|
342
|
+
return super()._get_list(self.api, endpoint, params, factory_func=lambda api, item: VectorLayer(api, item['uuid'], item['layer_type'], item) if not item['is_view'] else \
|
|
343
|
+
VectorLayerView(api, item['uuid'], item['layer_type'], item) )
|
|
332
344
|
|
|
333
345
|
|
|
334
|
-
def add_layer(self,
|
|
346
|
+
def add_layer(self, layer: Union['VectorLayer', 'VectorLayerView']) -> None:
|
|
335
347
|
"""
|
|
336
348
|
Adds a layer to the tileset.
|
|
337
349
|
|
|
338
350
|
Args:
|
|
339
|
-
|
|
340
|
-
layer_uuid (str): The UUID of the layer.
|
|
351
|
+
layer (VectorLayer | VectorLayerView): the layer object to add to the tileset
|
|
341
352
|
|
|
342
353
|
Returns:
|
|
343
354
|
None
|
|
344
355
|
|
|
356
|
+
Raises:
|
|
357
|
+
ValueError: if the layer input is not a 'VectorLayer' or 'VetorLayerview' object
|
|
358
|
+
|
|
345
359
|
Example:
|
|
346
360
|
>>> from geobox import GeoboxClient
|
|
347
361
|
>>> from geobox.tileset import Tileset
|
|
348
362
|
>>> client = GeoboxClient()
|
|
349
363
|
>>> tileset = Tileset.get_tileset(client, uuid="12345678-1234-5678-1234-567812345678")
|
|
350
|
-
>>>
|
|
364
|
+
>>> layer = client.get_vector(uuid="12345678-1234-5678-1234-567812345678")
|
|
365
|
+
>>> tileset.add_layer(layer)
|
|
351
366
|
"""
|
|
367
|
+
if type(layer) == VectorLayer:
|
|
368
|
+
layer_type = 'vector'
|
|
369
|
+
|
|
370
|
+
elif type(layer) == VectorLayerView:
|
|
371
|
+
layer_type = 'view'
|
|
372
|
+
|
|
373
|
+
else:
|
|
374
|
+
raise ValueError("layer input must be either 'VectorLayer' or 'VetorLayerview' object")
|
|
375
|
+
|
|
352
376
|
data = {
|
|
353
|
-
"layer_type": layer_type
|
|
354
|
-
"layer_uuid":
|
|
377
|
+
"layer_type": layer_type,
|
|
378
|
+
"layer_uuid": layer.uuid
|
|
355
379
|
}
|
|
356
380
|
|
|
357
381
|
endpoint = urljoin(self.endpoint, 'layers/')
|
|
358
382
|
return self.api.post(endpoint, data, is_json=False)
|
|
359
383
|
|
|
360
384
|
|
|
361
|
-
def delete_layer(self,
|
|
385
|
+
def delete_layer(self, layer: Union['VectorLayer', 'VectorLayerView']) -> None:
|
|
362
386
|
"""
|
|
363
387
|
Deletes a layer from the tileset.
|
|
364
388
|
|
|
365
389
|
Args:
|
|
366
|
-
|
|
367
|
-
layer_uuid (str): The UUID of the layer.
|
|
390
|
+
layer (VectorLayer | VectorLayerView): the layer object to delete from the tileset
|
|
368
391
|
|
|
369
392
|
Returns:
|
|
370
393
|
None
|
|
371
394
|
|
|
395
|
+
Raises:
|
|
396
|
+
ValueError: if the layer input is not a 'VectorLayer' or 'VetorLayerview' object
|
|
397
|
+
|
|
372
398
|
Example:
|
|
373
399
|
>>> from geobox import GeoboxClient
|
|
374
400
|
>>> from geobox.tileset import Tileset
|
|
375
401
|
>>> client = GeoboxClient()
|
|
376
402
|
>>> tileset = Tileset.get_tileset(client, uuid="12345678-1234-5678-1234-567812345678")
|
|
377
|
-
>>>
|
|
403
|
+
>>> layer = client.get_vector(uuid="12345678-1234-5678-1234-567812345678")
|
|
404
|
+
>>> tileset.delete_layer(layer)
|
|
378
405
|
"""
|
|
406
|
+
if type(layer) == VectorLayer:
|
|
407
|
+
layer_type = 'vector'
|
|
408
|
+
|
|
409
|
+
elif type(layer) == VectorLayerView:
|
|
410
|
+
layer_type = 'view'
|
|
411
|
+
|
|
412
|
+
else:
|
|
413
|
+
raise ValueError("layer input must be either 'VectorLayer' or 'VetorLayerview' object")
|
|
414
|
+
|
|
379
415
|
data = {
|
|
380
|
-
"layer_type": layer_type
|
|
381
|
-
"layer_uuid":
|
|
416
|
+
"layer_type": layer_type,
|
|
417
|
+
"layer_uuid": layer.uuid
|
|
382
418
|
}
|
|
383
419
|
|
|
384
420
|
endpoint = urljoin(self.endpoint, 'layers/')
|
geobox/user.py
CHANGED
|
@@ -2,7 +2,7 @@ from typing import List, Any, TYPE_CHECKING, Union, Dict
|
|
|
2
2
|
from urllib.parse import urlencode, urljoin
|
|
3
3
|
|
|
4
4
|
from .base import Base
|
|
5
|
-
from .utils import clean_data
|
|
5
|
+
from .utils import clean_data, xor_encode
|
|
6
6
|
from .enums import UserRole, UserStatus
|
|
7
7
|
from .plan import Plan
|
|
8
8
|
|
|
@@ -113,11 +113,9 @@ class User(Base):
|
|
|
113
113
|
'return_count': kwargs.get('return_count', False),
|
|
114
114
|
'skip': kwargs.get('skip', 0),
|
|
115
115
|
'limit': kwargs.get('limit', 10),
|
|
116
|
-
'user_id': kwargs.get('user_id')
|
|
117
|
-
'shared': kwargs.get('shared', False)
|
|
116
|
+
'user_id': kwargs.get('user_id')
|
|
118
117
|
}
|
|
119
118
|
return super()._get_list(api, cls.BASE_ENDPOINT, params, factory_func=lambda api, item: User(api, item['id'], item))
|
|
120
|
-
|
|
121
119
|
|
|
122
120
|
|
|
123
121
|
@classmethod
|
|
@@ -174,7 +172,7 @@ class User(Base):
|
|
|
174
172
|
data = {
|
|
175
173
|
"username": username,
|
|
176
174
|
"email": email,
|
|
177
|
-
"password": password,
|
|
175
|
+
"password": xor_encode(password),
|
|
178
176
|
"role": role.value,
|
|
179
177
|
"first_name": first_name,
|
|
180
178
|
"last_name": last_name,
|
|
@@ -184,7 +182,6 @@ class User(Base):
|
|
|
184
182
|
return super()._create(api, cls.BASE_ENDPOINT, data, factory_func=lambda api, item: User(api, item['id'], item))
|
|
185
183
|
|
|
186
184
|
|
|
187
|
-
|
|
188
185
|
@classmethod
|
|
189
186
|
def search_users(cls, api: 'GeoboxClient', search: str = None, skip: int = 0, limit: int = 10) -> List['User']:
|
|
190
187
|
"""
|
|
@@ -377,7 +374,7 @@ class User(Base):
|
|
|
377
374
|
>>> user.change_password(new_password='user_new_password')
|
|
378
375
|
"""
|
|
379
376
|
data = clean_data({
|
|
380
|
-
"new_password": new_password
|
|
377
|
+
"new_password": xor_encode(new_password)
|
|
381
378
|
})
|
|
382
379
|
endpoint = urljoin(self.endpoint, 'change-password')
|
|
383
380
|
self.api.post(endpoint, data, is_json=False)
|
geobox/utils.py
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
from urllib.parse import urlparse, parse_qs, urlencode, urlunparse
|
|
2
|
+
import base64
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def xor_encode(s, key=42):
|
|
6
|
+
xor_str = ''.join(chr(ord(c) ^ key) for c in s)
|
|
7
|
+
encoded_bytes = base64.b64encode(xor_str.encode('utf-8'))
|
|
8
|
+
return encoded_bytes.decode('utf-8')
|
|
2
9
|
|
|
3
10
|
|
|
4
11
|
def clean_data(data: dict) -> dict:
|
geobox/vectorlayer.py
CHANGED
|
@@ -439,6 +439,36 @@ class VectorLayer(Base):
|
|
|
439
439
|
return super()._create(self.api, endpoint, data, factory_func=lambda api, item: VectorLayerVersion(api, item['uuid'], item))
|
|
440
440
|
|
|
441
441
|
|
|
442
|
+
def get_versions(self, **kwargs) -> List['VectorLayerVersion']:
|
|
443
|
+
"""
|
|
444
|
+
Get list of versions of the current vector layer object with optional filtering and pagination.
|
|
445
|
+
|
|
446
|
+
Keyword Args:
|
|
447
|
+
q (str): query filter based on OGC CQL standard. e.g. "field1 LIKE '%GIS%' AND created_at > '2021-01-01'"
|
|
448
|
+
search (str): search term for keyword-based searching among search_fields or all textual fields if search_fields does not have value. NOTE: if q param is defined this param will be ignored.
|
|
449
|
+
search_fields (str): comma separated list of fields for searching.
|
|
450
|
+
order_by (str): comma separated list of fields for sorting results [field1 A|D, field2 A|D, …]. e.g. name A, type D. NOTE: "A" denotes ascending order and "D" denotes descending order.
|
|
451
|
+
return_count (bool): Whether to return total count. default is False.
|
|
452
|
+
skip (int): Number of items to skip. default is 0.
|
|
453
|
+
limit (int): Number of items to return. default is 10.
|
|
454
|
+
user_id (int): Specific user. privileges required.
|
|
455
|
+
shared (bool): Whether to return shared versions. default is False.
|
|
456
|
+
|
|
457
|
+
Returns:
|
|
458
|
+
List[VectorLayerVersion] | int: A list of vector layer version instances or the total number of versions.
|
|
459
|
+
|
|
460
|
+
Example:
|
|
461
|
+
>>> from geobox import GeoboxClient
|
|
462
|
+
>>> from geobox.version import VectorLayerVersion
|
|
463
|
+
>>> client = GeoboxClient()
|
|
464
|
+
>>> layer = client.get_vector(uuid="12345678-1234-5678-1234-567812345678")
|
|
465
|
+
>>> versions = layer.get_versions()
|
|
466
|
+
or
|
|
467
|
+
>>> versions = layer.get_versions()
|
|
468
|
+
"""
|
|
469
|
+
return VectorLayerVersion.get_versions(self.api, layer_id=self.id, **kwargs)
|
|
470
|
+
|
|
471
|
+
|
|
442
472
|
@property
|
|
443
473
|
def wfs(self) -> str:
|
|
444
474
|
"""
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
geobox/__init__.py,sha256=iRkJAFIjMXiAaLTVXvZcW5HM7ttyipGdxFZ15NCM8qU,1895
|
|
2
|
-
geobox/api.py,sha256=
|
|
2
|
+
geobox/api.py,sha256=spbIWSeYCml_rmiisDLQjFcvm6I_UJGobUJm9H-Z9sQ,100719
|
|
3
3
|
geobox/apikey.py,sha256=FBio1PtGovAUaTE0HW9IJ55UuFdR_1ICk_FQhHu5dAE,7427
|
|
4
4
|
geobox/attachment.py,sha256=XbGwfWWuFAMimj4tsjKBvlSLP-rhpNACCtxgRmUvcdY,11631
|
|
5
5
|
geobox/base.py,sha256=p0UVZo9CINw0mW9o0nNR_VNCk7V1r-FrLQ_NH39WARE,12299
|
|
6
6
|
geobox/basemap.py,sha256=fDWwkMf-F2NTE1tVLijoxQku55825b6gj8nk69TMOII,4386
|
|
7
7
|
geobox/dashboard.py,sha256=MYyT3YJEGPCbTXHcYoZmn14rFOaut1J3idEA8bCdFgI,11762
|
|
8
|
-
geobox/enums.py,sha256=
|
|
8
|
+
geobox/enums.py,sha256=mGF6eXQlNHcUXV0AVMolI200a__g-S9wMjQ1p4ka28g,6244
|
|
9
9
|
geobox/exception.py,sha256=jvpnv0M2Ck1FpxHTL_aKYWxGvLnCQ3d9vOrMIktjw1U,1507
|
|
10
10
|
geobox/feature.py,sha256=3Kbc1LjIkBt1YqRAry84BrR7qxx9BexvBB3YQ8D9mGk,18504
|
|
11
11
|
geobox/field.py,sha256=p9eitUpnsiGj6GUhjSomk6HWlsNJSbE-Oh_4VcjaqVo,10562
|
|
@@ -15,23 +15,23 @@ geobox/map.py,sha256=RjuhbOVQN-OBwjBtO46AosB_Ta348EA1nExBdnxH3nw,31252
|
|
|
15
15
|
geobox/model3d.py,sha256=qRYCx-q9LpGhdu5oz3av0uUoiDimuk4BvXXwMW5bo9Q,12061
|
|
16
16
|
geobox/mosaic.py,sha256=feBRsAgvhl0tKoghfZiQsxFntS7skAnzEYYuU4GKbP0,23672
|
|
17
17
|
geobox/plan.py,sha256=_ZV9F6loG92uQZGJl_9T08Kg85g3hnODmpccSkTYVdw,11193
|
|
18
|
-
geobox/query.py,sha256=
|
|
19
|
-
geobox/raster.py,sha256=
|
|
18
|
+
geobox/query.py,sha256=BGlCnglo7lZwvvmWqeWubafn3gAWE8tT08fBAwxFt4s,24097
|
|
19
|
+
geobox/raster.py,sha256=ex2nUiMGwGN-9Zp3-Fotj9Z2noJRkyDf4-ZhwIponHw,29459
|
|
20
20
|
geobox/route.py,sha256=cKZTTHBHM8woWbhHIpCvrRX_doJcTkGktouee0z7oG0,2723
|
|
21
21
|
geobox/scene.py,sha256=Sz2tiyJk-bXYjktfcp1d2gGrW3gt2T4D1FAMoRHOCng,11369
|
|
22
22
|
geobox/settings.py,sha256=rGRdM18Vo7xnjfZXPLRMbKeoVC_lZmzkNRPS0SQv05o,5660
|
|
23
23
|
geobox/task.py,sha256=eLMgbhcYTADooWqKDPh6Jlh5S5oqxMMKoYIm0YPVZvg,13519
|
|
24
24
|
geobox/tile3d.py,sha256=MHDoj2OIUf3VMQtq7ysrayh8njAPSgwgPJCm4ySEB7A,10472
|
|
25
|
-
geobox/tileset.py,sha256=
|
|
25
|
+
geobox/tileset.py,sha256=I22RQggG4nuxibyf87Pm7uFliH-pAkesHlujaqMRfu8,23499
|
|
26
26
|
geobox/usage.py,sha256=_54xL-n-2Bg9wGpoOBKnh85WqdpMWEtqxRJVaFlVWe0,7908
|
|
27
|
-
geobox/user.py,sha256=
|
|
28
|
-
geobox/utils.py,sha256=
|
|
29
|
-
geobox/vectorlayer.py,sha256=
|
|
27
|
+
geobox/user.py,sha256=YY72uRvjKUUWUZbxhrft37FVBlqDeosPMf3EpMVBhc0,15069
|
|
28
|
+
geobox/utils.py,sha256=qLtchKIdw-az3KCiiFv0-Cpmx9RfBxORjlATvVyDIaQ,1314
|
|
29
|
+
geobox/vectorlayer.py,sha256=yK_5ZD7eBAbRV2ruZCMptCtNU-S0AMvsAFiGIcLf3LQ,52853
|
|
30
30
|
geobox/version.py,sha256=0GLPhxCeEb2bAkdpPJWtXPXc1KP6kQ_TOMwLAL0ldo0,9374
|
|
31
31
|
geobox/view.py,sha256=sIi6Mi7NUAX5gN83cpubD3l7AcZ-1g5kG2NKHeVeW-g,37518
|
|
32
32
|
geobox/workflow.py,sha256=6hKnSw4G0_ZlgmUb0g3fxT-UVsFbiYpF2FbEO5fpQv0,11606
|
|
33
|
-
geobox-1.3.
|
|
34
|
-
geobox-1.3.
|
|
35
|
-
geobox-1.3.
|
|
36
|
-
geobox-1.3.
|
|
37
|
-
geobox-1.3.
|
|
33
|
+
geobox-1.3.3.dist-info/licenses/LICENSE,sha256=AvFB7W94sJYKLDhBxLRshL3upexCOG8HQY_1JibB96w,1063
|
|
34
|
+
geobox-1.3.3.dist-info/METADATA,sha256=dU6XTrCrrBCxwcVm01tBYRJfdsUuBErYGUMfdKF7Wu4,2556
|
|
35
|
+
geobox-1.3.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
36
|
+
geobox-1.3.3.dist-info/top_level.txt,sha256=ppXH8Bu2mlB-pLQ6lsoWEm2Gr6wZx1uzkhetsYA5ins,7
|
|
37
|
+
geobox-1.3.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|