-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Threshold too high! Using maximum threshold -23.0 db #93
Comments
@falahfakhri-Iraq the The actual error you're seeing is due to a file permission error:
|
Dear Joseph, Is it possible to use Otsu's method for threshold calculation related to intensity our case in here? After run Otus's method, I got the threshold as below, and I also tired to solve the error related to tempfile, however I got an error as well, import tempfile make_water_map( Thanks a lot for you time, |
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!
The text was updated successfully, but these errors were encountered: