Skip to content
Permalink
Browse files

[processing] ensure that output temporary directory exists (fix #21701)

  • Loading branch information
alexbruy committed Apr 17, 2019
1 parent dbdd6b5 commit 7976e6061f9bcba659efbcdf774f85fd52e57197
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 7976e60

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