Skip to content

Commit 0553f7b

Browse files
committed
[processing] allow 2.5D geometries (fix #14929)
1 parent e926e2d commit 0553f7b

File tree

5 files changed

+0
-41
lines changed

5 files changed

+0
-41
lines changed

python/plugins/processing/algs/qgis/Clip.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@
4040

4141
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
4242

43-
GEOM_25D = [QGis.WKBPoint25D, QGis.WKBLineString25D, QGis.WKBPolygon25D,
44-
QGis.WKBMultiPoint25D, QGis.WKBMultiLineString25D,
45-
QGis.WKBMultiPolygon25D]
46-
4743

4844
class Clip(GeoAlgorithm):
4945

@@ -69,11 +65,6 @@ def processAlgorithm(self, progress):
6965
layerB = dataobjects.getObjectFromUri(
7066
self.getParameterValue(Clip.OVERLAY))
7167

72-
geomType = layerA.dataProvider().geometryType()
73-
if geomType in GEOM_25D:
74-
raise GeoAlgorithmExecutionException(
75-
self.tr('Input layer does not support 2.5D type geometry ({}).').format(QgsWKBTypes.displayString(geomType)))
76-
7768
writer = self.getOutputFromName(self.OUTPUT).getVectorWriter(
7869
layerA.pendingFields(),
7970
layerA.dataProvider().geometryType(),

python/plugins/processing/algs/qgis/Difference.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@
3939

4040
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
4141

42-
GEOM_25D = [QGis.WKBPoint25D, QGis.WKBLineString25D, QGis.WKBPolygon25D,
43-
QGis.WKBMultiPoint25D, QGis.WKBMultiLineString25D,
44-
QGis.WKBMultiPolygon25D]
45-
4642

4743
class Difference(GeoAlgorithm):
4844

@@ -69,10 +65,6 @@ def processAlgorithm(self, progress):
6965
self.getParameterValue(Difference.OVERLAY))
7066

7167
geomType = layerA.dataProvider().geometryType()
72-
if geomType in GEOM_25D:
73-
raise GeoAlgorithmExecutionException(
74-
self.tr('Input layer does not support 2.5D type geometry ({}).').format(QgsWKBTypes.displayString(geomType)))
75-
7668
writer = self.getOutputFromName(
7769
Difference.OUTPUT).getVectorWriter(layerA.pendingFields(),
7870
geomType,

python/plugins/processing/algs/qgis/Intersection.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@
4949
for const in value:
5050
wkbTypeGroups[const] = key
5151

52-
GEOM_25D = [QGis.WKBPoint25D, QGis.WKBLineString25D, QGis.WKBPolygon25D,
53-
QGis.WKBMultiPoint25D, QGis.WKBMultiLineString25D,
54-
QGis.WKBMultiPolygon25D]
55-
5652

5753
class Intersection(GeoAlgorithm):
5854

@@ -80,10 +76,6 @@ def processAlgorithm(self, progress):
8076
vproviderA = vlayerA.dataProvider()
8177

8278
geomType = vproviderA.geometryType()
83-
if geomType in GEOM_25D:
84-
raise GeoAlgorithmExecutionException(
85-
self.tr('Input layer does not support 2.5D type geometry ({}).').format(QgsWKBTypes.displayString(geomType)))
86-
8779
fields = vector.combineVectorFields(vlayerA, vlayerB)
8880
writer = self.getOutputFromName(self.OUTPUT).getVectorWriter(fields,
8981
geomType, vproviderA.crs())

python/plugins/processing/algs/qgis/SymmetricalDifference.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,6 @@
3939

4040
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
4141

42-
GEOM_25D = [QGis.WKBPoint25D, QGis.WKBLineString25D, QGis.WKBPolygon25D,
43-
QGis.WKBMultiPoint25D, QGis.WKBMultiLineString25D,
44-
QGis.WKBMultiPolygon25D]
45-
4642

4743
class SymmetricalDifference(GeoAlgorithm):
4844

@@ -73,10 +69,6 @@ def processAlgorithm(self, progress):
7369
providerB = layerB.dataProvider()
7470

7571
geomType = providerA.geometryType()
76-
if geomType in GEOM_25D:
77-
raise GeoAlgorithmExecutionException(
78-
self.tr('Input layer does not support 2.5D type geometry ({}).').format(QgsWKBTypes.displayString(geomType)))
79-
8072
fields = vector.combineVectorFields(layerA, layerB)
8173
writer = self.getOutputFromName(self.OUTPUT).getVectorWriter(
8274
fields, geomType, providerA.crs())

python/plugins/processing/algs/qgis/Union.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@
4949
for const in value:
5050
wkbTypeGroups[const] = key
5151

52-
GEOM_25D = [QGis.WKBPoint25D, QGis.WKBLineString25D, QGis.WKBPolygon25D,
53-
QGis.WKBMultiPoint25D, QGis.WKBMultiLineString25D,
54-
QGis.WKBMultiPolygon25D]
55-
5652

5753
class Union(GeoAlgorithm):
5854

@@ -79,10 +75,6 @@ def processAlgorithm(self, progress):
7975
vproviderA = vlayerA.dataProvider()
8076

8177
geomType = vproviderA.geometryType()
82-
if geomType in GEOM_25D:
83-
raise GeoAlgorithmExecutionException(
84-
self.tr('Input layer does not support 2.5D type geometry ({}).').format(QgsWKBTypes.displayString(geomType)))
85-
8678
fields = vector.combineVectorFields(vlayerA, vlayerB)
8779
writer = self.getOutputFromName(Union.OUTPUT).getVectorWriter(fields,
8880
geomType, vproviderA.crs())

0 commit comments

Comments
 (0)