[GRASS-user] Change GRASS region multiple times

Luna, Daniel Eduardo DEL47 at pitt.edu
Wed Mar 2 13:40:05 PST 2016


Hello!

I'm working with pygrass, developing a new module for GRASS.

I need to create a new raster map during the execution. I'm using the commands:

        from grass.pygrass import raster

        newRasterMap = raster.RasterSegment('new')
        newRasterMap.open('w', 'CELL')


I've noticed that new raster maps are created with the resolution of the current region in GRASS. I've noticed also that it is possible to change the current region during the execution of my new module using the script 'g.region'. However, it looks like if I want to change the resolution again, the script 'g.region' does not have any effect. My conclusion: GRASS can change the current region just 1 time during the execution of a module. Is that correct?

I would like to know how can I develop a new module (using pygrass) where I could be able to create three new raster maps with different resolutions each?

Thank you all very much!
--
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20160302/84eb7d6e/attachment.html>


More information about the grass-user mailing list