API Reference
vector_utilities
VectorDataset(path)
Source code in apb_spatial_computer_vision/vector_utilities.py
82 83 84 85 86 87 88 89 |
|
regularize_circles_file(file, output=None, threshold=0.01, file_gpkg_layer=None)
Recovers a circular geometry as
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file
|
_type_
|
description |
required |
output
|
str
|
description. Defaults to None. |
None
|
threshold
|
float
|
description. Defaults to 0.01. |
0.01
|
file_gpkg_layer
|
_type_
|
description. Defaults to None. |
None
|
Raises:
Type | Description |
---|---|
Exception
|
description |
Exception
|
description |
Returns:
Name | Type | Description |
---|---|---|
_type_ |
description |
Source code in apb_spatial_computer_vision/vector_utilities.py
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
|
regress_circle(polygon, threshold=0.001)
Regresses approximately circular geometries into the least-squares best fit circle using Levenberg-Marquardt algorithm (MINIPACK)
Parameters:
Name | Type | Description | Default |
---|---|---|---|
polygon
|
Polygon
|
Polygon to be regressed |
required |
threshold
|
float
|
description. Defaults to 0.001. |
0.001
|
Returns:
Type | Description |
---|---|
shapely.Polygon: Polygon with an edge length equal to the threshold and a circular shape based on the least squares-regressed equation. |
Source code in apb_spatial_computer_vision/vector_utilities.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 |
|