mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
[processing] ensure that output temporary directory exists (fix #21701)
This commit is contained in:
parent
8c21a9e848
commit
c706cdeb06
@ -95,6 +95,8 @@ class HypsometricCurves(QgisAlgorithm):
|
||||
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 @@ class HypsometricCurves(QgisAlgorithm):
|
||||
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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user