Skip to content
Permalink
Browse files

indentation fix

  • Loading branch information
ghtmtt committed Jul 10, 2018
1 parent d1cedbc commit b6cafe7ece24db9fc7562b1b91fb18e1ab7fb52f
Showing with 12 additions and 4 deletions.
  1. +12 −4 python/plugins/processing/algs/qgis/RasterSampling.py
@@ -115,7 +115,10 @@ def processAlgorithm(self, parameters, context, feedback):
# append field to vector as rasterName_bandCount
for i in sampled_rasters:
for b in range(i.bandCount()):
raster_fields.append(QgsField(i.name() + str('_{}'.format(b+1)), QVariant.Double))
raster_fields.append(QgsField(
i.name() + str('_{}'.format(b+1)),
QVariant.Double)
)


# combine all the vector fields
@@ -147,11 +150,16 @@ def processAlgorithm(self, parameters, context, feedback):
if rr.bandCount() >1:

for b in range(rr.bandCount()):
attrs.append(rr.dataProvider().identify(i.geometry().asPoint(),
QgsRaster.IdentifyFormatValue).results()[b+1])
attrs.append(
rr.dataProvider().identify(i.geometry().asPoint(),
QgsRaster.IdentifyFormatValue).results()[b+1]
)


attrs.append(rr.dataProvider().identify(i.geometry().asPoint(), QgsRaster.IdentifyFormatValue).results()[1])
attrs.append(
rr.dataProvider().identify(i.geometry().asPoint(),
QgsRaster.IdentifyFormatValue).results()[1]
)


i.setAttributes(attrs)

0 comments on commit b6cafe7

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