Skip to content

Commit

Permalink
Fix geometry type for "Convert geometry type" algorithm
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and nyalldawson committed Feb 20, 2020
1 parent 15d9249 commit f867d87
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/plugins/processing/algs/qgis/GeometryConvert.py
Expand Up @@ -214,7 +214,7 @@ def convertToPolygon(self, geom):
p.setExteriorRing(linestring)
return [QgsGeometry(p)]
elif QgsWkbTypes.geometryType(geom.wkbType()) == QgsWkbTypes.LineGeometry:
if QgsWkbTypes.isMultiType(geom):
if QgsWkbTypes.isMultiType(geom.wkbType()):
parts = []
for i in range(geom.constGet().numGeometries()):
p = QgsPolygon()
Expand All @@ -232,7 +232,7 @@ def convertToPolygon(self, geom):
return [QgsGeometry(p)]
else:
#polygon
if QgsWkbTypes.isMultiType(geom):
if QgsWkbTypes.isMultiType(geom.wkbType()):
return geom.asGeometryCollection()
else:
return [geom]

0 comments on commit f867d87

Please sign in to comment.