Re: [GRASS-user] Introducing myself and my first questions

2012-12-28 Thread Paul Meems
Thanks Daniel, This really helps. I understand it more, not all ;) I started creating the slope and aspect files first using: r.slope.aspect elevation=w001001@temp slope=slope aspect=aspect format=degrees prec=float zfactor=1.0 min_slp_allowed=0.0 But this didn't work. It took 0 seconds and I

Re: [GRASS-user] Introducing myself and my first questions

2012-12-28 Thread Paul Meems
Doing some more searching using Google and changing my keywords I found the answer to my own question below. I need to call g.region rast=your_DEM to match my computational region first. I did that and now I have slope and aspect files. It is still very fast (1 second) but the files look OK. I

Re: [GRASS-user] Introducing myself and my first questions

2012-12-28 Thread Pietro Zambelli
On Friday 28 December 2012 09:13:28 Paul Meems wrote: Thanks Daniel, This really helps. I understand it more, not all ;) I started creating the slope and aspect files first using: r.slope.aspect elevation=w001001@temp slope=slope aspect=aspect format=degrees prec=float zfactor=1.0

[GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread Paul Meems
Here I am again with some questions ;) I'm now trying to use r.sun and r.mapcalc with Python to create my annual solar radiation map. I'm using the Python shell inside GRASS. For testing purposes I start with 9 days. The r.sun part seems to be working: for x in range(1, 10, 1): print Working

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread Rashad M
could you provide a source file to check? On Fri, Dec 28, 2012 at 4:46 PM, Paul Meems bontepaar...@gmail.com wrote: Here I am again with some questions ;) I'm now trying to use r.sun and r.mapcalc with Python to create my annual solar radiation map. I'm using the Python shell inside GRASS.

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread Daniel Lee
Hi there, I'm now trying to use r.sun and r.mapcalc with Python to create my annual solar radiation map. I'm using the Python shell inside GRASS. For testing purposes I start with 9 days. The r.sun part seems to be working: for x in range(1, 10, 1): print Working on day %d % (x)

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread Paul Meems
Thanks again Daniel for your help. When I do the calculation in the GUI instead of in the Python shell I get these results: r.mapcalc sun = global1@temp+ global2@temp (Fri Dec 28 12:26:10 2012) Command finished (1 sec) r.mapcalc sun = sun@temp+ global3@temp ERROR: Unable to close raster map When

[GRASS-user] Setting default region - incorrect region set after inserting raster resolution

2012-12-28 Thread RichardC
Hi, I create a new LOCATION and wish to set the default region for global coverage, i.e 90, -90, 180, -180 and, in the case of the current raster file, insert 0.000833 (degrees) as its resolution. The resulting DEFAULT_WIND file contains the following: proj: 3 zone: 0 north:

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread Daniel Lee
Hmm, okay. That post is pretty old though and there have been a lot of improvements to GRASS since. I don't think it applies any more. Check this out: GRASS 6.4.3svn (EPSG25832_UTM32N):~ r.mapcalc test=1 100% GRASS 6.4.3svn (EPSG25832_UTM32N):~ r.mapcalc test=test+3 100% GRASS 6.4.3svn

[GRASS-user] Failed to set LC_ALL

2012-12-28 Thread Eugenio Trumpy
Hello everybody, I just compiled grass7 from svn on my ubuntu 12.10.The complilation goes well,but starting grass7 i read in the command line: Failed to set LC_ALL to None.UTF-8 (unsupported locale setting) It seems working good, on the command line in background while the GUI is loading i

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread Paul Meems
Thanks Daniel, I'm using the Windows version of 6.4.3RC2, downloaded the installer. When I use your example I get this result: (Fri Dec 28 13:03:32 2012) r.mapcalc test=1 (Fri Dec 28 13:03:34 2012) Command finished (2 sec) (Fri Dec 28 13:03:51 2012) r.mapcalc test=test+3 ERROR: Unable to close

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread S. Koukoulas (lists)
To my experience with r.mapcalc you cannot do what yo do with programming languages... e.g. i=i+1 will not work directly. Instead you could try a more indirect way, something like (here is an example with bash shell script): #g.mremove rast=out* (to remove previous stuff, if needed) r.mapcalc

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread Paul Meems
Thanks Sotiris, I've tried your suggestion but converted it to Python because I'm on Windows. This is my script: grass.run_command('g.mremove', rast = ('out*')) grass.mapcalc('sun=global1', quiet=False, verbose=False, overwrite=True) for x in range(2, 10, 1): exp = 'out=sun+global' + str(x)

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread S. Koukoulas (lists)
Paul, First, Daniel's example worked for me - (I wasn't aware of the changes in r.mapcalc and in a similar problem I made use of older posts to solve my problems). Now, if you want to go the other way then you must make sure that globalx changes to global2, global3 etc. So your problem should be

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread S. Koukoulas (lists)
Dear Paul, having said all that for r.mapcalc, I wonder whether you really need mapcalc. In your case, couldn't you just use the * r.series * command with Sum (and perhaps g.mlist can help you make a list of all the daily maps). I think that it might be faster as well. best, sotiris On

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread Paul Meems
Hi Sotiris, Thanks for your help. I will have a look at the r.series. Meanwhile I've discovered the graphical modeler. It is not working 100% in all cases but it does generates a Python script with all the necessary parameters. This is my script so far, which seems to be working: for x in

