Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Handle geos errors
  • Loading branch information
m-kuhn committed Jul 16, 2017
1 parent 102188a commit 261391d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions python/plugins/processing/algs/qgis/PointOnSurface.py
Expand Up @@ -82,6 +82,9 @@ def processAlgorithm(self, parameters, context, feedback):
input_geometry = input_feature.geometry()
if input_geometry:
output_geometry = input_geometry.pointOnSurface()
if not output_geometry:
raise QgsProcessingException(self.tr('Error calculating point on surface. Check the message log for GEOS errors.'))

output_feature.setGeometry(output_geometry)

sink.addFeature(output_feature, QgsFeatureSink.FastInsert)
Expand Down

0 comments on commit 261391d

Please sign in to comment.