r.stream.snap is an add-on. So you first need to install it using e.g g.extension. Have you installed r.stream.order before calling it?
/j
-------- Original message --------
From: Ang Sherpa
Date:30/03/2017 05:34 (GMT+01:00)
To: Helmut Kudrnovsky , GRASS user list
Subject: Re: [GRASS-user] [snap pour point for r.water.outlet]
Thanks for the link Helmut,
However, it throws an error stating:
(Thu Mar 30 09:14:55 2017)
r.stream.snap
‘r.stream.snap’ is not recognized as an internal or external
command,
operable program or batch file.
I am using standalone version Grass gis 7.2.0
Best, Ang Dawa Sherpa
Regards, Ang Dawa Sherpa GIS technician - Irrigation Master Plan WRPPF - DOI, Nepal Government Lalitpur contact: 984 007 3861
On Thu, Mar 30, 2017 at 1:03 AM, Helmut Kudrnovsky <hellik@web.de> wrote:
Ang Sherpa wrote
Hi users,
While using “r.water.outlet” to delineate watershed basin, although the
coordinates of the stream was noted from google earth and fed into
“r.water.outlet” module, it produces plain raster.
Is there any solution to make sure that the coordinates of outlet point
automatically snaps to the nearest line of stream in drainage direction
map?
r.stream.snap does not have attribute table attached and throws an error:“DB connection for vector map XXX not defined.”
With this case, it won’t be of any good use as coordinate of new snaped point cannot be extracted for feeding into “r.water.outlet” - coordinate field.
-------- Original message --------
From: Ang Sherpa
Date:30/03/2017 07:32 (GMT+01:00)
To: Johannes Radinger
Cc: Helmut Kudrnovsky , GRASS user list
Subject: Re: [GRASS-user] [snap pour point for r.water.outlet]
Thanks Johannes,
Installed. No I have not installed r.stream.order, is it mandatory or ease the process?
Regards, Ang Dawa Sherpa GIS technician - Irrigation Master Plan WRPPF - DOI, Nepal Government Lalitpur contact: 984 007 3861
r.stream.snap is an add-on. So you first need to install it using e.g g.extension. Have you installed r.stream.order before calling it?
/j
-------- Original message --------
From: Ang Sherpa
Date:30/03/2017 05:34 (GMT+01:00)
To: Helmut Kudrnovsky , GRASS user list
Subject: Re: [GRASS-user] [snap pour point for r.water.outlet]
Thanks for the link Helmut,
However, it throws an error stating:
(Thu Mar 30 09:14:55 2017)
r.stream.snap
‘r.stream.snap’ is not recognized as an internal or external
command,
operable program or batch file.
I am using standalone version Grass gis 7.2.0
Regards, Ang Dawa Sherpa GIS technician - Irrigation Master Plan WRPPF - DOI, Nepal Government Lalitpur contact: 984 007 3861
On Thu, Mar 30, 2017 at 1:03 AM, Helmut Kudrnovsky <hellik@web.de> wrote:
Ang Sherpa wrote
Hi users,
While using “r.water.outlet” to delineate watershed basin, although the
coordinates of the stream was noted from google earth and fed into
“r.water.outlet” module, it produces plain raster.
Is there any solution to make sure that the coordinates of outlet point
automatically snaps to the nearest line of stream in drainage direction
map?
First stream network was converted into vector format. Any coordinate user enter will be converted into vector on the fly and calculate the v.distance between stream network and newly formed point vector. Finally, the point vector will be deleted before the user enter another coordinate.
r.stream.snap does not have attribute table attached and throws an error:“DB connection for vector map XXX not defined.”
With this case, it won’t be of any good use as coordinate of new snaped point cannot be extracted for feeding into “r.water.outlet” - coordinate field.
Best, Ang Dawa Sherpa
Best, Ang Dawa Sherpa
Regards, Ang Dawa Sherpa GIS technician - Irrigation Master Plan WRPPF - DOI, Nepal Government Lalitpur contact: 984 007 3861
-------- Original message --------
From: Ang Sherpa
Date:30/03/2017 07:32 (GMT+01:00)
To: Johannes Radinger
Cc: Helmut Kudrnovsky , GRASS user list
Subject: Re: [GRASS-user] [snap pour point for r.water.outlet]
Thanks Johannes,
Installed. No I have not installed r.stream.order, is it mandatory or ease the process?
r.stream.snap is an add-on. So you first need to install it using e.g g.extension. Have you installed r.stream.order before calling it?
/j
-------- Original message --------
From: Ang Sherpa
Date:30/03/2017 05:34 (GMT+01:00)
To: Helmut Kudrnovsky , GRASS user list
Subject: Re: [GRASS-user] [snap pour point for r.water.outlet]
Thanks for the link Helmut,
However, it throws an error stating:
(Thu Mar 30 09:14:55 2017)
r.stream.snap
‘r.stream.snap’ is not recognized as an internal or external
command,
operable program or batch file.
I am using standalone version Grass gis 7.2.0
Regards, Ang Dawa Sherpa GIS technician - Irrigation Master Plan WRPPF - DOI, Nepal Government Lalitpur contact: 984 007 3861
On Thu, Mar 30, 2017 at 1:03 AM, Helmut Kudrnovsky <hellik@web.de> wrote:
Ang Sherpa wrote
Hi users,
While using “r.water.outlet” to delineate watershed basin, although the
coordinates of the stream was noted from google earth and fed into
“r.water.outlet” module, it produces plain raster.
Is there any solution to make sure that the coordinates of outlet point
automatically snaps to the nearest line of stream in drainage direction
map?
r.stream.snap does not have attribute table attached and throws an error:
"DB connection for vector map XXX not defined."
With this case, it won't be of any good use as coordinate of new snaped
point cannot be extracted for feeding into "r.water.outlet" - coordinate
field.
that's not an error, just a warning.
there are different ways to get the point coordinates:
v.db.addtable - Creates and connects a new attribute table to a given layer
of an existing vector map.
v.to.db - Populates attribute values from vector features.
v.to.db option=coor: point coordinates, X,Y or X,Y,Z
Thanks Helmut,
Actually when I tried to extract only the x and y with following code it throws an error “KeyError: ‘x’”
s = gscript.parse_command(gscript.parse_command(‘v.report’,map=‘snap_test’,option=‘coor’,units=‘meters’)
print s[‘x’]
···
On Thu, Mar 30, 2017 at 3:45 PM, Helmut Kudrnovsky <hellik@web.de> wrote:
Ang Sherpa wrote
Thanks Johannes,
r.stream.snap does not have attribute table attached and throws an error:
“DB connection for vector map XXX not defined.”
With this case, it won’t be of any good use as coordinate of new snaped
point cannot be extracted for feeding into “r.water.outlet” - coordinate
field.
that’s not an error, just a warning.
there are different ways to get the point coordinates:
v.db.addtable - Creates and connects a new attribute table to a given layer
of an existing vector map.
v.to.db - Populates attribute values from vector features.
v.to.db option=coor: point coordinates, X,Y or X,Y,Z
Actually when I tried to extract only the x and y with following code it
throws an error "KeyError: 'x'"
s =
gscript.parse_command(gscript.parse_command('v.report',map='snap_test',option='coor',units='meters')
print s['x']
as you can see
v.report map=mysampleoutlet_snapped at user1 option=coor
cat|x|y|z
1|635555|219665|0
the v.report output isn't in a form of a pythonic key:value form, therefore
you have to adapt your script to e.g. split the output in python and read
in the coordinates.
On Fri, Mar 31, 2017 at 3:34 PM, Helmut Kudrnovsky <hellik@web.de> wrote:
Actually when I tried to extract only the x and y with following code it
throws an error “KeyError: ‘x’”
s =
gscript.parse_command(gscript.parse_command(‘v.report’,map=‘snap_test’,option=‘coor’,units=‘meters’)
print s[‘x’]
as you can see
v.report map=mysampleoutlet_snapped at user1 option=coor
cat|x|y|z
1|635555|219665|0
the v.report output isn’t in a form of a pythonic key:value form, therefore
you have to adapt your script to e.g. split the output in python and read
in the coordinates.