All,<div><br></div><div>What I am thinking of is a python version of r.in.poly which can create area, line, circle from a list of (x,y) coordinates captured from wxGUI Map display</div><div><br></div><div>r.in.poly reads from file or stdin. Using pyGRASS/ grass ctypes api we can create objects in raster file.</div>

<div><br></div><div><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Dec 17, 2012 at 2:30 PM, Pietro <span dir="ltr"><<a href="mailto:peter.zamb@gmail.com" target="_blank">peter.zamb@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Hamish,<br>
<div class="im"><br>
On Mon, Dec 17, 2012 at 4:36 AM, Hamish <<a href="mailto:hamish_b@yahoo.com">hamish_b@yahoo.com</a>> wrote:<br>
> for my 2c it's quite nice to have a dedicated raster digitizing<br>
> option, instead of needing an extra v.in.ascii -> v.to.rast<br>
> step in your workflow. That doesn't rule out a wrapper script<br>
> to hide the vector part of it, but a dedicated r.in.poly mode<br>
> would both be more efficient and perhaps less prone to loss in<br>
> fidelity.<br>
<br>
</div>I think that should be possible to use the geometry feature of the<br>
vector api of pygrass,<br>
<br>
>>> from grass import pygrass<br>
>>> from pygrass.vector.geometry import Point, Line<br>
>>> pnt = Point(10, 100)<br>
>>> line = Line([(0, 0), (1, 1), (2, 0), (1, -1)])<br>
>>> line.c_points  # return the ctypes pointer to the line_points struct<br>
<grass.lib.ctypes_preamble.LP_struct_line_pnts object at 0x2aa1440><br>
<br>
even if is not deeply tested...<br>
<br>
get more example from here:<br>
<br>
<a href="http://www.ing.unitn.it/~zambelli/projects/pygrass/vector.html#vector-features" target="_blank">http://www.ing.unitn.it/~zambelli/projects/pygrass/vector.html#vector-features</a><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
Pietro<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><font face="arial, helvetica, sans-serif">Regards,<br>   Rashad</font></div><br>
</div>