Skip to content
Permalink
Browse files

Backport [processing] ensure that outputs of vector overlay operation…

…s are multiparts (#3622)
  • Loading branch information
m-kuhn committed Oct 20, 2016
1 parent 24f3cc5 commit deb3dc7107982f7e353281f7198b8bf52a5c8a05
@@ -56,10 +56,9 @@ def processAlgorithm(self, progress):
layerB = dataobjects.getObjectFromUri(
self.getParameterValue(Clip.OVERLAY))

writer = self.getOutputFromName(self.OUTPUT).getVectorWriter(
layerA.pendingFields(),
layerA.dataProvider().geometryType(),
layerA.dataProvider().crs())
geomType = QGis.multiType(layerA.wkbType())
fields = layerA.pendingFields()
writer = self.getOutputFromName(self.OUTPUT).getVectorWriter(fields, geomType, layerA.crs())

inFeatA = QgsFeature()
inFeatB = QgsFeature()
@@ -64,7 +64,7 @@ def processAlgorithm(self, progress):
self.getParameterValue(Difference.OVERLAY))
ignoreInvalid = self.getParameterValue(Difference.IGNORE_INVALID)

geomType = layerA.wkbType()
geomType = QGis.multiType(layerA.wkbType())
writer = self.getOutputFromName(
Difference.OUTPUT).getVectorWriter(layerA.pendingFields(),
geomType,
@@ -65,7 +65,7 @@ def processAlgorithm(self, progress):
vlayerB = dataobjects.getObjectFromUri(
self.getParameterValue(self.INPUT2))

geomType = vlayerA.wkbType()
geomType = QGis.multiType(vlayerA.wkbType())
fields = vector.combineVectorFields(vlayerA, vlayerB)
writer = self.getOutputFromName(self.OUTPUT).getVectorWriter(fields,
geomType, vlayerA.crs())
@@ -56,7 +56,7 @@ def processAlgorithm(self, progress):
layerB = dataobjects.getObjectFromUri(
self.getParameterValue(self.OVERLAY))

geomType = layerA.wkbType()
geomType = QGis.multiType(layerA.wkbType())
fields = vector.combineVectorFields(layerA, layerB)
writer = self.getOutputFromName(self.OUTPUT).getVectorWriter(
fields, geomType, layerA.crs())

0 comments on commit deb3dc7

Please sign in to comment.
You can’t perform that action at this time.