Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions pyroSAR/auxdata.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,7 @@ def dem_create(src, dst, t_srs=None, tr=None, threads=None,
elif isinstance(threads, int):
if threads == 1:
multithread = False
gdal.SetConfigOption('GDAL_NUM_THREADS', str(threads))
elif threads > 1:
multithread = True
gdal.SetConfigOption('GDAL_NUM_THREADS', str(threads))
Expand All @@ -342,6 +343,11 @@ def dem_create(src, dst, t_srs=None, tr=None, threads=None,
else:
raise TypeError("'threads' must be of type int, str or None. Is: {}".format(type(threads)))

if threads not in [1, None]:
log.info('Multithreading of computations is temporarily disabled. '
'See https://github.com/OSGeo/gdal/issues/13464.')
gdal.SetConfigOption('GDAL_NUM_THREADS', '1')

gdalwarp_args = {'format': 'GTiff', 'multithread': multithread,
'srcNodata': nodata, 'dstNodata': nodata,
'srcSRS': 'EPSG:{}'.format(epsg_in),
Expand Down
Loading