Skip to content
Permalink
Browse files

Merge pull request #9838 from qgis/backport-9836-to-release-3_6

[Backport release-3_6] [processing] ensure that output temporary directory exists (fix #21701)
  • Loading branch information
alexbruy committed Apr 21, 2019
2 parents 656500e + 48f78d2 commit 17823844ea4a5941ac8d211e9ccd38abf23ee76e
Showing with 3 additions and 1 deletion.
  1. +3 −1 python/plugins/processing/algs/qgis/HypsometricCurves.py
@@ -95,6 +95,8 @@ def processAlgorithm(self, parameters, context, feedback):
percentage = self.parameterAsBool(parameters, self.USE_PERCENTAGE, context)

outputPath = self.parameterAsString(parameters, self.OUTPUT_DIRECTORY, context)
if not os.path.exists(outputPath):
os.makedirs(outputPath)

rasterDS = gdal.Open(rasterPath, gdal.GA_ReadOnly)
geoTransform = rasterDS.GetGeoTransform()
@@ -138,7 +140,7 @@ def processAlgorithm(self, parameters, context, feedback):
continue

fName = os.path.join(
outputPath, 'hystogram_%s_%s.csv' % (source.sourceName(), f.id()))
outputPath, 'histogram_{}_{}.csv'.format(source.sourceName(), f.id()))

ogrGeom = ogr.CreateGeometryFromWkt(intersectedGeom.asWkt())
bbox = intersectedGeom.boundingBox()

0 comments on commit 1782384

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