Nikos Alexandris wrote: > > > > >> # faster/ easier way: use of the "grass.region()" function > > > > >> rows = int(grass.region()['rows']) > > > > >> cols = int(grass.region()['cols']) > > > > > > > > > > In 7.0, these fields are already integers; r40555 should be > > > > > backported. > > > > > > > > AFAIK it has been backported some time ago. > > > > > > > > http://trac.osgeo.org/grass/browser/grass/branches/releasebranch_6_4/ > > > > lib/ python/core.py#L503 > > > > > > Okay; change that to "I should 'svn update' the other branches more > > > often", then ;) > > > > This means it should be like: > > > > rows = grass.region()['rows'] > > cols = grass.region()['cols'] > > > > Right?
Glynn: > Right; although you should store the result of grass.region() to avoid > redundant g.region commands, i.e.: > > rgn = grass.region() > rows = rgn['rows'] > cols = rgn['cols'] Thank you Glynn, Nikos _______________________________________________ grass-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/grass-user
