[GRASS-user] [snap pour point for r.water.outlet]

Ang Sherpa angsherpa232 at gmail.com
Thu Mar 30 03:40:06 PDT 2017


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']

*Best,*
*Ang Dawa Sherpa*


On Thu, Mar 30, 2017 at 3:45 PM, Helmut Kudrnovsky <hellik at 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:
>
> e.g.
>
> v.report map=mysampleoutlet_snapped at user1 option=coor
> cat|x|y|z
> 1|635555|219665|0
>
> or
>
> 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
>
> and some others ....
>
>
>
>
>
> -----
> best regards
> Helmut
> --
> View this message in context: http://osgeo-org.1560.x6.
> nabble.com/snap-pour-point-for-r-water-outlet-tp5314835p5314937.html
> Sent from the Grass - Users mailing list archive at Nabble.com.
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20170330/4cf54ca3/attachment.html>


More information about the grass-user mailing list