Skip to content

Commit 1271ec7

Browse files
committedJun 13, 2016
[processing] allow 2.5D geometries (fix #14929)
(cherry picked from commit 0553f7b) Conflicts: python/plugins/processing/algs/qgis/Clip.py python/plugins/processing/algs/qgis/Difference.py python/plugins/processing/algs/qgis/Intersection.py python/plugins/processing/algs/qgis/SymmetricalDifference.py python/plugins/processing/algs/qgis/Union.py
1 parent f6aad8b commit 1271ec7

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
@@ -34,10 +34,6 @@
3434
from processing.core.outputs import OutputVector
3535
from processing.tools import dataobjects, vector
3636

37-
GEOM_25D = [QGis.WKBPoint25D, QGis.WKBLineString25D, QGis.WKBPolygon25D,
38-
QGis.WKBMultiPoint25D, QGis.WKBMultiLineString25D,
39-
QGis.WKBMultiPolygon25D]
40-
4137

4238
class Clip(GeoAlgorithm):
4339

@@ -60,11 +56,6 @@ def processAlgorithm(self, progress):
6056
layerB = dataobjects.getObjectFromUri(
6157
self.getParameterValue(Clip.OVERLAY))
6258

63-
geomType = layerA.dataProvider().geometryType()
64-
if geomType in GEOM_25D:
65-
raise GeoAlgorithmExecutionException(
66-
self.tr('Input layer has unsupported geometry type {}').format(geomType))
67-
6859
writer = self.getOutputFromName(self.OUTPUT).getVectorWriter(
6960
layerA.pendingFields(),
7061
layerA.dataProvider().geometryType(),

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
from processing.core.outputs import OutputVector
3434
from processing.tools import dataobjects, vector
3535

36-
GEOM_25D = [QGis.WKBPoint25D, QGis.WKBLineString25D, QGis.WKBPolygon25D,
37-
QGis.WKBMultiPoint25D, QGis.WKBMultiLineString25D,
38-
QGis.WKBMultiPolygon25D]
39-
4036

4137
class Difference(GeoAlgorithm):
4238

@@ -65,10 +61,6 @@ def processAlgorithm(self, progress):
6561
self.getParameterValue(Difference.OVERLAY))
6662

6763
geomType = layerA.dataProvider().geometryType()
68-
if geomType in GEOM_25D:
69-
raise GeoAlgorithmExecutionException(
70-
self.tr('Input layer has unsupported geometry type {}').format(geomType))
71-
7264
writer = self.getOutputFromName(
7365
Difference.OUTPUT).getVectorWriter(layerA.pendingFields(),
7466
geomType,

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@
4343
for const in value:
4444
wkbTypeGroups[const] = key
4545

46-
GEOM_25D = [QGis.WKBPoint25D, QGis.WKBLineString25D, QGis.WKBPolygon25D,
47-
QGis.WKBMultiPoint25D, QGis.WKBMultiLineString25D,
48-
QGis.WKBMultiPolygon25D]
49-
5046

5147
class Intersection(GeoAlgorithm):
5248

@@ -71,10 +67,6 @@ def processAlgorithm(self, progress):
7167
vproviderA = vlayerA.dataProvider()
7268

7369
geomType = vproviderA.geometryType()
74-
if geomType in GEOM_25D:
75-
raise GeoAlgorithmExecutionException(
76-
self.tr('Input layer has unsupported geometry type {}').format(geomType))
77-
7870
fields = vector.combineVectorFields(vlayerA, vlayerB)
7971
writer = self.getOutputFromName(self.OUTPUT).getVectorWriter(fields,
8072
geomType, vproviderA.crs())

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@
3333
from processing.core.outputs import OutputVector
3434
from processing.tools import dataobjects, vector
3535

36-
GEOM_25D = [QGis.WKBPoint25D, QGis.WKBLineString25D, QGis.WKBPolygon25D,
37-
QGis.WKBMultiPoint25D, QGis.WKBMultiLineString25D,
38-
QGis.WKBMultiPolygon25D]
39-
4036

4137
class SymmetricalDifference(GeoAlgorithm):
4238

@@ -64,10 +60,6 @@ def processAlgorithm(self, progress):
6460
providerB = layerB.dataProvider()
6561

6662
geomType = providerA.geometryType()
67-
if geomType in GEOM_25D:
68-
raise GeoAlgorithmExecutionException(
69-
self.tr('Input layer has unsupported geometry type {}').format(geomType))
70-
7163
fields = vector.combineVectorFields(layerA, layerB)
7264
writer = self.getOutputFromName(self.OUTPUT).getVectorWriter(
7365
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
@@ -42,10 +42,6 @@
4242
for const in value:
4343
wkbTypeGroups[const] = key
4444

45-
GEOM_25D = [QGis.WKBPoint25D, QGis.WKBLineString25D, QGis.WKBPolygon25D,
46-
QGis.WKBMultiPoint25D, QGis.WKBMultiLineString25D,
47-
QGis.WKBMultiPolygon25D]
48-
4945

5046
class Union(GeoAlgorithm):
5147

@@ -69,10 +65,6 @@ def processAlgorithm(self, progress):
6965
vproviderA = vlayerA.dataProvider()
7066

7167
geomType = vproviderA.geometryType()
72-
if geomType in GEOM_25D:
73-
raise GeoAlgorithmExecutionException(
74-
self.tr('Input layer has unsupported geometry type {}').format(geomType))
75-
7668
fields = vector.combineVectorFields(vlayerA, vlayerB)
7769
writer = self.getOutputFromName(Union.OUTPUT).getVectorWriter(fields,
7870
geomType, vproviderA.crs())

0 commit comments

Comments
 (0)
Please sign in to comment.