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 8c21a9e commit c706cdeb06eab3e18a2c54e84b5f452f26892038
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.parameterAsBoolean(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 c706cde

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