[GRASS-user] Retrieve current region ncols and rrows in Python

Greetings

For a small python script that I’m making I need the number of cols and rows that are currently active. I’ve found for a C routine :slight_smile: but not for a Python Script. I believe it’s simple but…

Thanks
Kat

2010/10/18 katrin eggert <katrineggert1980@gmail.com>:

For a small python script that I'm making I need the number of cols and rows
that are currently active. I've found for a C routine :slight_smile: but not for a

grass.region() [1]

Martin

[1] http://grass.osgeo.org/programming6/namespacegrass_1_1script_1_1core.html#ac0f1d6516f98839d5330f6c5accc0120

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

see this
http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/doc/python/example_ctypes.py

On Mon, Oct 18, 2010 at 10:35 PM, katrin eggert <katrineggert1980@gmail.com> wrote:

Greetings

For a small python script that I’m making I need the number of cols and rows that are currently active. I’ve found for a C routine :slight_smile: but not for a Python Script. I believe it’s simple but…

Thanks
Kat


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Rashad

2010/10/18 Mohammed Rashad <mohammedrashadkm@gmail.com>:

see this
http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/doc/python/example_ctypes.py

you are referring to ctypes python interface, not the python scripting
library. They are two different things, ctypes is the python interface
to GRASS C libraries, the scripting library is a interface to GRASS
modules.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa