Skip to content

Threshold too high! Using maximum threshold -23.0 db #93

@falahfakhri-Iraq

Description

@falahfakhri-Iraq

Hi,
I did many attempts of the parameters altering, however, I got the following error,

Threshold too high! Using maximum threshold -23.0 db
Traceback (most recent call last):
File "", line 1, in
File "C:\anaconda\envs\SAR\lib\site-packages\asf_tools\water_map.py", line 265, in make_water_map
write_cog(str(out_raster).replace('.tif', f'_{pol}_initial.tif'), water_map, transform=out_transform,
File "C:\anaconda\envs\SAR\lib\site-packages\asf_tools\composite.py", line 208, in write_cog
temp_geotiff = driver.Create(temp_file.name, data.shape[1], data.shape[0], 1, dtype)
File "C:\anaconda\envs\SAR\lib\site-packages\osgeo\gdal.py", line 1997, in Create
return _gdal.Driver_Create(self, *args, **kwargs)
RuntimeError: Attempt to create new tiff file `C:\Users\FALAH FAKHRI\AppData\Local\Temp\tmp21abpre2' failed: Permission denied

following is the script,

import asf_tools
from asf_tools.water_map import make_water_map

dirpath = 'D:/Australia_Project/image_data/WATER_MAP_TEST/'

vh = dirpath + 'VH/S1A_IW_GRDH_1SDV_20210324T191554_045F93_21DF_VH_NR_Orb_TC_res.tif'

vv = dirpath + 'VV/S1A_IW_GRDH_1SDV_20210324T191554_045F93_21DF_VV_NR_Orb_TC_res.tif'

out_raster = dirpath + 'water_map_20210324T191554_045F93_21DF.tif'

make_water_map(
out_raster,
vv,
vh,
hand_raster=None,
tile_shape=(200, 200), # also (100, 100) has been tried out.
max_vv_threshold=9.7,
max_vh_threshold=-23.0,
hand_threshold=15.0,
hand_fraction=0.8,
membership_threshold=0.45
)

It's worth mentioning that I got a result, despite the error!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions