geobox 2.1.0__py3-none-any.whl → 2.2.1__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 (70) hide show
  1. geobox/__init__.py +61 -63
  2. geobox/aio/__init__.py +61 -63
  3. geobox/aio/api.py +491 -574
  4. geobox/aio/apikey.py +263 -263
  5. geobox/aio/attachment.py +341 -339
  6. geobox/aio/base.py +261 -262
  7. geobox/aio/basemap.py +196 -196
  8. geobox/aio/dashboard.py +340 -342
  9. geobox/aio/feature.py +35 -35
  10. geobox/aio/field.py +315 -321
  11. geobox/aio/file.py +72 -72
  12. geobox/aio/layout.py +340 -341
  13. geobox/aio/log.py +23 -23
  14. geobox/aio/map.py +1033 -1034
  15. geobox/aio/model3d.py +415 -415
  16. geobox/aio/mosaic.py +696 -696
  17. geobox/aio/plan.py +314 -314
  18. geobox/aio/query.py +693 -693
  19. geobox/aio/raster.py +88 -454
  20. geobox/aio/{analysis.py → raster_analysis.py} +153 -170
  21. geobox/aio/route.py +4 -4
  22. geobox/aio/scene.py +340 -342
  23. geobox/aio/settings.py +18 -18
  24. geobox/aio/task.py +404 -402
  25. geobox/aio/tile3d.py +337 -339
  26. geobox/aio/tileset.py +102 -103
  27. geobox/aio/usage.py +52 -51
  28. geobox/aio/user.py +506 -507
  29. geobox/aio/vector_tool.py +1968 -0
  30. geobox/aio/vectorlayer.py +316 -414
  31. geobox/aio/version.py +272 -273
  32. geobox/aio/view.py +1019 -983
  33. geobox/aio/workflow.py +340 -341
  34. geobox/api.py +14 -98
  35. geobox/apikey.py +262 -262
  36. geobox/attachment.py +336 -337
  37. geobox/base.py +384 -384
  38. geobox/basemap.py +194 -194
  39. geobox/dashboard.py +339 -341
  40. geobox/enums.py +31 -1
  41. geobox/feature.py +31 -10
  42. geobox/field.py +320 -320
  43. geobox/file.py +4 -4
  44. geobox/layout.py +339 -340
  45. geobox/log.py +4 -4
  46. geobox/map.py +1031 -1032
  47. geobox/model3d.py +410 -410
  48. geobox/mosaic.py +696 -696
  49. geobox/plan.py +313 -313
  50. geobox/query.py +691 -691
  51. geobox/raster.py +5 -368
  52. geobox/{analysis.py → raster_analysis.py} +108 -128
  53. geobox/scene.py +341 -342
  54. geobox/settings.py +194 -194
  55. geobox/task.py +399 -400
  56. geobox/tile3d.py +337 -338
  57. geobox/tileset.py +4 -4
  58. geobox/usage.py +3 -3
  59. geobox/user.py +503 -503
  60. geobox/vector_tool.py +1968 -0
  61. geobox/vectorlayer.py +5 -110
  62. geobox/version.py +272 -272
  63. geobox/view.py +981 -981
  64. geobox/workflow.py +338 -339
  65. {geobox-2.1.0.dist-info → geobox-2.2.1.dist-info}/METADATA +15 -1
  66. geobox-2.2.1.dist-info/RECORD +72 -0
  67. geobox-2.1.0.dist-info/RECORD +0 -70
  68. {geobox-2.1.0.dist-info → geobox-2.2.1.dist-info}/WHEEL +0 -0
  69. {geobox-2.1.0.dist-info → geobox-2.2.1.dist-info}/licenses/LICENSE +0 -0
  70. {geobox-2.1.0.dist-info → geobox-2.2.1.dist-info}/top_level.txt +0 -0
geobox/vectorlayer.py CHANGED
@@ -18,7 +18,7 @@ if TYPE_CHECKING:
18
18
  from .file import File
19
19
  from .attachment import Attachment
20
20
  from .aio import AsyncGeoboxClient
21
- from .aio.vectorlayer import VectorLayer as AsyncVectorLayer
21
+ from .aio.vectorlayer import AsyncVectorLayer
22
22
 
23
23
 
24
24
  class VectorLayer(Base):
@@ -333,7 +333,7 @@ class VectorLayer(Base):
333
333
  >>> layer = VectorLayer.get_vector(api=client, uuid="12345678-1234-5678-1234-567812345678")
334
334
  >>> layer.delete()
335
335
  """
336
- super().delete(endpoint=self.endpoint)
336
+ super()._delete(endpoint=self.endpoint)
337
337
 
338
338
 
339
339
  def make_permanent(self) -> None:
@@ -1347,7 +1347,7 @@ class VectorLayer(Base):
1347
1347
  async_client (AsyncGeoboxClient): The async version of the GeoboxClient instance for making requests.
1348
1348
 
1349
1349
  Returns:
1350
- geobox.aio.vectorlayer.VectorLayer: the async instance of the vector layer.
1350
+ AsyncVectorLayer: the async instance of the vector layer.
1351
1351
 
1352
1352
  Example:
1353
1353
  >>> from geobox import Geoboxclient
@@ -1358,111 +1358,6 @@ class VectorLayer(Base):
1358
1358
  >>> async with AsyncGeoboxClient() as async_client:
1359
1359
  >>> async_layer = layer.to_async(async_client)
1360
1360
  """
1361
- from .aio.vectorlayer import VectorLayer as AsyncVectorLayer
1361
+ from .aio.vectorlayer import AsyncVectorLayer
1362
1362
 
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)
1363
+ return AsyncVectorLayer(api=async_client, uuid=self.uuid, layer_type=self.layer_type, data=self.data)