mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-17 00:04:02 -04:00
[processing] avoid division by zero (fix #15521)
This commit is contained in:
parent
6605a2274f
commit
898addfa33
@ -28,6 +28,7 @@ __revision__ = '$Format:%H$'
|
||||
|
||||
from qgis.core import Qgis, QgsFeatureRequest, QgsFeature, QgsGeometry, QgsWkbTypes
|
||||
from processing.core.GeoAlgorithm import GeoAlgorithm
|
||||
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
|
||||
from processing.core.parameters import ParameterVector
|
||||
from processing.core.parameters import ParameterNumber
|
||||
from processing.core.parameters import ParameterBoolean
|
||||
@ -73,7 +74,10 @@ class ConcaveHull(GeoAlgorithm):
|
||||
# Get max edge length from Delaunay triangles
|
||||
progress.setText(self.tr('Computing edges max length...'))
|
||||
features = delaunay_layer.getFeatures()
|
||||
counter = 50. / delaunay_layer.featureCount()
|
||||
if len(features) == 0:
|
||||
raise GeoAlgorithmExecutionException(self.tr('No Delaunay triangles created.'))
|
||||
|
||||
counter = 50. / len(features)
|
||||
lengths = []
|
||||
edges = {}
|
||||
for feat in features:
|
||||
|
Loading…
x
Reference in New Issue
Block a user