Skip to content
Permalink
Browse files

Fix backport of "force multitype output on processing overlay ops"

  • Loading branch information
m-kuhn committed Oct 20, 2016
1 parent 2b8bf50 commit 1f5fb8097a711ff86bb0484f9204a6e53d423bc5
@@ -67,7 +67,7 @@ def processAlgorithm(self, progress):

writer = self.getOutputFromName(self.OUTPUT).getVectorWriter(
source_layer.fields(),
QgsWKBTypes.multiType(source_layer.wkbType()),
QgsWKBTypes.multiType(QGis.fromOldWkbType(source_layer.wkbType())),
source_layer.crs())

# first build up a list of clip geometries
@@ -68,7 +68,7 @@ def processAlgorithm(self, progress):
self.getParameterValue(Difference.OVERLAY))
ignoreInvalid = self.getParameterValue(Difference.IGNORE_INVALID)

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

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

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

0 comments on commit 1f5fb80

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