OFFICIAL
Hello
OS = Win 10
GRASS GIS Version 8.3.0 64 Bit
I am attempting to create a stream classification and have tried the two
approaches below.
Is there something wrong with my approach?
Try 1
gs.run_command('r.fill.dir', input=input_raster, output='fill',
direction='flowdir_fill', overwrite=True)
gs.run_command('r.watershed', flags='sa', elevation='fill', threshold=500000,
basin='raster_basin', accumulation='flowacc', stream='stream_raster_watershed',
overwrite=True)
gs.run_command('r.stream.order', stream_rast='stream_raster_watershed',
direction='flowdir_fill', elevation=input_raster, accumulation='flowacc',
stream_vect='stream_vect', strahler='strahler', overwrite=True)
Try 2
gs.run_command('r.fill.dir', input=input_raster, output='fill',
direction='flowdir_fill', overwrite=True)
gs.run_command('r.stream.extract', elevation=input_raster,
threshold=stream_threshold, stream_raster='stream_raster',
stream_vector='stream_vector', direction='flowdir_extract', overwrite=True)
gs.run_command('r.stream.order', stream_rast='stream_raster_watershed',
direction='flowdir_extract', elevation=input_raster, accumulation='flowacc',
stream_vect='stream_vect', strahler='strahler', overwrite=True)
The GRASS GIS system returns the following error message to me;
Traceback (most recent call last):
File
"F:\grassdata\hydro\PERMANENT\.tmp\unknown\4728.20.py", line
255, in <module>
main()
File
"F:\grassdata\hydro\PERMANENT\.tmp\unknown\4728.20.py", line
217, in main
gs.run_command('r.stream.order',
File "C:\Program Files\GRASS GIS
8.3\etc\python\grass\script\core.py", line 466, in
run_command
return handle_errors(returncode, result=None, args=args,
kwargs=kwargs)
File "C:\Program Files\GRASS GIS
8.3\etc\python\grass\script\core.py", line 345, in
handle_errors
raise CalledModuleError(module=module, code=code,
returncode=returncode)
grass.exceptions.CalledModuleError: Module run
`r.stream.order --o stream_rast=stream_raster_watershed
direction=flowdir_extract elevation=dtm-002-004
accumulation=flowacc stream_vect=stream_vect
strahler=strahler` ended with an error.
The subprocess ended with a non-zero return code:
3221225781. See errors above the traceback or in the error
output.
Regards
Ben Davies
________________________________
This message is confidential and is intended for the recipient named above. If
you are not the intended recipient, you must not disclose, use or copy the
message or any part of it. If you received this message in error, please notify
the sender immediately by replying to this message, then delete it from your
system.
_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user