geobox 2.0.0__py3-none-any.whl → 2.1.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/analysis.py +757 -0
- geobox/aio/api.py +103 -4
- geobox/aio/query.py +0 -9
- geobox/aio/raster.py +1273 -869
- geobox/aio/task.py +1 -1
- geobox/aio/usage.py +1 -1
- geobox/aio/vectorlayer.py +109 -2
- geobox/aio/workflow.py +1 -1
- geobox/analysis.py +757 -0
- geobox/api.py +104 -6
- geobox/enums.py +402 -348
- geobox/query.py +1 -10
- geobox/raster.py +1270 -863
- geobox/task.py +1 -1
- geobox/vectorlayer.py +107 -2
- geobox/view.py +2 -2
- {geobox-2.0.0.dist-info → geobox-2.1.0.dist-info}/METADATA +1 -1
- {geobox-2.0.0.dist-info → geobox-2.1.0.dist-info}/RECORD +21 -19
- {geobox-2.0.0.dist-info → geobox-2.1.0.dist-info}/WHEEL +0 -0
- {geobox-2.0.0.dist-info → geobox-2.1.0.dist-info}/licenses/LICENSE +0 -0
- {geobox-2.0.0.dist-info → geobox-2.1.0.dist-info}/top_level.txt +0 -0
geobox/task.py
CHANGED
|
@@ -249,7 +249,7 @@ class Task(Base):
|
|
|
249
249
|
|
|
250
250
|
def _check_timeout(self, start_time: float, timeout: Union[int, None]) -> None:
|
|
251
251
|
"""Checks if the task has exceeded the timeout period."""
|
|
252
|
-
if timeout and time.time() - start_time > timeout:
|
|
252
|
+
if timeout and time.time() - start_time > float(timeout):
|
|
253
253
|
raise TimeoutError(f"Task {self.name} timed out after {timeout} seconds")
|
|
254
254
|
|
|
255
255
|
|
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, AnalysisDataType
|
|
12
12
|
from .version import VectorLayerVersion
|
|
13
13
|
|
|
14
14
|
if TYPE_CHECKING:
|
|
@@ -1360,4 +1360,109 @@ class VectorLayer(Base):
|
|
|
1360
1360
|
"""
|
|
1361
1361
|
from .aio.vectorlayer import VectorLayer as AsyncVectorLayer
|
|
1362
1362
|
|
|
1363
|
-
return AsyncVectorLayer(api=async_client, uuid=self.uuid, layer_type=self.layer_type, data=self.data)
|
|
1363
|
+
return AsyncVectorLayer(api=async_client, uuid=self.uuid, layer_type=self.layer_type, data=self.data)
|
|
1364
|
+
|
|
1365
|
+
|
|
1366
|
+
def rasterize(self,
|
|
1367
|
+
output_raster_name: str,
|
|
1368
|
+
pixel_size: int = 10,
|
|
1369
|
+
nodata: Optional[int] = -9999,
|
|
1370
|
+
data_type: Optional[AnalysisDataType] = AnalysisDataType.int16,
|
|
1371
|
+
burn_value: Optional[int] = 1,
|
|
1372
|
+
burn_attribute: Optional[str] = None,
|
|
1373
|
+
user_id: Optional[int] = None) -> 'Task':
|
|
1374
|
+
"""
|
|
1375
|
+
Rasterize a vector layer.
|
|
1376
|
+
|
|
1377
|
+
This method converts a vector layer (or view) to a raster dataset using the specified parameters.
|
|
1378
|
+
You can control the output raster's name, pixel size, data type, nodata value, and the value to burn (either a constant or from an attribute field).
|
|
1379
|
+
Only users with Publisher role or higher can perform this operation.
|
|
1380
|
+
|
|
1381
|
+
Args:
|
|
1382
|
+
output_raster_name (str): Name for the output raster dataset
|
|
1383
|
+
pixel_size (int, optional): Pixel size for the output raster (must be > 0). default: 10
|
|
1384
|
+
nodata (int, optional): NoData value to use in the output raster. default: -9999
|
|
1385
|
+
data_type (AnalysisDataType, optional): Data type for the output raster (e.g., int16, float32). default: AnalysisDataType.int16
|
|
1386
|
+
burn_value (int, optional): Value to burn into the raster for all features (if burn_attribute is not set). default: 1
|
|
1387
|
+
burn_attribute (str, optional): Name of the attribute field to use for burning values into the raster
|
|
1388
|
+
user_id (int, optional): specific user. priviledges required!
|
|
1389
|
+
|
|
1390
|
+
Returns:
|
|
1391
|
+
Task: task instance of the process
|
|
1392
|
+
|
|
1393
|
+
Example:
|
|
1394
|
+
>>> from geobox import GeoboxClient
|
|
1395
|
+
>>> client = GeoboxClient()
|
|
1396
|
+
>>> vector = client.get_vector(uuid="12345678-1234-5678-1234-567812345678")
|
|
1397
|
+
>>> task = vector.rasterize(output_raster_name='test')
|
|
1398
|
+
"""
|
|
1399
|
+
from .analysis import Analysis
|
|
1400
|
+
return Analysis.rasterize(self.api,
|
|
1401
|
+
self,
|
|
1402
|
+
output_raster_name=output_raster_name,
|
|
1403
|
+
burn_attribute=burn_attribute,
|
|
1404
|
+
pixel_size=pixel_size,
|
|
1405
|
+
nodata=nodata,
|
|
1406
|
+
data_type=data_type,
|
|
1407
|
+
burn_value=burn_value,
|
|
1408
|
+
user_id=user_id)
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
def idw_interpolation(self,
|
|
1412
|
+
output_raster_name: str,
|
|
1413
|
+
z_field: Field,
|
|
1414
|
+
match_raster_uuid: Optional[str] = None,
|
|
1415
|
+
pixel_size: int = 10,
|
|
1416
|
+
extent: Optional[str] = None,
|
|
1417
|
+
power: float = 2.0,
|
|
1418
|
+
smoothing: float = 0.0,
|
|
1419
|
+
max_points: int = 16,
|
|
1420
|
+
radius: int = 1000,
|
|
1421
|
+
nodata: int = -9999,
|
|
1422
|
+
out_dtype: AnalysisDataType = AnalysisDataType.float32,
|
|
1423
|
+
user_id: Optional[int] = None) -> 'Task':
|
|
1424
|
+
"""
|
|
1425
|
+
Create an IDW (Inverse Distance Weighting) interpolation raster from point data.
|
|
1426
|
+
|
|
1427
|
+
it creates a raster using IDW interpolation from point data in a vector layer.
|
|
1428
|
+
Only users with Publisher role or higher can perform this operation.
|
|
1429
|
+
|
|
1430
|
+
Args:
|
|
1431
|
+
output_raster_name (str): Name for the output IDW raster dataset.
|
|
1432
|
+
z_field (Field): the field containing the values to interpolate.
|
|
1433
|
+
match_raster_uuid (str, optional): UUID of reference raster to match resolution/extent.
|
|
1434
|
+
pixel_size (int, optional): Pixel size for the output raster. default: 10
|
|
1435
|
+
extent (str, optional): Extent as 'minX,minY,maxX,maxY'.
|
|
1436
|
+
power (float, optional): Power parameter for IDW. default: 2.0
|
|
1437
|
+
smoothing (float, optional): Smoothing parameter for IDW. default: 0.0
|
|
1438
|
+
max_points (int, optional): Maximum number of neighbors to use. default: 16
|
|
1439
|
+
radius (int, optional): Search radius in map units. default: 1000
|
|
1440
|
+
nodata (int, optional): NoData value for the output raster. default: -9999
|
|
1441
|
+
out_dtype (AnalysisDataType, optional): Output data type.
|
|
1442
|
+
user_id (int, optional): specific user. priviledges required!
|
|
1443
|
+
|
|
1444
|
+
Returns:
|
|
1445
|
+
Task: task instance of the process
|
|
1446
|
+
|
|
1447
|
+
Example:
|
|
1448
|
+
>>> from geobox import GeoboxClient
|
|
1449
|
+
>>> client = GeoboxClient()
|
|
1450
|
+
>>> vector = client.get_vector(uuid="12345678-1234-5678-1234-567812345678")
|
|
1451
|
+
>>> field = vector.get_field_by_name('field_name')
|
|
1452
|
+
>>> task = vector.idw(output_raster_name='test', z_field=field)
|
|
1453
|
+
"""
|
|
1454
|
+
from .analysis import Analysis
|
|
1455
|
+
return Analysis.idw_interpolation(self.api,
|
|
1456
|
+
self,
|
|
1457
|
+
output_raster_name=output_raster_name,
|
|
1458
|
+
z_field=z_field,
|
|
1459
|
+
match_raster_uuid=match_raster_uuid,
|
|
1460
|
+
pixel_size=pixel_size,
|
|
1461
|
+
extent=extent,
|
|
1462
|
+
power=power,
|
|
1463
|
+
smoothing=smoothing,
|
|
1464
|
+
max_points=max_points,
|
|
1465
|
+
radius=radius,
|
|
1466
|
+
nodata=nodata,
|
|
1467
|
+
out_dtype=out_dtype,
|
|
1468
|
+
user_id=user_id)
|
geobox/view.py
CHANGED
|
@@ -80,8 +80,8 @@ class VectorLayerView(VectorLayer):
|
|
|
80
80
|
search_fields(str): Comma separated list of fields for searching.
|
|
81
81
|
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.
|
|
82
82
|
return_count(bool): Whether to return the count of the layer views. default is False.
|
|
83
|
-
skip(int): The number of
|
|
84
|
-
limit(int): The maximum number of
|
|
83
|
+
skip(int): The number of views to skip. minimum is 0.
|
|
84
|
+
limit(int): The maximum number of views to return. minimum is 1. default is 10.
|
|
85
85
|
user_id(int): Specific user. privileges required.
|
|
86
86
|
shared(bool): Whether to return shared views. default is False.
|
|
87
87
|
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
geobox/__init__.py,sha256=ne0OfIpHDw_RiSuNmk1APBL66jAYXXPn_FAKHzkBrRM,1895
|
|
2
|
-
geobox/
|
|
2
|
+
geobox/analysis.py,sha256=jVx6Q_NAe6jMIz5ib3bxdqo8_3IKCdcTwawT1HSlsYo,35086
|
|
3
|
+
geobox/api.py,sha256=uRpZoDrcXglNazv142EhsEEZ0AEV1y4QEqeKRsICJzM,110295
|
|
3
4
|
geobox/apikey.py,sha256=p1kmnpjIa41vVKrz2nApWFQltorv68MNawtIWz5Ja0k,8562
|
|
4
5
|
geobox/attachment.py,sha256=kbTmEayMf66f7gIS8uhD36SdnQrl1Nq_DRXjBdCeXDI,13026
|
|
5
6
|
geobox/base.py,sha256=-7Qsxw7OzgtFygKqaDVB__HxmUqA521XGxj9ibtTmO8,12967
|
|
6
7
|
geobox/basemap.py,sha256=998m2lpgESIGsJuADWFnqg5eShskCtlp6Qcri4IM6Hg,5587
|
|
7
8
|
geobox/dashboard.py,sha256=iBK1ZFl3pM95q0lFAeRDnuk2vhhfm9-zBV0YOTKXAu0,12821
|
|
8
|
-
geobox/enums.py,sha256=
|
|
9
|
+
geobox/enums.py,sha256=PBePp0v9Qp5sR0ky2yj5w6dSfjFpRD4BjyA2sNJvQLE,7511
|
|
9
10
|
geobox/exception.py,sha256=jvpnv0M2Ck1FpxHTL_aKYWxGvLnCQ3d9vOrMIktjw1U,1507
|
|
10
11
|
geobox/feature.py,sha256=PphGJLSya2FR-JSaC7lE0YE-nf2A2wHPTCG3Rj6iz9Y,19239
|
|
11
12
|
geobox/field.py,sha256=ZNbuf3ayemyguVee10yCKH4aq62xUEmY--qQLTeRz4Q,10897
|
|
@@ -16,23 +17,24 @@ geobox/map.py,sha256=CGorSxO5vuiOtmwUs3Mk4PeOg-HF5py3sRo6ahx9GF8,38074
|
|
|
16
17
|
geobox/model3d.py,sha256=e_d_E7yj-Ria3oJm9V14vfXV-g1iMHa7u7sl9Or4FlA,14938
|
|
17
18
|
geobox/mosaic.py,sha256=Ceh_kleRlZqBSDTTV27iwahG-TGsdpVzUyXcB3dbJIo,25128
|
|
18
19
|
geobox/plan.py,sha256=f7ciVE_VKM7onuzE3bGK63XxxrtfUsMv16oImyDgZ3c,13061
|
|
19
|
-
geobox/query.py,sha256=
|
|
20
|
-
geobox/raster.py,sha256=
|
|
20
|
+
geobox/query.py,sha256=ndppWvwpWdCE5tzU2rVtr6gglbDLvnPkWhvj-UMxhOY,25334
|
|
21
|
+
geobox/raster.py,sha256=MtuabSJCLDTbczjroupG39M02kkooy6oGmuovMDl1sw,50656
|
|
21
22
|
geobox/route.py,sha256=cKZTTHBHM8woWbhHIpCvrRX_doJcTkGktouee0z7oG0,2723
|
|
22
23
|
geobox/scene.py,sha256=iUkMxH4YqPk3vCIQq1uAZgQGWUvtujKBylUWcmUpQkM,12356
|
|
23
24
|
geobox/settings.py,sha256=ue6vZYYIirisYBwnuTsZnV7fG0jOQampX1xroC5lpdk,6856
|
|
24
|
-
geobox/task.py,sha256=
|
|
25
|
+
geobox/task.py,sha256=IdCpE6tFGUIHXieP69_09yFY3Mtp-1DbAv7fMlBSg68,14512
|
|
25
26
|
geobox/tile3d.py,sha256=nEFs2TuzJFC9k__rPlkWwL6s-WjIsyQZS5FEhmfsck0,12093
|
|
26
27
|
geobox/tileset.py,sha256=wk0vSSON0DHiO6NzaScZnmu7d424jFCgNk0kJLDAtA8,25041
|
|
27
28
|
geobox/usage.py,sha256=47nR-JDA3yfsK-o3eWSYA7FeDVJNPIIfvsRTGkfNv9A,9215
|
|
28
29
|
geobox/user.py,sha256=GFQTw8EwLcyf-AMatmejtrgnSHB6Qg-ctE5YrzYIMEQ,17509
|
|
29
30
|
geobox/utils.py,sha256=JmlRqDVIo0vBikzH1XakRrCrEIfLA7_eTJnBWBvGhJI,2243
|
|
30
|
-
geobox/vectorlayer.py,sha256=
|
|
31
|
+
geobox/vectorlayer.py,sha256=IXs5kLx1-viMYx8zzQ6ZDNE-ieXe1nncZsmBvcDU-oQ,63623
|
|
31
32
|
geobox/version.py,sha256=6IO8AHVTbS4z-cwaqqPt0o3ggwmskimKUoUoeFzx5UE,10560
|
|
32
|
-
geobox/view.py,sha256=
|
|
33
|
+
geobox/view.py,sha256=saYWWs3tY4ZScy2m5GrIqAQ_lwQ3GqCkHyOfHAGyQCo,42321
|
|
33
34
|
geobox/workflow.py,sha256=Gi4AJlsvo_SFY3Ptgp_3sg_f37eIZNL2whn2yMW8Dkg,12666
|
|
34
35
|
geobox/aio/__init__.py,sha256=EO8VP0d5JPPZH1o1CBdwSMkPZOpyGPK0v9UbIvf6g7w,1906
|
|
35
|
-
geobox/aio/
|
|
36
|
+
geobox/aio/analysis.py,sha256=9fV0MyZPLTzUl1vkGYJC5pzWnxKm4tlbPI_DoIIZgig,36362
|
|
37
|
+
geobox/aio/api.py,sha256=IFjAwUN9GTkXVi_hzrXXKHXzfrkrtlPWvKEYXXW0hBU,117614
|
|
36
38
|
geobox/aio/apikey.py,sha256=J_4XqTJ3PZUxsOqR1F-WIbpWzIihX32Y2sjPdSEUboY,9232
|
|
37
39
|
geobox/aio/attachment.py,sha256=EXBdtlb5aKlnm5GHWDfX67v0mFON5gDBtF13rknETYM,13644
|
|
38
40
|
geobox/aio/base.py,sha256=-B56CC7uMbb84DzT1YzytpOwalFRZ8mAtaVajcE4cNI,9189
|
|
@@ -47,22 +49,22 @@ geobox/aio/map.py,sha256=cOSCSVF3ERWXkMnneGLUryNZsXiScerLzmDw7K81uNE,40441
|
|
|
47
49
|
geobox/aio/model3d.py,sha256=Gg1fbfNILMeLjBwS6vxcPx-AJWdriIGKtkJ6b06GxsE,15959
|
|
48
50
|
geobox/aio/mosaic.py,sha256=wqXzrK9C-rZeMVamurqZj5Og6rSruvXBssnYfpWmt-g,27029
|
|
49
51
|
geobox/aio/plan.py,sha256=pUBfmd-AfzAn7ejv3x2mp3cYr5mM9nMMdO-YDh1JDVY,13690
|
|
50
|
-
geobox/aio/query.py,sha256=
|
|
51
|
-
geobox/aio/raster.py,sha256=
|
|
52
|
+
geobox/aio/query.py,sha256=oypo7QKPFUgGoZc5gNzy_s1JxaSGSO7xfmUMdEuL_vk,26838
|
|
53
|
+
geobox/aio/raster.py,sha256=wPCoTHQlLAWieOuJsZCTewFz8tFeDHLIzuA7BCDZyRg,53233
|
|
52
54
|
geobox/aio/route.py,sha256=YCTcAfaSFE429fpL4eIb2VrBEdBo6SmolPomVM1F66A,2854
|
|
53
55
|
geobox/aio/scene.py,sha256=cxQdFkFD-Z-ZWJyhrW_W53DyUVILmEQgJoFaG3KU_FI,13130
|
|
54
56
|
geobox/aio/settings.py,sha256=q1B2iZf0ekl21cByP5P9Z0ivWCDxw8UNi16NOXm76qA,7042
|
|
55
|
-
geobox/aio/task.py,sha256=
|
|
57
|
+
geobox/aio/task.py,sha256=svwE65xih9WGm1bwSFcgJ8R9UAQiH0KiqfYTctMpdQw,15336
|
|
56
58
|
geobox/aio/tile3d.py,sha256=QWYdmMQSlWqztflLTqFDqQaynkgRLoVZPF4NlwOMqDg,12935
|
|
57
59
|
geobox/aio/tileset.py,sha256=LUsCtafwFCYqG41vNNlbe3GyWXjJ1_UYV-4o7-w-Xk8,27379
|
|
58
|
-
geobox/aio/usage.py,sha256=
|
|
60
|
+
geobox/aio/usage.py,sha256=bcfeNyKk1vm67K1aRT2XMnHazG3Ue93adCv3QY-Riok,9776
|
|
59
61
|
geobox/aio/user.py,sha256=k3JCPQpwiIzJBP6xvKsPkueElW6e1i9a-odNAOIZB9U,18622
|
|
60
|
-
geobox/aio/vectorlayer.py,sha256=
|
|
62
|
+
geobox/aio/vectorlayer.py,sha256=agiKbt4M1dVauCcYBhPB_n9ZeVruNEXmv8OGr4OSMOk,67234
|
|
61
63
|
geobox/aio/version.py,sha256=HAKB9jHGZ0-EirNg9aNwYYPVFT3YOYQ0JNCxP7Nvk9g,11201
|
|
62
64
|
geobox/aio/view.py,sha256=peTf__JNMqdiTb6VQeuhj_RqljzcskbwwDaHhQ3Cf9w,45353
|
|
63
|
-
geobox/aio/workflow.py,sha256=
|
|
64
|
-
geobox-2.
|
|
65
|
-
geobox-2.
|
|
66
|
-
geobox-2.
|
|
67
|
-
geobox-2.
|
|
68
|
-
geobox-2.
|
|
65
|
+
geobox/aio/workflow.py,sha256=PVw4S8P9bvuKtFwcwYQIoVAeBAsO5bxiPb-nGj56ifU,13411
|
|
66
|
+
geobox-2.1.0.dist-info/licenses/LICENSE,sha256=AvFB7W94sJYKLDhBxLRshL3upexCOG8HQY_1JibB96w,1063
|
|
67
|
+
geobox-2.1.0.dist-info/METADATA,sha256=BdUHYhcJq7NirDrtJIDhEQBfLKKZzvrz88znrJHlF5w,2760
|
|
68
|
+
geobox-2.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
69
|
+
geobox-2.1.0.dist-info/top_level.txt,sha256=ppXH8Bu2mlB-pLQ6lsoWEm2Gr6wZx1uzkhetsYA5ins,7
|
|
70
|
+
geobox-2.1.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|