<div dir="ltr">Thanks,<div><div><br></div><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div style="font-size:12.8px"><b>Best,</b></div><div style="font-size:12.8px"><b>Ang Dawa Sherpa</b></div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px"><br></div></div></div></div>
<br><div class="gmail_quote">On Fri, Mar 31, 2017 at 3:34 PM, Helmut Kudrnovsky <span dir="ltr"><<a href="mailto:hellik@web.de" target="_blank">hellik@web.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">>Actually when I tried to extract only the x and y with following code it<br>
throws an error "KeyError: 'x'"<br>
><br>
>s =<br>
>gscript.parse_command(<wbr>gscript.parse_command('v.<wbr>report',map='snap_test',<wbr>option='coor',units='meters')<br>
>print s['x']<br>
<br>
</span>as you can see<br>
<br>
> v.report map=mysampleoutlet_snapped at user1 option=coor<br>
<span class="">> cat|x|y|z<br>
> 1|635555|219665|0<br>
<br>
</span>the v.report output isn't in a form of a pythonic key:value form, therefore<br>
you have to adapt your script to  e.g. split the output in python and read<br>
in the coordinates.<br>
<br>
you can also use e.g.<br>
<br>
v.to.db -p --quiet map=mysampleoutlet_snapped@<wbr>user1 option=coor<br>
1|635555|219665|0<br>
<br>
than it's maybe easier to split the output in python<br>
<span class=""><br>
<br>
<br>
<br>
<br>
-----<br>
best regards<br>
Helmut<br>
--<br>
</span>View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/snap-pour-point-for-r-water-outlet-tp5314835p5315147.html" rel="noreferrer" target="_blank">http://osgeo-org.1560.x6.<wbr>nabble.com/snap-pour-point-<wbr>for-r-water-outlet-<wbr>tp5314835p5315147.html</a><br>
<div class="HOEnZb"><div class="h5">Sent from the Grass - Users mailing list archive at Nabble.com.<br>
______________________________<wbr>_________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/grass-user" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a></div></div></blockquote></div><br></div></div></div>