Re: [GRASS-dev] Re: [GRASS-user] Get current location projection in a Python Script

2010-07-22 Thread Glynn Clements
Nikos Alexandris wrote: Nikos Alexandris wrote: rows = int(grass.region()['rows']) cols = int(grass.region()['cols']) Is python's int() truncating or rounding up values? The question came to me while thinking of r.mapcalc's respective functions ( i.e. int() != round()

Re: [GRASS-dev] Re: [GRASS-user] Get current location projection in a Python Script

2010-07-22 Thread Nikos Alexandris
Nikos Alexandris wrote: rows = int(grass.region()['rows']) cols = int(grass.region()['cols']) Is python's int() truncating or rounding up values? The question came to me while thinking of r.mapcalc's respective functions ( i.e. int() != round() ) Glynn Clements

Re: [GRASS-dev] Re: [GRASS-user] Get current location projection in a Python Script

2010-07-21 Thread Nikos Alexandris
Nikos Alexandris wrote: rows = int(grass.region()['rows']) cols = int(grass.region()['cols']) Glynn: In 7.0, these fields are already integers; r40555 should be backported. Markus: AFAIK it has been backported some time ago.

Re: [GRASS-dev] Re: [GRASS-user] Get current location projection in a Python Script

2010-06-27 Thread Glynn Clements
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

Re: [GRASS-dev] Re: [GRASS-user] Get current location projection in a Python Script

2010-06-27 Thread Nikos Alexandris
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

Re: [GRASS-dev] Re: [GRASS-user] Get current location projection in a Python Script

2010-05-31 Thread Markus Neteler
On Mon, May 31, 2010 at 3:50 AM, Glynn Clements gl...@gclements.plus.com wrote: [CC to grass-dev] 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

Re: [GRASS-dev] Re: [GRASS-user] Get current location projection in a Python Script

2010-05-31 Thread Glynn Clements
Markus Neteler 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.

Re: [GRASS-user] Get current location projection in a Python Script

2010-05-30 Thread Nikos Alexandris
[...] 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

Re: [GRASS-user] Get current location projection in a Python Script

2010-05-30 Thread Michael Barton
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

Re: [GRASS-user] Get current location projection in a Python Script

2010-05-30 Thread Glynn Clements
[CC to grass-dev] 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. -- Glynn Clements

Re: [GRASS-user] Get current location projection in a Python Script

2010-05-26 Thread Michael Barton
On May 25, 2010, at 11:14 AM, Nikos Alexandris wrote: Kim Besson: I'm building a GRASS Python Script to automatically import a set of data to my location. At GRASS book (chapter 3.3.3) it uses g.proj -wf to to check current location projection. Can I use the same command in Python to

[GRASS-user] Get current location projection in a Python Script

2010-05-25 Thread Kim Besson
Greetings I'm building a GRASS Python Script to automatically import a set of data to my location. At GRASS book (chapter 3.3.3) it uses g.proj -wf to to check current location projection. Can I use the same command in Python to retrieve the same? And how about calling gdalwarp in a

Re: [GRASS-user] Get current location projection in a Python Script

2010-05-25 Thread Michael Barton
On May 25, 2010, at 1:29 AM, grass-user-requ...@lists.osgeo.org wrote: Date: Tue, 25 May 2010 08:50:10 +0100 From: Kim Besson kimbesson1...@gmail.com Subject: [GRASS-user] Get current location projection in a Python Script To: grass-user@lists.osgeo.org Message-ID

Re: [GRASS-user] Get current location projection in a Python Script

2010-05-25 Thread Nikos Alexandris
Kim Besson: I'm building a GRASS Python Script to automatically import a set of data to my location. At GRASS book (chapter 3.3.3) it uses g.proj -wf to to check current location projection. Can I use the same command in Python to retrieve the same? And how about calling gdalwarp

Re: [GRASS-user] Get current location projection in a Python Script

2010-05-25 Thread Michael Barton
On May 25, 2010, at 8:25 AM, Nikos Alexandris wrote: Kim Besson: I'm building a GRASS Python Script to automatically import a set of data to my location. At GRASS book (chapter 3.3.3) it uses g.proj -wf to to check current location projection. Can I use the same command in Python to

Re: [GRASS-user] Get current location projection in a Python Script

2010-05-25 Thread Nikos Alexandris
Kim Besson: I'm building a GRASS Python Script to automatically import a set of data to my location. At GRASS book (chapter 3.3.3) it uses g.proj -wf to to check current location projection. Can I use the same command in Python to retrieve the same? And how about calling gdalwarp in a