[GRASS-user] r.basin not running completely

Hi, I am a new GRASS GIS User (using GRASS GIS 7.6.1) trying to get the
morphometric parameters of a watershed(Bhadra river basin, India).
Steps followed:
1) Cropped and set the DEM file in UTM projection.
2) Created a new location and used the georeferenced DEM file to set the
projection of GRASS Session.
3) Ran the following lines of code:

  g.region rast=elevation@PERMANENT -ap

  r.watershed -a elevation=elevation@PERMANENT accumulation=accum

  r.stream.extract elevation=elevation@PERMANENT accumulation=accum
threshold=1000
  stream_rast=stream_network stream_vect=streams --overwrite
  #(overwrite with different threshold until clear network)

  #Find the coordinates of the outlet from network and input in r.basin fn

  r.basin map=elevation@PERMANENT prefix=out
coordinates=572957.585125,1547823.44718
  threshold=20 dir=tmp/my_basin

The function stops running with the following error:

  ERROR: option <output>: <tmp/my_basin\out_elevation_outlet_coors.txt>
exists. To overwrite, use the
  --overwrite flag

  ------------------------------

  An ERROR occurred running r.basin
  Please check for error messages above or try with another pairs of outlet
coordinates
  Removing region definition <original>

The details of the input DEM raster is:
+----------------------------------------------------------------------------+
| Map: elevation@PERMANENT Date: Sat Apr 25 11:48:17 2020
|
| Mapset: PERMANENT Login of Creator: Jomal Jochan
|
| Location: Test_run_check
|
| DataBase: D:\STUDIES\sem8\Watershed Project\grassdata
|
| Title: elevation
|
| Timestamp: none
|

|----------------------------------------------------------------------------|
|
|
| Type of Map: raster Number of Categories: 0
|
| Data Type: CELL
|
| Rows: 1755
|
| Columns: 1785
|
| Total Cells: 3132675
|
| Projection: UTM (zone 43)
|
| N: 1548050.1657 S: 1495414.5575 Res: 29.99179954
|
| E: 605402.3491 W: 551850.8938 Res: 30.00081529
|
| Range of data: min = 552 max = 1737
|
|
|
| Data Description:
|
| generated by r.in.gdal
|
|
|
| Comments:
|
| r.in.gdal -e input="D:\STUDIES\sem8\Watershed Project\Bhadra_sample_\
|
| files\Input DEM\elevation.tif" output="elevation" memory=300 offset=\
|
| 0 num_digits=0
|
|
|

+----------------------------------------------------------------------------+
(Sat Apr 25 12:14:49 2020) Command finished (0 sec)

The output of the first line of code is given for your reference:

  g.region rast=elevation@PERMANENT -ap
  projection: 1 (UTM)
  zone: 43
  datum: wgs84
  ellipsoid: wgs84
  north: 1548050.1657
  south: 1495414.5575
  west: 551850.8938
  east: 605402.3491
  nsres: 29.99179954
  ewres: 30.00081529
  rows: 1755
  cols: 1785
  cells: 3132675

Any help is greatly appreciated! Thanks in advance!

--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html

cc list

···

Margherita Di Leo

Hi,
Thank you for your interest and time!

I had created a whole new location and ran the code only once. And it is
still showing the same. Moreover, the file in question is nowhere to be
found.

Is there any other possibility?

margherita wrote

cc list

On Sat, Apr 25, 2020 at 9:11 AM Margherita Di Leo &lt;

diregola@

&gt;
wrote:

Hi,

On Sat, Apr 25, 2020 at 8:49 AM jomaljochan &lt;

jochanjomal1998@

&gt;

wrote:

Hi, I am a new GRASS GIS User (using GRASS GIS 7.6.1) trying to get the
morphometric parameters of a watershed(Bhadra river basin, India).
Steps followed:
1) Cropped and set the DEM file in UTM projection.
2) Created a new location and used the georeferenced DEM file to set the
projection of GRASS Session.
3) Ran the following lines of code:

  g.region rast=elevation@PERMANENT -ap

  r.watershed -a elevation=elevation@PERMANENT accumulation=accum

  r.stream.extract elevation=elevation@PERMANENT accumulation=accum
threshold=1000
  stream_rast=stream_network stream_vect=streams --overwrite
  #(overwrite with different threshold until clear network)

  #Find the coordinates of the outlet from network and input in r.basin
fn

  r.basin map=elevation@PERMANENT prefix=out
coordinates=572957.585125,1547823.44718
  threshold=20 dir=tmp/my_basin

The function stops running with the following error:

  ERROR: option

<output>
: &lt;tmp/my_basin\out_elevation_outlet_coors.txt&gt;

exists. To overwrite, use the
  --overwrite flag

  ------------------------------

  An ERROR occurred running r.basin
  Please check for error messages above or try with another pairs of
outlet
coordinates
  Removing region definition

<original>

The command is telling you that an output with the same name is already

there. You need to delete it* and run the command again.

*Sorry r.basin doesn't handle overwrite, as written in the manual.

Hope this helps.

Kind regards,

--
Margherita Di Leo

--
Margherita Di Leo

_______________________________________________
grass-user mailing list

grass-user@.osgeo

https://lists.osgeo.org/mailman/listinfo/grass-user

--
Sent from: http://osgeo-org.1560.x6.nabble.com/Grass-Users-f3884509.html

Hi,
Thank you for your interest and time!

I had created a whole new location and ran the code only once. And it is
still showing the same. Moreover, the file in question is nowhere to be
found.

Is there any other possibility?

(sorry, again I had accidentally excluded the list from cc)
Maybe try giving it a different prefix and a different folder where to write the output
Hope this helps

···

Margherita Di Leo