geobox 2.3.0__py3-none-any.whl → 2.4.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.
- geobox/aio/api.py +153 -7
- geobox/aio/apikey.py +0 -26
- geobox/aio/attachment.py +5 -31
- geobox/aio/basemap.py +2 -30
- geobox/aio/dashboard.py +0 -26
- geobox/aio/feature.py +172 -17
- geobox/aio/field.py +0 -27
- geobox/aio/file.py +0 -26
- geobox/aio/layout.py +0 -26
- geobox/aio/log.py +0 -27
- geobox/aio/map.py +0 -26
- geobox/aio/model3d.py +0 -26
- geobox/aio/mosaic.py +0 -26
- geobox/aio/plan.py +0 -26
- geobox/aio/query.py +0 -26
- geobox/aio/raster.py +0 -26
- geobox/aio/scene.py +1 -26
- geobox/aio/settings.py +0 -28
- geobox/aio/table.py +644 -55
- geobox/aio/task.py +0 -27
- geobox/aio/tile3d.py +0 -26
- geobox/aio/tileset.py +1 -26
- geobox/aio/usage.py +0 -32
- geobox/aio/user.py +0 -59
- geobox/aio/vector_tool.py +49 -0
- geobox/aio/vectorlayer.py +8 -34
- geobox/aio/version.py +1 -25
- geobox/aio/view.py +5 -35
- geobox/aio/workflow.py +0 -26
- geobox/api.py +152 -7
- geobox/apikey.py +0 -26
- geobox/attachment.py +0 -26
- geobox/basemap.py +0 -28
- geobox/dashboard.py +0 -26
- geobox/enums.py +11 -1
- geobox/feature.py +170 -15
- geobox/field.py +0 -28
- geobox/file.py +0 -26
- geobox/layout.py +0 -26
- geobox/log.py +0 -26
- geobox/map.py +0 -26
- geobox/model3d.py +0 -26
- geobox/mosaic.py +0 -26
- geobox/plan.py +1 -26
- geobox/query.py +1 -26
- geobox/raster.py +1 -31
- geobox/scene.py +1 -27
- geobox/settings.py +1 -29
- geobox/table.py +640 -55
- geobox/task.py +2 -29
- geobox/tile3d.py +0 -26
- geobox/tileset.py +1 -26
- geobox/usage.py +2 -33
- geobox/user.py +1 -59
- geobox/vector_tool.py +49 -0
- geobox/vectorlayer.py +9 -36
- geobox/version.py +1 -26
- geobox/view.py +4 -34
- geobox/workflow.py +1 -26
- {geobox-2.3.0.dist-info → geobox-2.4.0.dist-info}/METADATA +1 -1
- geobox-2.4.0.dist-info/RECORD +74 -0
- {geobox-2.3.0.dist-info → geobox-2.4.0.dist-info}/WHEEL +1 -1
- geobox-2.3.0.dist-info/RECORD +0 -74
- {geobox-2.3.0.dist-info → geobox-2.4.0.dist-info}/licenses/LICENSE +0 -0
- {geobox-2.3.0.dist-info → geobox-2.4.0.dist-info}/top_level.txt +0 -0
geobox/task.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from urllib.parse import urljoin
|
|
1
|
+
from urllib.parse import urljoin
|
|
2
2
|
from typing import Optional, Dict, List, Optional, Union, TYPE_CHECKING
|
|
3
3
|
import time
|
|
4
4
|
import logging
|
|
@@ -13,8 +13,7 @@ if TYPE_CHECKING:
|
|
|
13
13
|
from .model3d import Model
|
|
14
14
|
from .file import File
|
|
15
15
|
from .tile3d import Tile3d
|
|
16
|
-
|
|
17
|
-
from .aio.task import AsyncTask
|
|
16
|
+
|
|
18
17
|
|
|
19
18
|
logger = logging.getLogger(__name__)
|
|
20
19
|
|
|
@@ -375,29 +374,3 @@ class Task(Base):
|
|
|
375
374
|
>>> task = client.get_task(uuid="12345678-1234-5678-1234-567812345678")
|
|
376
375
|
"""
|
|
377
376
|
return super()._get_detail(api, cls.BASE_ENDPOINT, uuid, factory_func=lambda api, item: Task(api, item['uuid'], item))
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncTask':
|
|
381
|
-
"""
|
|
382
|
-
Switch to async version of the task instance to have access to the async methods
|
|
383
|
-
|
|
384
|
-
Args:
|
|
385
|
-
async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
|
|
386
|
-
|
|
387
|
-
Returns:
|
|
388
|
-
AsyncTask: the async instance of the task.
|
|
389
|
-
|
|
390
|
-
Example:
|
|
391
|
-
>>> from geobox import Geoboxclient
|
|
392
|
-
>>> from geobox.aio import AsyncGeoboxClient
|
|
393
|
-
>>> from geobox.task import Task
|
|
394
|
-
>>> client = GeoboxClient()
|
|
395
|
-
>>> task = Task.get_task(client, uuid="12345678-1234-5678-1234-567812345678")
|
|
396
|
-
or
|
|
397
|
-
>>> task = client.get_task(uuid="12345678-1234-5678-1234-567812345678")
|
|
398
|
-
>>> async with AsyncGeoboxClient() as async_client:
|
|
399
|
-
>>> async_task = task.to_async(async_client)
|
|
400
|
-
"""
|
|
401
|
-
from .aio.task import AsyncTask
|
|
402
|
-
|
|
403
|
-
return AsyncTask(api=async_client, uuid=self.uuid, data=self.data)
|
geobox/tile3d.py
CHANGED
|
@@ -6,8 +6,6 @@ from .base import Base
|
|
|
6
6
|
if TYPE_CHECKING:
|
|
7
7
|
from . import GeoboxClient
|
|
8
8
|
from .user import User
|
|
9
|
-
from .aio import AsyncGeoboxClient
|
|
10
|
-
from .aio.tile3d import AsyncTile3d
|
|
11
9
|
|
|
12
10
|
|
|
13
11
|
class Tile3d(Base):
|
|
@@ -312,27 +310,3 @@ class Tile3d(Base):
|
|
|
312
310
|
"""
|
|
313
311
|
endpoint = urljoin(self.endpoint, 'tileset.json')
|
|
314
312
|
return self.api.get(endpoint)
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncTile3d':
|
|
318
|
-
"""
|
|
319
|
-
Switch to async version of the 3d tile instance to have access to the async methods
|
|
320
|
-
|
|
321
|
-
Args:
|
|
322
|
-
async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
|
|
323
|
-
|
|
324
|
-
Returns:
|
|
325
|
-
AsyncTile3d: the async instance of the 3d tile.
|
|
326
|
-
|
|
327
|
-
Example:
|
|
328
|
-
>>> from geobox import Geoboxclient
|
|
329
|
-
>>> from geobox.aio import AsyncGeoboxClient
|
|
330
|
-
>>> from geobox.tile3d import Tile3d
|
|
331
|
-
>>> client = GeoboxClient()
|
|
332
|
-
>>> tile = Tile3d.get_3dtile(api=client, uuid="12345678-1234-5678-1234-567812345678")
|
|
333
|
-
>>> async with AsyncGeoboxClient() as async_client:
|
|
334
|
-
>>> async_tile = tile.to_async(async_client)
|
|
335
|
-
"""
|
|
336
|
-
from .aio.tile3d import AsyncTile3d
|
|
337
|
-
|
|
338
|
-
return AsyncTile3d(api=async_client, uuid=self.uuid, data=self.data)
|
geobox/tileset.py
CHANGED
|
@@ -9,8 +9,7 @@ from .task import Task
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
10
|
from . import GeoboxClient
|
|
11
11
|
from .user import User
|
|
12
|
-
|
|
13
|
-
from .aio.tileset import AsyncTileset
|
|
12
|
+
|
|
14
13
|
|
|
15
14
|
class Tileset(Base):
|
|
16
15
|
|
|
@@ -632,27 +631,3 @@ class Tileset(Base):
|
|
|
632
631
|
>>> tileset.clear_cache()
|
|
633
632
|
"""
|
|
634
633
|
super()._clear_cache(endpoint=self.endpoint)
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncTileset':
|
|
638
|
-
"""
|
|
639
|
-
Switch to async version of the tileset instance to have access to the async methods
|
|
640
|
-
|
|
641
|
-
Args:
|
|
642
|
-
async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
|
|
643
|
-
|
|
644
|
-
Returns:
|
|
645
|
-
AsyncTileset: the async instance of the tileset.
|
|
646
|
-
|
|
647
|
-
Example:
|
|
648
|
-
>>> from geobox import Geoboxclient
|
|
649
|
-
>>> from geobox.aio import AsyncGeoboxClient
|
|
650
|
-
>>> from geobox.tileset import Tileset
|
|
651
|
-
>>> client = GeoboxClient()
|
|
652
|
-
>>> tileset = Tileset.get_tileset(client, uuid="12345678-1234-5678-1234-567812345678")
|
|
653
|
-
>>> async with AsyncGeoboxClient() as async_client:
|
|
654
|
-
>>> async_tileset = tileset.to_async(async_client)
|
|
655
|
-
"""
|
|
656
|
-
from .aio.tileset import AsyncTileset
|
|
657
|
-
|
|
658
|
-
return AsyncTileset(api=async_client, uuid=self.uuid, data=self.data)
|
geobox/usage.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
from urllib.parse import urlencode
|
|
2
|
-
from typing import
|
|
1
|
+
from urllib.parse import urlencode
|
|
2
|
+
from typing import Dict, List, Union, TYPE_CHECKING
|
|
3
3
|
from datetime import datetime
|
|
4
4
|
|
|
5
5
|
from .base import Base
|
|
@@ -10,8 +10,6 @@ from .enums import UsageScale, UsageParam
|
|
|
10
10
|
|
|
11
11
|
if TYPE_CHECKING:
|
|
12
12
|
from . import GeoboxClient
|
|
13
|
-
from .aio import AsyncGeoboxClient
|
|
14
|
-
from .aio.usage import AsyncUsage
|
|
15
13
|
|
|
16
14
|
|
|
17
15
|
class Usage(Base):
|
|
@@ -211,32 +209,3 @@ class Usage(Base):
|
|
|
211
209
|
})
|
|
212
210
|
endpoint = f"{cls.BASE_ENDPOINT}update"
|
|
213
211
|
return api.post(endpoint, payload=data)
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncUsage':
|
|
217
|
-
"""
|
|
218
|
-
Switch to async version of the usage instance to have access to the async methods
|
|
219
|
-
|
|
220
|
-
Args:
|
|
221
|
-
async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
|
|
222
|
-
|
|
223
|
-
Returns:
|
|
224
|
-
AsyncUsage: the async instance of the usage.
|
|
225
|
-
|
|
226
|
-
Example:
|
|
227
|
-
>>> from geobox import Geoboxclient
|
|
228
|
-
>>> from geobox.aio import AsyncGeoboxClient
|
|
229
|
-
>>> from geobox.usage import Usage
|
|
230
|
-
>>> client = GeoboxClient()
|
|
231
|
-
>>> user = client.get_user()
|
|
232
|
-
>>> usage = Usage.get_api_usage(client,
|
|
233
|
-
... resource=user,
|
|
234
|
-
... scale=UsageScale.Day,
|
|
235
|
-
... param=UsageParam.Calls,
|
|
236
|
-
... days_before_now=5)
|
|
237
|
-
>>> async with AsyncGeoboxClient() as async_client:
|
|
238
|
-
>>> async_usage = usage.to_async(async_client)
|
|
239
|
-
"""
|
|
240
|
-
from .aio.usage import AsyncUsage
|
|
241
|
-
|
|
242
|
-
return AsyncUsage(api=async_client, user=self.user)
|
geobox/user.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import List,
|
|
1
|
+
from typing import List, TYPE_CHECKING, Union, Dict
|
|
2
2
|
from urllib.parse import urlencode, urljoin
|
|
3
3
|
|
|
4
4
|
from .base import Base
|
|
@@ -8,9 +8,6 @@ from .plan import Plan
|
|
|
8
8
|
|
|
9
9
|
if TYPE_CHECKING:
|
|
10
10
|
from . import GeoboxClient
|
|
11
|
-
from .aio import AsyncGeoboxClient
|
|
12
|
-
from .aio.user import AsyncUser
|
|
13
|
-
from .aio.user import AsyncSession
|
|
14
11
|
|
|
15
12
|
|
|
16
13
|
class User(Base):
|
|
@@ -399,33 +396,6 @@ class User(Base):
|
|
|
399
396
|
self.api.post(endpoint)
|
|
400
397
|
|
|
401
398
|
|
|
402
|
-
def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncUser':
|
|
403
|
-
"""
|
|
404
|
-
Switch to async version of the user instance to have access to the async methods
|
|
405
|
-
|
|
406
|
-
Args:
|
|
407
|
-
async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
|
|
408
|
-
|
|
409
|
-
Returns:
|
|
410
|
-
AsyncUser: the async instance of the user.
|
|
411
|
-
|
|
412
|
-
Example:
|
|
413
|
-
>>> from geobox import Geoboxclient
|
|
414
|
-
>>> from geobox.aio import AsyncGeoboxClient
|
|
415
|
-
>>> from geobox.user import User
|
|
416
|
-
>>> client = GeoboxClient()
|
|
417
|
-
>>> user = User.get_user(client) # without user_id parameter, it gets the current user
|
|
418
|
-
or
|
|
419
|
-
>>> user = client.get_user() # without user_id parameter, it gets the current user
|
|
420
|
-
>>> async with AsyncGeoboxClient() as async_client:
|
|
421
|
-
>>> async_user = user.to_async(async_client)
|
|
422
|
-
"""
|
|
423
|
-
from .aio.user import AsyncUser
|
|
424
|
-
|
|
425
|
-
return AsyncUser(api=async_client, user_id=self.user_id, data=self.data)
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
399
|
class Session(Base):
|
|
430
400
|
def __init__(self, uuid: str, data: Dict, user: 'User'):
|
|
431
401
|
"""
|
|
@@ -474,31 +444,3 @@ class Session(Base):
|
|
|
474
444
|
'session_uuid': self.uuid
|
|
475
445
|
})
|
|
476
446
|
self.user.api.post(self.endpoint, data)
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncSession':
|
|
480
|
-
"""
|
|
481
|
-
Switch to async version of the session instance to have access to the async methods
|
|
482
|
-
|
|
483
|
-
Args:
|
|
484
|
-
async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
|
|
485
|
-
|
|
486
|
-
Returns:
|
|
487
|
-
AsyncSession: the async instance of the session.
|
|
488
|
-
|
|
489
|
-
Example:
|
|
490
|
-
>>> from geobox import Geoboxclient
|
|
491
|
-
>>> from geobox.aio import AsyncGeoboxClient
|
|
492
|
-
>>> from geobox.user import User
|
|
493
|
-
>>> client = GeoboxClient()
|
|
494
|
-
>>> user = User.get_user(client) # without user_id parameter, it gets the current user
|
|
495
|
-
or
|
|
496
|
-
>>> user = client.get_user() # without user_id parameter, it gets the current user
|
|
497
|
-
>>> session = user.get_sessions()[0]
|
|
498
|
-
>>> async with AsyncGeoboxClient() as async_client:
|
|
499
|
-
>>> async_session = session.to_async(async_client)
|
|
500
|
-
"""
|
|
501
|
-
from .aio.user import AsyncSession
|
|
502
|
-
|
|
503
|
-
async_user = self.user.to_async(async_client=async_client)
|
|
504
|
-
return AsyncSession(uuid=self.uuid, data=self.data, user=async_user)
|
geobox/vector_tool.py
CHANGED
|
@@ -1965,4 +1965,53 @@ class VectorTool(Base):
|
|
|
1965
1965
|
'srid': srid
|
|
1966
1966
|
}
|
|
1967
1967
|
query = self._add_params_to_query(query_name='$xy_coordinate', inputs=inputs)
|
|
1968
|
+
return self._run_query(query=query, output_layer_name=output_layer_name)
|
|
1969
|
+
|
|
1970
|
+
|
|
1971
|
+
def table_to_vectorlayer(self,
|
|
1972
|
+
table_uuid: str,
|
|
1973
|
+
lon_field: str,
|
|
1974
|
+
lat_field: str,
|
|
1975
|
+
output_layer_name: Optional[str] = None,
|
|
1976
|
+
) -> Union['Task', Dict]:
|
|
1977
|
+
"""
|
|
1978
|
+
Converts a table to a vector layer by converting the lon and lat columns to a point geometry.
|
|
1979
|
+
|
|
1980
|
+
Args:
|
|
1981
|
+
table_uuid (str): UUID of the vector layer
|
|
1982
|
+
lon_field (str): field name containing lon value
|
|
1983
|
+
lat_field (str): field name containing lat value
|
|
1984
|
+
output_layer_name (str, optional): Name for the output layer. name must be a valid identifier and without spacing.
|
|
1985
|
+
|
|
1986
|
+
Returns:
|
|
1987
|
+
Union['Task', Dict]: If output_layer_name is specified, the function returns a task object; if not, it returns the vector tool execution result.
|
|
1988
|
+
|
|
1989
|
+
Example:
|
|
1990
|
+
>>> from geobox import GeoboxClient
|
|
1991
|
+
>>> client = GeoboxClient()
|
|
1992
|
+
>>> table = client.get_table(uuid="12345678-1234-5678-1234-567812345678")
|
|
1993
|
+
|
|
1994
|
+
>>> # execution
|
|
1995
|
+
>>> result = client.vector_tool.table_to_vectorlayer(
|
|
1996
|
+
... table_uuid=table.uuid,
|
|
1997
|
+
... lon_field="lon_field_name",
|
|
1998
|
+
... lat_field="lat_field_name",
|
|
1999
|
+
... )
|
|
2000
|
+
|
|
2001
|
+
>>> # save as layer
|
|
2002
|
+
>>> task = client.vector_tool.table_to_vectorlayer(
|
|
2003
|
+
... table_uuid=table.uuid,
|
|
2004
|
+
... lon_field="lon_field_name",
|
|
2005
|
+
... lat_field="lat_field_name",
|
|
2006
|
+
... output_layer_name="output_layer",
|
|
2007
|
+
... )
|
|
2008
|
+
>>> task.wait()
|
|
2009
|
+
>>> output_layer = task.output_asset
|
|
2010
|
+
"""
|
|
2011
|
+
inputs = {
|
|
2012
|
+
'table': table_uuid,
|
|
2013
|
+
'lon': lon_field,
|
|
2014
|
+
'lat': lat_field,
|
|
2015
|
+
}
|
|
2016
|
+
query = self._add_params_to_query(query_name='$tabel_to_vector_layer', inputs=inputs)
|
|
1968
2017
|
return self._run_query(query=query, output_layer_name=output_layer_name)
|
geobox/vectorlayer.py
CHANGED
|
@@ -8,7 +8,7 @@ from .field import Field, FieldType
|
|
|
8
8
|
from .feature import Feature
|
|
9
9
|
from .enums import LayerType
|
|
10
10
|
from .task import Task
|
|
11
|
-
from .enums import InputGeomType, FileOutputFormat
|
|
11
|
+
from .enums import InputGeomType, FileOutputFormat
|
|
12
12
|
from .version import VectorLayerVersion
|
|
13
13
|
|
|
14
14
|
if TYPE_CHECKING:
|
|
@@ -17,8 +17,6 @@ if TYPE_CHECKING:
|
|
|
17
17
|
from .user import User
|
|
18
18
|
from .file import File
|
|
19
19
|
from .attachment import Attachment
|
|
20
|
-
from .aio import AsyncGeoboxClient
|
|
21
|
-
from .aio.vectorlayer import AsyncVectorLayer
|
|
22
20
|
|
|
23
21
|
|
|
24
22
|
class VectorLayer(Base):
|
|
@@ -669,6 +667,8 @@ class VectorLayer(Base):
|
|
|
669
667
|
If False, returns a list of Feature objects. default: False.
|
|
670
668
|
|
|
671
669
|
Keyword Args:
|
|
670
|
+
relationship_uuid (str): The uuid of relationship
|
|
671
|
+
related_record_id (int): This is the id of the feature or row that these features are related to. This id blongs to the related layer or table not this layer
|
|
672
672
|
quant_factor (int): Quantization factor. This parameter is only used by topojson encoder and is ignored for other formats. Higher quantizaion value means higher geometry precision. default is 1000000.
|
|
673
673
|
skip (int): Number of features to skip. default is 0.
|
|
674
674
|
limit (int): Maximum number of features to return. default is 100.
|
|
@@ -705,6 +705,8 @@ class VectorLayer(Base):
|
|
|
705
705
|
"""
|
|
706
706
|
params = {
|
|
707
707
|
'f': 'json',
|
|
708
|
+
'relationship_uuid': kwargs.get('relationship_uuid'),
|
|
709
|
+
'related_record_id': kwargs.get('related_record_id'),
|
|
708
710
|
'quant_factor': kwargs.get('quant_factor', 1000000),
|
|
709
711
|
'skip': kwargs.get('skip', 0),
|
|
710
712
|
'limit': kwargs.get('limit', 100),
|
|
@@ -1022,15 +1024,10 @@ class VectorLayer(Base):
|
|
|
1022
1024
|
data=data,
|
|
1023
1025
|
factory_func=lambda api, item: VectorLayerView(api, item['uuid'], self.layer_type, item))
|
|
1024
1026
|
|
|
1025
|
-
|
|
1026
|
-
def
|
|
1027
|
+
@property
|
|
1028
|
+
def tile_pbf_url(self) -> str:
|
|
1027
1029
|
"""
|
|
1028
1030
|
Get a vector tile pbf url for the layer.
|
|
1029
|
-
|
|
1030
|
-
Args:
|
|
1031
|
-
x (int, optional): X coordinate of the tile.
|
|
1032
|
-
y (int, optional): Y coordinate of the tile.
|
|
1033
|
-
z (int, optioanl): Zoom level of the tile.
|
|
1034
1031
|
|
|
1035
1032
|
Returns:
|
|
1036
1033
|
str: The vector tile url.
|
|
@@ -1040,9 +1037,9 @@ class VectorLayer(Base):
|
|
|
1040
1037
|
>>> from geobox.vectorlayer import VectorLayer
|
|
1041
1038
|
>>> client = GeoboxClient()
|
|
1042
1039
|
>>> layer = VectorLayer.get_vector(api=client, uuid="12345678-1234-5678-1234-567812345678")
|
|
1043
|
-
>>>
|
|
1040
|
+
>>> url = layer.tile_pbf_url
|
|
1044
1041
|
"""
|
|
1045
|
-
endpoint = f'{self.api.base_url}{self.endpoint}tiles/{z}/{x}/{y}.pbf'
|
|
1042
|
+
endpoint = f'{self.api.base_url}{self.endpoint}' + 'tiles/{z}/{x}/{y}.pbf'
|
|
1046
1043
|
|
|
1047
1044
|
if not self.api.access_token and self.api.apikey:
|
|
1048
1045
|
endpoint = f'{endpoint}?apikey={self.api.apikey}'
|
|
@@ -1347,27 +1344,3 @@ class VectorLayer(Base):
|
|
|
1347
1344
|
feature=feature,
|
|
1348
1345
|
display_name=display_name,
|
|
1349
1346
|
description=description)
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncVectorLayer':
|
|
1353
|
-
"""
|
|
1354
|
-
Switch to async version of the vector layer instance to have access to the async methods
|
|
1355
|
-
|
|
1356
|
-
Args:
|
|
1357
|
-
async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
|
|
1358
|
-
|
|
1359
|
-
Returns:
|
|
1360
|
-
AsyncVectorLayer: the async instance of the vector layer.
|
|
1361
|
-
|
|
1362
|
-
Example:
|
|
1363
|
-
>>> from geobox import Geoboxclient
|
|
1364
|
-
>>> from geobox.aio import AsyncGeoboxClient
|
|
1365
|
-
>>> from geobox.vectorlayer import VectorLayer
|
|
1366
|
-
>>> client = GeoboxClient()
|
|
1367
|
-
>>> layer = VectorLayer.get_vector(client, uuid="12345678-1234-5678-1234-567812345678")
|
|
1368
|
-
>>> async with AsyncGeoboxClient() as async_client:
|
|
1369
|
-
>>> async_layer = layer.to_async(async_client)
|
|
1370
|
-
"""
|
|
1371
|
-
from .aio.vectorlayer import AsyncVectorLayer
|
|
1372
|
-
|
|
1373
|
-
return AsyncVectorLayer(api=async_client, uuid=self.uuid, layer_type=self.layer_type, data=self.data)
|
geobox/version.py
CHANGED
|
@@ -5,8 +5,7 @@ from .base import Base
|
|
|
5
5
|
if TYPE_CHECKING:
|
|
6
6
|
from .api import GeoboxClient
|
|
7
7
|
from .user import User
|
|
8
|
-
|
|
9
|
-
from .aio.version import VectorLayerVersion as AsyncVectorLayerVersion
|
|
8
|
+
|
|
10
9
|
|
|
11
10
|
class VectorLayerVersion(Base):
|
|
12
11
|
|
|
@@ -247,27 +246,3 @@ class VectorLayerVersion(Base):
|
|
|
247
246
|
'limit': limit
|
|
248
247
|
}
|
|
249
248
|
return super()._get_shared_users(self.endpoint, params)
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncVectorLayerVersion':
|
|
253
|
-
"""
|
|
254
|
-
Switch to async version of the version instance to have access to the async methods
|
|
255
|
-
|
|
256
|
-
Args:
|
|
257
|
-
async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
|
|
258
|
-
|
|
259
|
-
Returns:
|
|
260
|
-
AsyncVectorLayerVersion: the async instance of the version.
|
|
261
|
-
|
|
262
|
-
Example:
|
|
263
|
-
>>> from geobox import Geoboxclient
|
|
264
|
-
>>> from geobox.aio import AsyncGeoboxClient
|
|
265
|
-
>>> from geobox.version import VectorLayerversion
|
|
266
|
-
>>> client = GeoboxClient()
|
|
267
|
-
>>> version = VectorLayerversion.get_version(client, uuid="12345678-1234-5678-1234-567812345678")
|
|
268
|
-
>>> async with AsyncGeoboxClient() as async_client:
|
|
269
|
-
>>> async_version = version.to_async(async_client)
|
|
270
|
-
"""
|
|
271
|
-
from .aio.version import AsyncVectorLayerVersion
|
|
272
|
-
|
|
273
|
-
return AsyncVectorLayerVersion(api=async_client, uuid=self.uuid, data=self.data)
|
geobox/view.py
CHANGED
|
@@ -11,8 +11,6 @@ if TYPE_CHECKING:
|
|
|
11
11
|
from .task import Task
|
|
12
12
|
from .file import File
|
|
13
13
|
from .attachment import Attachment
|
|
14
|
-
from .aio import AsyncGeoboxClient
|
|
15
|
-
from .aio.view import AsyncVectorLayerView
|
|
16
14
|
|
|
17
15
|
|
|
18
16
|
class VectorLayerView(VectorLayer):
|
|
@@ -665,14 +663,10 @@ class VectorLayerView(VectorLayer):
|
|
|
665
663
|
bbox, out_srid, zipped, feature_ids, bbox_srid, q, fields)
|
|
666
664
|
|
|
667
665
|
|
|
668
|
-
|
|
666
|
+
@property
|
|
667
|
+
def tile_pbf_url(self) -> str:
|
|
669
668
|
"""
|
|
670
669
|
Get a vector tile pbf url for the view.
|
|
671
|
-
|
|
672
|
-
Args:
|
|
673
|
-
x (int): X coordinate of the tile.
|
|
674
|
-
y (int): Y coordinate of the tile.
|
|
675
|
-
z (int): Zoom level of the tile.
|
|
676
670
|
|
|
677
671
|
Returns:
|
|
678
672
|
str: the vector tile url.
|
|
@@ -682,9 +676,9 @@ class VectorLayerView(VectorLayer):
|
|
|
682
676
|
>>> from geobox.view import VectorLayerView
|
|
683
677
|
>>> client = GeoboxClient()
|
|
684
678
|
>>> view = VectorLayerView.get_view(client, uuid="12345678-1234-5678-1234-567812345678")
|
|
685
|
-
>>>
|
|
679
|
+
>>> url = view.tile_pbf_url
|
|
686
680
|
"""
|
|
687
|
-
return super().
|
|
681
|
+
return super().tile_pbf_url
|
|
688
682
|
|
|
689
683
|
|
|
690
684
|
def get_tile_json(self) -> Dict:
|
|
@@ -960,27 +954,3 @@ class VectorLayerView(VectorLayer):
|
|
|
960
954
|
feature=feature,
|
|
961
955
|
display_name=display_name,
|
|
962
956
|
description=description)
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncVectorLayerView':
|
|
966
|
-
"""
|
|
967
|
-
Switch to async version of the view instance to have access to the async methods
|
|
968
|
-
|
|
969
|
-
Args:
|
|
970
|
-
async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
|
|
971
|
-
|
|
972
|
-
Returns:
|
|
973
|
-
AsyncVectorLayerView: the async instance of the view.
|
|
974
|
-
|
|
975
|
-
Example:
|
|
976
|
-
>>> from geobox import Geoboxclient
|
|
977
|
-
>>> from geobox.aio import AsyncGeoboxClient
|
|
978
|
-
>>> from geobox.view import VectorLayerView
|
|
979
|
-
>>> client = GeoboxClient()
|
|
980
|
-
>>> view = VectorLayerView.get_view(client, uuid="12345678-1234-5678-1234-567812345678")
|
|
981
|
-
>>> async with AsyncGeoboxClient() as async_client:
|
|
982
|
-
>>> async_view = view.to_async(async_client)
|
|
983
|
-
"""
|
|
984
|
-
from .aio.view import AsyncVectorLayerView
|
|
985
|
-
|
|
986
|
-
return AsyncVectorLayerView(api=async_client, uuid=self.uuid, layer_type=self.layer_type, data=self.data)
|
geobox/workflow.py
CHANGED
|
@@ -5,8 +5,7 @@ from .base import Base
|
|
|
5
5
|
if TYPE_CHECKING:
|
|
6
6
|
from . import GeoboxClient
|
|
7
7
|
from .user import User
|
|
8
|
-
|
|
9
|
-
from .aio.workflow import Workflow as AsyncWorkflow
|
|
8
|
+
|
|
10
9
|
|
|
11
10
|
class Workflow(Base):
|
|
12
11
|
|
|
@@ -313,27 +312,3 @@ class Workflow(Base):
|
|
|
313
312
|
'limit': limit
|
|
314
313
|
}
|
|
315
314
|
return super()._get_shared_users(self.endpoint, params)
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
def to_async(self, async_client: 'AsyncGeoboxClient') -> 'AsyncWorkflow':
|
|
319
|
-
"""
|
|
320
|
-
Switch to async version of the workflow instance to have access to the async methods
|
|
321
|
-
|
|
322
|
-
Args:
|
|
323
|
-
async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
|
|
324
|
-
|
|
325
|
-
Returns:
|
|
326
|
-
AsyncWorkflow: the async instance of the workflow.
|
|
327
|
-
|
|
328
|
-
Example:
|
|
329
|
-
>>> from geobox import Geoboxclient
|
|
330
|
-
>>> from geobox.aio import AsyncGeoboxClient
|
|
331
|
-
>>> from geobox.workflow import Workflow
|
|
332
|
-
>>> client = GeoboxClient()
|
|
333
|
-
>>> workflow = Workflow.get_workflow(client, uuid="12345678-1234-5678-1234-567812345678")
|
|
334
|
-
>>> async with AsyncGeoboxClient() as async_client:
|
|
335
|
-
>>> async_workflow = workflow.to_async(async_client)
|
|
336
|
-
"""
|
|
337
|
-
from .aio.workflow import AsyncWorkflow
|
|
338
|
-
|
|
339
|
-
return AsyncWorkflow(api=async_client, uuid=self.uuid, data=self.data)
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
geobox/__init__.py,sha256=zGYCpxmYA06-PNNSRqRUNhiuoaM5a8x68qqQbJ-z9hs,1922
|
|
2
|
+
geobox/api.py,sha256=KPncJY6oVPLP_Mt3ewtrLQyAHoUY0O3REG_uxS4fuyc,116350
|
|
3
|
+
geobox/apikey.py,sha256=chtq19VqssH382bEsOS4ohZYmuhs3bDD1WUIZo5YwE8,7762
|
|
4
|
+
geobox/attachment.py,sha256=jYZa8s_odNYT1EcS0VQo9chs9UhYjIrzXNVj_5r8ZJA,12127
|
|
5
|
+
geobox/base.py,sha256=paE3-Wshzp4ykpkbXdIZ6MVPDwyTRgrr-OTYd9BK2o8,13353
|
|
6
|
+
geobox/basemap.py,sha256=8FS4v_7bmmPzc3eJVo8SXn_wTx47l-cGx52RiSHRWPU,4642
|
|
7
|
+
geobox/dashboard.py,sha256=ej6gytUega6YWuUb4FmW6nBtaPaXaKJVJCI9_QPPIEM,11930
|
|
8
|
+
geobox/enums.py,sha256=IRJixg7X4LBvnkwJZjV3hskja924kHjvI4fHsK7gsjE,8319
|
|
9
|
+
geobox/exception.py,sha256=jvpnv0M2Ck1FpxHTL_aKYWxGvLnCQ3d9vOrMIktjw1U,1507
|
|
10
|
+
geobox/feature.py,sha256=PD-OPM8GtkWzHa_DOB5NlMgqSEvZ3aBn7hkt1djnc1c,25886
|
|
11
|
+
geobox/field.py,sha256=tCuGOauZR4EhvoFw9GtfKnxX-qeGjenGt4btQDOo6fM,10043
|
|
12
|
+
geobox/file.py,sha256=V_J7_9n83lkXETlpIzcW6Do0OTboWZiJjZbfVipOkAo,19187
|
|
13
|
+
geobox/layout.py,sha256=YgFYgzLxRstDDSqt34JZ1eVnInxTQTmUjnR2M50ItbM,11547
|
|
14
|
+
geobox/log.py,sha256=oDukjftcQViuVxS5nHQFW7t0usUI8RLa9IImRWB76UI,4029
|
|
15
|
+
geobox/map.py,sha256=LXnpGrdyQoAZvX-h91QbFXQvVTq54qhUFXYkCEK9Smo,38018
|
|
16
|
+
geobox/model3d.py,sha256=JSKprwM5tP1xvXEYlHgNNmLLKZZAQLRT-xH54OxoU4I,14261
|
|
17
|
+
geobox/mosaic.py,sha256=oCd8WRSx8BfOizHnNycuRzxpmxM2IaLUc4BLpEu5ICg,24750
|
|
18
|
+
geobox/plan.py,sha256=zq6YY3TTPI7hQqW07Mk9QVG1gE9kNEdInqLeZv62wT8,12349
|
|
19
|
+
geobox/query.py,sha256=UERu8Iav7smQTuDKpqJpgVKL8vFc3fBVL9mYXH_xpXI,24961
|
|
20
|
+
geobox/raster.py,sha256=BCrx7GyvKGb9B_CsnD1Dg4zRTl_PqQH3MnD520X3e1w,32496
|
|
21
|
+
geobox/raster_analysis.py,sha256=yoWA5_-GixyAJMpo8cHmZcYrEYUvwo2395BwrGlUBaA,34920
|
|
22
|
+
geobox/route.py,sha256=cKZTTHBHM8woWbhHIpCvrRX_doJcTkGktouee0z7oG0,2723
|
|
23
|
+
geobox/scene.py,sha256=wjS5K5d2aIEcB9shAU6RaINQoLIpqRH6UEMo_kKfQBg,11538
|
|
24
|
+
geobox/settings.py,sha256=NqWjIaYhwBsnHeTBgxeftyGUtFoKiMeggxDWw7w_Qro,5823
|
|
25
|
+
geobox/table.py,sha256=tuFljp4QnOGXMjTo6E6vLh4z4pyeSRoVpp3eGyMS1_8,64381
|
|
26
|
+
geobox/task.py,sha256=ZWY6VYcyMlRlxjMa0JoZgqjC2kDX_iN-MfyxfhRGOxw,13796
|
|
27
|
+
geobox/tile3d.py,sha256=_27j9b7SfCUGaP61xnpZV2tJ4PWYUcLAMj53efBosK8,11286
|
|
28
|
+
geobox/tileset.py,sha256=YlY8LMJiAOcEoMUDonrQnTk8rvjaN7S8OcPgpyyxn_s,23955
|
|
29
|
+
geobox/usage.py,sha256=z75Psp752vGmCoGeYBG4Kala-c9OY8zYZvvNVM5FFtU,7890
|
|
30
|
+
geobox/user.py,sha256=PAVpFiYAcvqT7UO-Y9y5CKNJ48GSl-XtxwNgen0uqyU,15526
|
|
31
|
+
geobox/utils.py,sha256=JmlRqDVIo0vBikzH1XakRrCrEIfLA7_eTJnBWBvGhJI,2243
|
|
32
|
+
geobox/vector_tool.py,sha256=VwxZRaI_GXZHkrjSfJkY8Bv0xE3QcCpDUI9PP68hMgQ,88291
|
|
33
|
+
geobox/vectorlayer.py,sha256=DNBObV-0FHRMFARx0jnAeB94zS_wguCc8CvdRTGIJNg,57782
|
|
34
|
+
geobox/version.py,sha256=XwScsj3A2-b3jFtPZ08LiAd7uPuUDOFTU5UyKlf317Y,9619
|
|
35
|
+
geobox/view.py,sha256=7Ew3jZlQjb0Yu-ZSs6MvB2hJkga2OsHqGfIfC3IzKiA,41992
|
|
36
|
+
geobox/workflow.py,sha256=RP5yjE8aaUd31Sw-bpIbKu2TUP_6mhyvepBj5zI_Q6c,11827
|
|
37
|
+
geobox/aio/__init__.py,sha256=4Ufsv-VOW7FQGD1OmSRKH7E3sLCaKC0MpEMsSMBC3ro,1933
|
|
38
|
+
geobox/aio/api.py,sha256=y4Uf7OUdAob8JGJvIven8ufxkUDLKIyGrVGtYxxCuc0,120858
|
|
39
|
+
geobox/aio/apikey.py,sha256=xcB32URNYbHTvnzOyTCnEfejN7kIRGLCrUUp8NDQc0M,8434
|
|
40
|
+
geobox/aio/attachment.py,sha256=-RP49z_-oW7mjjwQ4WuWbZKt0_8OXUOReBCeRfJkdEs,12273
|
|
41
|
+
geobox/aio/base.py,sha256=H9CB-5Gas3c1Xp14nW-PS-syoGNBpyRLN2iujlSxWLU,9455
|
|
42
|
+
geobox/aio/basemap.py,sha256=coAPc6-jf2n27pTh9vrRSUPCw7_kmefDH8OU8w6WjNI,5015
|
|
43
|
+
geobox/aio/dashboard.py,sha256=XtB1VX9GKERFPrgqj9Git05W74aXq49pC0uhVvUFi4M,12765
|
|
44
|
+
geobox/aio/feature.py,sha256=k6_Y4d33kuKpWk1nDP4MryilZ8Eokx_CN1e0jQpQnQw,26459
|
|
45
|
+
geobox/aio/field.py,sha256=af5QGojQ7PisnlQdDumyXZUI1vNMnvt85vpn1AhKUT0,10401
|
|
46
|
+
geobox/aio/file.py,sha256=c7zAN-EdDcsycX59whMKy0KWhbWNsjz0ozzm0RZ3DB4,20243
|
|
47
|
+
geobox/aio/layout.py,sha256=jLMgWEG0O-4AJUtk8z6-QZQoUt197A_W9qolxgX7OGM,12441
|
|
48
|
+
geobox/aio/log.py,sha256=GQzq1Sv5PQve6IYfJ_tGqtx26qCNuMf0OmA1QTdoDCc,4354
|
|
49
|
+
geobox/aio/map.py,sha256=RhKtf0lyy2klB6Ql-2Q1MYur_azpY7q6lPZj52GC3MA,40246
|
|
50
|
+
geobox/aio/model3d.py,sha256=jJgivii3goxjNQBN5NdqTest1hBXwhaIttdamqRdGDg,15414
|
|
51
|
+
geobox/aio/mosaic.py,sha256=19rtSBu2sYRDLbz0UNrqOHLZvfYRrFGRoKYruAd2IRQ,26930
|
|
52
|
+
geobox/aio/plan.py,sha256=_JLml0WqaS1F-jmABAQ609SfJpoMxHFK_mgW_lllCfc,12893
|
|
53
|
+
geobox/aio/query.py,sha256=A5JpnWfDsL6LLCJxKtpwm-LdTvvZ68NMZKnFLsYLvGI,26763
|
|
54
|
+
geobox/aio/raster.py,sha256=6fd7OBBllnZT8n3y5N0qCiG9dDh1zPsnXq1FXImzZkM,34880
|
|
55
|
+
geobox/aio/raster_analysis.py,sha256=aSU_E8TXrex2x9w3S4WCWGTu0q81qOBN0rXo5uG5IgM,36672
|
|
56
|
+
geobox/aio/route.py,sha256=dkKsK4ZjL7XikgoZ3lJfkr2UXwrmxct4Qt2DzZg0upE,2860
|
|
57
|
+
geobox/aio/scene.py,sha256=sLvYAv9Im6QBfopK2TxTt0DeUl5lZ_GI8W6_vmAr-fg,12390
|
|
58
|
+
geobox/aio/settings.py,sha256=dOt1EWHW283lovQM8ZnZTES0QMOPhcHYhtwLF7WV8ts,5875
|
|
59
|
+
geobox/aio/table.py,sha256=t9AzHCWVdLsuNpLNQgrajMLj8jgRYuEwPTbgtw1XG_Q,69549
|
|
60
|
+
geobox/aio/task.py,sha256=j_p09FcEZDhtKjCi7VzxTVSSvtcpxRBbvXRBkdiyxy4,14841
|
|
61
|
+
geobox/aio/tile3d.py,sha256=VMc6fIoPuxKgAjfTHB-2rnXiMhGhb6eAWgnFqditVBA,12236
|
|
62
|
+
geobox/aio/tileset.py,sha256=AaPt6Q2zh2YZNPE0QHjkbwH-TR-fcHmMMJkZrQeeANs,26619
|
|
63
|
+
geobox/aio/usage.py,sha256=QUV71c8ZCjfaOlpba5yF78N6P7sSWENpRiEJ12NYvTc,8162
|
|
64
|
+
geobox/aio/user.py,sha256=ZCT1uSsxOTuAnWaH9uiE-fN0cf1onARF9xxgPa2b-h8,16630
|
|
65
|
+
geobox/aio/vector_tool.py,sha256=MTBQm5UmzP-wE2acP_TnTTkc8HEbWoWvt6hyNAOZvGg,95025
|
|
66
|
+
geobox/aio/vectorlayer.py,sha256=AHjbxxv6pI7bc4OAozemAm1-4vidAUcbwyCO4vqSzQs,58829
|
|
67
|
+
geobox/aio/version.py,sha256=EFb14Xd4AYzwtcv9Y2lj9hmokd34Q3RBdKLu9bgRUOw,10380
|
|
68
|
+
geobox/aio/view.py,sha256=uVhSGc6vQGzKjt_06hhdClbEuzIG3HGrrn8f2MkS2C8,44106
|
|
69
|
+
geobox/aio/workflow.py,sha256=Q0IRb_4avRWz3Y8IZW41F6SBPjaCtzlD5hheg6ggXVM,12645
|
|
70
|
+
geobox-2.4.0.dist-info/licenses/LICENSE,sha256=AvFB7W94sJYKLDhBxLRshL3upexCOG8HQY_1JibB96w,1063
|
|
71
|
+
geobox-2.4.0.dist-info/METADATA,sha256=mfGrIR3m28VjGj9M2qhAiCezGQltZ5x32ecm2fI4zSw,3089
|
|
72
|
+
geobox-2.4.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
73
|
+
geobox-2.4.0.dist-info/top_level.txt,sha256=ppXH8Bu2mlB-pLQ6lsoWEm2Gr6wZx1uzkhetsYA5ins,7
|
|
74
|
+
geobox-2.4.0.dist-info/RECORD,,
|