[GRASS-dev] pygrass: region do not align to raster

Pietro peter.zamb at gmail.com
Sun Apr 19 06:40:46 PDT 2015


Hi Martin,

On Sun, Apr 19, 2015 at 3:32 PM, Martin Landa <landa.martin at gmail.com> wrote:
> it's seems to me that Region.align() is not working in pygrass as expected.
>
> region = Region()
> print region.rows            -> is 977
> region.align(rast)
> print region.rows            -> should be 11682, but prints 977

You are right, all the methods: align and zoom are wrong, because
their are calling the g.region module, that it is execute in an
external process and therefore does not affect the current one,
therefore they should be:
- removed or
- re-implemented to provide the same functionality remaining in the
same process or
- move the align and zoom functions from the g.region module to the
library link them with ctypes and call them from the method.

Pietro


More information about the grass-dev mailing list