Skip to content

Commit

Permalink
Ensure that geometry is ok when the sampling file has changed
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierCLL committed Sep 21, 2024
1 parent db47707 commit f31ab5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions core/response_design.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,8 @@ def get_points_from_shapefile(self):
points = []
for enum_id, qgs_feature in enumerate(self.sampling_layer.getFeatures(), start=1):
geom = qgs_feature.geometry()
if not geom.isGeosValid():
continue
# get the id from shape file using column name "id" else use auto-enumeration
attr_id = self.sampling_layer.fields().lookupField('id')
if attr_id != -1:
Expand Down

0 comments on commit f31ab5e

Please sign in to comment.