[GRASS-dev] GRASS to Numpy [was: Re: List of new features in GRASS 7 (in trac)]

Hamish hamish_b at yahoo.com
Mon Jan 25 21:16:13 EST 2010


Tim wrote:
> O question on this here:
> > Improved Python API:  *read/write GRASS rasters to/from NumPy
>
> How do I trigger this?
> 
> Will a command r.out.numpy save the raster in a pickled
> array? How will the geographic information be retrained?
> 
> This gives a big potential for plotting with basemap!

try with r.out.mat. AFAIU NumPy/SciPy is essentially an attempt
to clone Matlab in python. Given that, I would not be surprised
if it just sort of worked, given the right command.

> Is such a feature also planned for vectors? They could be
> exported to a format usable by Shaply...

I'm pretty sure I wrote a v.out.mat, have a look in wiki addons.

(I've got no idea what Shaply does or wants)


Hamish



      


More information about the grass-dev mailing list