Hi all!
The Raster classes (Row, RowIO, and Segment) seem to work, the RasterNUmpy
class is under development, at the moment it is partially working.
This week I did some benchmarks to test the speed of pygrass, and the results
are not bad. The purpose of the pygrass is not to substitute the r.mapcalc
module, but I want just compare the execution time.
Below I reported the execution time of add a number to a Raster
map, using r.mapcal module, the RasterRow class, and the RasterSegment class:
Add a number:
r.mapcalc +2; 21.487251 sec/pass
RasterRow +2; 11.181928 sec/pass
RasterSeg +2; 14.730741 sec/pass
Test an if condition:
r.mapcalc if; 14.240596 sec/pass
RasterRow if; 14.753899 sec/pass
RasterSeg if; 19.982334 sec/pass
Test a function:
r.mapcalc sqrt; 16.495872 sec/pass
RasterRow sqrt; 18.591585 sec/pass
RasterSeg sqrt; 22.305732 sec/pass
You may find the code here:
git clone https://code.google.com/p/pygrass/
and you can run the benchmark code with:
python test/benchmark.py
As suggested by Martin Landa I added on the wiki page the project plan of the
GSoC moving from melange page.
http://grass.osgeo.org/wiki/GRASS_SoC_Ideas_2012/High_level_map_interaction#Project_plan
And of course you can find the detail weekly report.
http://grass.osgeo.org/wiki/GRASS_SoC_Ideas_2012/High_level_map_interaction#Report4_-
_2012-06-22
All the documentation of the raster classes is now available at:
http://pygrass.readthedocs.org/en/latest/raster.html
As usual you can download, the weekly snapshot from here:
http://pygrass.googlecode.com/files/week4.zip
Questions, doubts, and criticism are welcome!
Best Regards,
Pietro