Skip to content

Commit

Permalink
exception for multipart layers
Browse files Browse the repository at this point in the history
  • Loading branch information
ghtmtt committed Jul 12, 2018
1 parent a4c0c2e commit 0835b20
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/plugins/processing/algs/qgis/RasterSampling.py
Expand Up @@ -137,6 +137,11 @@ def processAlgorithm(self, parameters, context, feedback):

for n, i in enumerate(source.getFeatures()):

if i.geometry().isMultipart():
raise QgsProcessingException(self.tr('''Impossible to sample data
of a Multipart layer. Please use the Multipart to single part
algoithm to transform the layer.'''))

attrs = i.attributes()

if sampled_rasters.bandCount() > 1:
Expand Down

0 comments on commit 0835b20

Please sign in to comment.