Skip to content
Permalink
Browse files

[processing] correctly handle tiny polygons smaller than raster cell

size in Hypsometric curves algorithm (fix #12278)
  • Loading branch information
alexbruy committed Feb 26, 2015
1 parent 3a187be commit a41094d42ebce76240aa17c71df5f9dc0c1b040a
Showing with 6 additions and 0 deletions.
  1. +6 −0 python/plugins/processing/algs/qgis/HypsometricCurves.py
@@ -132,6 +132,12 @@ def processAlgorithm(self, progress):
srcOffset = (startColumn, startRow, width, height)
srcArray = rasterBand.ReadAsArray(*srcOffset)

if srcOffset[2] == 0 or srcOffset[3] == 0:
progress.setInfo(
self.tr('Feature %d does is smaller than raster '
'cell size' % f.id()))
continue

newGeoTransform = (
geoTransform[0] + srcOffset[0] * geoTransform[1],
geoTransform[1],

0 comments on commit a41094d

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