Skip to content

Commit

Permalink
[processing][gdal] Clip Vector By Mask Layer requires both
Browse files Browse the repository at this point in the history
layers to have the same CRS

(cherry-picked from 3643219)
  • Loading branch information
nyalldawson committed May 3, 2018
1 parent da2c4be commit bc9d6f3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions python/plugins/processing/algs/gdal/ClipVectorByMask.py
Expand Up @@ -26,6 +26,7 @@
__revision__ = '$Format:%H$' __revision__ = '$Format:%H$'


from qgis.core import (QgsProcessing, from qgis.core import (QgsProcessing,
QgsProcessingAlgorithm,
QgsProcessingParameterDefinition, QgsProcessingParameterDefinition,
QgsProcessingParameterString, QgsProcessingParameterString,
QgsProcessingParameterFeatureSource, QgsProcessingParameterFeatureSource,
Expand All @@ -44,6 +45,9 @@ class ClipVectorByMask(GdalAlgorithm):
def __init__(self): def __init__(self):
super().__init__() super().__init__()


def flags(self):
return QgsProcessingAlgorithm.FlagSupportsBatch | QgsProcessingAlgorithm.FlagRequiresMatchingCrs # cannot cancel!

def initAlgorithm(self, config=None): def initAlgorithm(self, config=None):
self.addParameter(QgsProcessingParameterFeatureSource(self.INPUT, self.addParameter(QgsProcessingParameterFeatureSource(self.INPUT,
self.tr('Input layer'))) self.tr('Input layer')))
Expand Down

0 comments on commit bc9d6f3

Please sign in to comment.