Thanks. Quite helpful. Michael ____________________ C. Michael Barton Director, Center for Social Dynamics & Complexity Professor of Anthropology, School of Human Evolution & Social Change Arizona State University
voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC) fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC) www: www.public.asu.edu/~cmbarton, http://csdc.asu.edu On May 30, 2010, at 2:41 AM, Nikos Alexandris wrote: > [...] > > Nikos Alexandris: >>>>> Just for the records, a thread not _directly_ about it but close >>>>> (enough?): >>>>> <http://osgeo-org.1803224.n2.nabble.com/Getting-rows-cols-of-a-region-i >>>>> n -a- script-tc2787474.html#a2788062> > [...] >>> 1. http://www.mail-archive.com/grass-user@lists.osgeo.org/msg08280.html >>> 2. http://www.mail-archive.com/grass-user@lists.osgeo.org/msg08288.html > > Michael Barton wrote: >> These work, but there is a better shortcut now from the GRASS Python >> library. > >> regiondict = grass.region() > >> will create a Python dictionary regiondict with values for extents and >> resolution. It's the same as creating a dictionary by parsing g.region >> -ugp > > Attached a simple python script with various ways to get "rows, cols" from > the > "current" region. > > Nikos > <g.region.resolution.py> _______________________________________________ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user