Skip to content

Commit

Permalink
indentation fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ghtmtt committed Jul 10, 2018
1 parent d1cedbc commit b6cafe7
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions python/plugins/processing/algs/qgis/RasterSampling.py
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ def processAlgorithm(self, parameters, context, feedback):
# append field to vector as rasterName_bandCount # append field to vector as rasterName_bandCount
for i in sampled_rasters: for i in sampled_rasters:
for b in range(i.bandCount()): 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 # combine all the vector fields
Expand Down Expand Up @@ -147,11 +150,16 @@ def processAlgorithm(self, parameters, context, feedback):
if rr.bandCount() >1: if rr.bandCount() >1:


for b in range(rr.bandCount()): for b in range(rr.bandCount()):
attrs.append(rr.dataProvider().identify(i.geometry().asPoint(), attrs.append(
QgsRaster.IdentifyFormatValue).results()[b+1]) 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) i.setAttributes(attrs)
Expand Down

0 comments on commit b6cafe7

Please sign in to comment.