<div>Hi Hamish,</div>
<div> </div>
<div>Thanks for your encourager's email.</div>
<div>I started to play with numpy for other purposes,</div>
<div>but I will give a look in deep for this.</div>
<div> </div>
<div>If I get success I will be happy report it here.</div>
<div> </div>
<div>bests</div>
<div> </div>
<div>milton<br><br></div>
<div class="gmail_quote">2009/8/12 Hamish <span dir="ltr"><<a href="mailto:hamish_b@yahoo.com">hamish_b@yahoo.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div></div>
<div class="h5">Milton Cezar Ribeiro wrote:<br>> I am building a simulation python code that read a<br>> raster maps on grass mapset.<br>> As my maps is not so large (512x512 pixels) I dump it<br>> on a text file<br>
> (using r.out.ascii), after I read the text file on<br>> python, parse it using a function that<br>> I wrote, and after create a matrix-like object on Python.<br>><br>> I would like to know if I can read my raster map on python wihout<br>
> save it on external text file. Case yes, a short example are welcome.<br><br><br></div></div>you might look at NumPy <a href="http://numpy.scipy.org/" target="_blank">http://numpy.scipy.org/</a> + NumPtr python<br>extension. NumPtr can be found in the swig/python/ dir in the grass<br>
source code. (also examples/m.distance + rasteraccess.py there)<br><br>NumPy is also used by the wxGUI profile tool.<br><br><br>SciPy is another thing to check out.<br><br><br>please post back to the list with what you learn :) & if you succeed<br>
maybe add a page to the grass wiki with steps?<br><font color="#888888"><br><br>Hamish<br><br><br><br><br><br></font></blockquote></div><br>