Re: [GRASS-user] movement direction surface in r.drain

2012-12-28 Thread Markus Metz
On Wed, Dec 19, 2012 at 3:25 PM, Margherita Di Leo direg...@gmail.com wrote: Hi All, I have a friction map, a start polygon and an end polygon and would like to find the least cost path, meaning not a corridor but a thin line. To now I've tried both r.cost and r.walk and r.drain eventually,

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread Daniel Lee
Hi Paul, I think one of your problems is... using windows ;) I have heard that the Windows version of GRASS works a LOT better than it used to, but GRASS was actually the reason I switched to Linux a couple of years ago. Back then it just ran better in Linux - a lot better. Since then, I've never

Re: [GRASS-user] movement direction surface in r.drain

2012-12-28 Thread Markus Neteler
On Fri, Dec 28, 2012 at 4:37 PM, Markus Metz markus.metz.gisw...@gmail.com wrote: On Wed, Dec 19, 2012 at 3:25 PM, Margherita Di Leo direg...@gmail.com wrote: Hi All, I have a friction map, a start polygon and an end polygon and would like to find the least cost path, meaning not a corridor

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread Thomas Adams - NOAA Federal
I may be off base with what you want, but it seems like may you want to use GRASS r.series, namely… base=$(basename $input .grib2) • • • r.series input=`g.mlist rast pattern=${base} .* sep=,` output=${base.total method=sum --overwrite So, if you have a bunch of *.grib2 files, for instance, that

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread Helmut Kudrnovsky
I'm using the Windows version of 6.4.3RC2, downloaded the installer. [...] ERROR: Unable to close raster map it's an OS feature. in the windows operating system, an opened file can't be overwritten, thus this error. AFAIK don't rely that this always works correctly in linux. - best

Re: [GRASS-user] Setting default region - incorrect region set after inserting raster resolution

2012-12-28 Thread Markus Metz
On Fri, Dec 28, 2012 at 12:41 PM, RichardC richtcoo...@hotmail.com wrote: Hi, I create a new LOCATION and wish to set the default region for global coverage, i.e 90, -90, 180, -180 and, in the case of the current raster file, insert 0.000833 (degrees) as its resolution. What are the exact

Re: [GRASS-user] Grass, Python, mapcalc

2012-12-28 Thread Paul Meems
I understand I should use GRASS with Ubuntu to get the best results, but I'm not only new with GRASS and Python but also with Ubuntu ;) Ubuntu server I know a little and I have learned to appreciate it very much, but Ubuntu desktop is completely new for me. That is the reason I wanted to start on

[GRASS-user] recompile grass 6.42 within window / Msys

2012-12-28 Thread Milton Cezar Ribeiro
Dear all, I need to recompile current grass 6.42 within windows. Where can I find the tips to deal with this? -- Miltinho - m...@rc.unesp.br Laboratório de Ecologia Espacial e Conservação - LEEC Depto de Ecologia - UNESP - Rio Claro Av. 24A, 1515- Bela Vista 13506-900 Rio Claro, SP, Brasil

Re: [GRASS-user] recompile grass 6.42 within window / Msys

2012-12-28 Thread Rashad M
http://trac.osgeo.org/grass/wiki/CompileOnWindows On Sat, Dec 29, 2012 at 1:23 AM, Milton Cezar Ribeiro miltinho.astrona...@gmail.com wrote: Dear all, I need to recompile current grass 6.42 within windows. Where can I find the tips to deal with this? -- Miltinho - m...@rc.unesp.br

Re: [GRASS-user] Failed to set LC_ALL

2012-12-28 Thread Rashad M
me too had the same problem On Fri, Dec 28, 2012 at 5:17 PM, Eugenio Trumpy frippe12...@hotmail.comwrote: Hello everybody, I just compiled grass7 from svn on my ubuntu 12.10. The complilation goes well, but starting grass7 i read in the command line: Failed to set LC_ALL to None.UTF-8

Re: [GRASS-user] Floating point histogram x-axis display

2012-12-28 Thread Markus Neteler
On Fri, Dec 28, 2012 at 6:39 AM, RichardC richtcoo...@hotmail.com wrote: Hi, I notice with a floating point raster that there appears to be a numbering problem in the histogram's x-axis. All values in the file are are from zero to 159, no negative values. Horizontally expanding the

Re: [GRASS-user] Setting default region - incorrect region set after inserting raster resolution

2012-12-28 Thread RichardC
Hi Markus, I entered the values for the default region through the location wizard selected at GRASS start up. The CRS was input via entering EPSG 4326. Then the spatial extent and raster resolution entered. I notice that I'm unable to enter region extents in DMS format, getting the error:

Re: [GRASS-user] Setting default region - incorrect region set after inserting raster resolution

2012-12-28 Thread RichardC
Running g.region under the PERMANENT MAPSET resolves the issue: g.region -s n=90N s=90S e=180E w=180W res=0.00083 proj: 3 zone: 0 north: 90N south: 90S *east: 180E west: 180W cols: 432000 rows: 216000* e-w resol: 0:00:03 n-s resol: