diff --git a/buildvector.py b/buildvector.py index 66d3946e..66463e43 100644 --- a/buildvector.py +++ b/buildvector.py @@ -182,13 +182,18 @@ def features(self, request=None): # geometry geom = f.geometry() if geom is None: - logMessage("null geometry skipped") + logMessage("Null geometry skipped: " + self.name) continue - # coordinate transformation - layer crs to project crs geom = QgsGeometry(geom) + + if not geom.isGeosValid(): + logMessage("Invalid geometry skipped: " + self.name) + continue + + # coordinate transformation - layer crs to project crs if geom.transform(self.transform) != 0: - logMessage("Failed to transform geometry") + logMessage("Failed to transform geometry: " + self.name) continue if rotation and self.onlyIntersecting: