Re: [GRASS-user] Problems Running r.flow

2010-01-29 Thread Glynn Clements
Rich Shepard wrote: Did you try g.region rast=aber5m without the other options? Glynn, Not until just now. It's busy calculating maps now. Why does not specifying res or '-ap' make such a difference? Perhaps I can solve future situations like this myself if I better understand

Re: [GRASS-user] Problems Running r.flow

2010-01-29 Thread Rich Shepard
On Fri, 29 Jan 2010, Glynn Clements wrote: With g.region, if you use the -a switch and/or the align= option, the bounds will be adjusted so that the height/width is equal to the resolution multiplied by the number of rows/columns. Regardless of which options are used, the final step will

Re: [GRASS-user] Problems Running r.flow

2010-01-29 Thread Glynn Clements
Hamish wrote: +return (fabs(a-ew_res - b-ew_res) 1e-6 * b-ew_res +fabs(a-ns_res - b-ns_res) 1e-6 * b-ns_res); +} Hamish: use GRASS_EPSILON, as it is based on the machine; it doesn't make assumptions about the units you are measuring in. ... e.g. for Lat/Long

Re: [GRASS-user] Problems Running r.flow

2010-01-28 Thread Glynn Clements
Rich Shepard wrote: In -6.4svn from last Friday's weekly snapshot. After setting g.region rast=aber5m I tried running r.flow elevin=aber5m aspin=aber5aspect flout=aberFlowline lgout=aberFlowlength and ran into resolution problems: Reading input files: elevation ERROR: Elevation

Re: [GRASS-user] Problems Running r.flow

2010-01-28 Thread Rich Shepard
On Thu, 28 Jan 2010, Glynn Clements wrote: That's a bug in r.flow: if (!((region.ew_res == hd.ew_res) (region.ns_res == hd.ns_res))) G_fatal_error(_(Elevation file's resolution differs from current region resolution)); Try the attached patch. It replaces the exact

Re: [GRASS-user] Problems Running r.flow

2010-01-28 Thread Glynn Clements
Rich Shepard wrote: That's a bug in r.flow: if (!((region.ew_res == hd.ew_res) (region.ns_res == hd.ns_res))) G_fatal_error(_(Elevation file's resolution differs from current region resolution)); Try the attached patch. It replaces the exact comparison with a check

Re: [GRASS-user] Problems Running r.flow

2010-01-28 Thread Rich Shepard
On Thu, 28 Jan 2010, Glynn Clements wrote: Did you try g.region rast=aber5m without the other options? Glynn, Not until just now. It's busy calculating maps now. Why does not specifying res or '-ap' make such a difference? Perhaps I can solve future situations like this myself if I

Re: [GRASS-user] Problems Running r.flow

2010-01-28 Thread Hamish
Glynn wrote: Try the attached patch. It replaces the exact comparison with a check that the resolutions agree to within 1ppm. ... +static int compare_regions(const struct Cell_head *a, const struct Cell_head *b) +{ +return (fabs(a-ew_res - b-ew_res) 1e-6 * b-ew_res +

Re: [GRASS-user] Problems Running r.flow

2010-01-28 Thread Hamish
Glynn wrote: Try the attached patch. It replaces the exact comparison with a check that the resolutions agree to within 1ppm. ... +static int compare_regions(const struct Cell_head *a, const struct Cell_head *b) +{ +return (fabs(a-ew_res - b-ew_res) 1e-6 * b-ew_res +

[GRASS-user] Problems Running r.flow

2010-01-27 Thread Rich Shepard
In -6.4svn from last Friday's weekly snapshot. After setting g.region rast=aber5m I tried running r.flow elevin=aber5m aspin=aber5aspect flout=aberFlowline lgout=aberFlowlength and ran into resolution problems: Reading input files: elevation ERROR: Elevation file's resolution differs from

Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Milton Cezar Ribeiro
Hi Rich, try g.region nsres=5 ewres=5, may be you can bypass this. best regards milton 2010/1/27 Rich Shepard rshep...@appl-ecosys.com In -6.4svn from last Friday's weekly snapshot. After setting g.region rast=aber5m I tried running r.flow elevin=aber5m aspin=aber5aspect

Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Rich Shepard
On Wed, 27 Jan 2010, Milton Cezar Ribeiro wrote: try g.region nsres=5 ewres=5, may be you can bypass this. milton, That's how I defined the resolution, but it was returned as slightly less for some reason. See: GRASS 6.4.0svn (Oregon):/usr4/grassbase g.region res=5 -p projection: 99

Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Markus Neteler
On Thu, Jan 28, 2010 at 1:59 AM, Rich Shepard rshep...@appl-ecosys.com wrote: On Wed, 27 Jan 2010, Milton Cezar Ribeiro wrote: try g.region nsres=5 ewres=5, may be you can bypass this. milton,  That's how I defined the resolution, but it was returned as slightly less for some reason. See:

Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Rich Shepard
On Thu, 28 Jan 2010, Markus Neteler wrote: If you add -a to g.region, you obtain the desired resolution by (automatically) a slightly enlarged region which make the pixels fit into it properly. Markus, Thank you. I'm still learning about the -a option and when to use it. Perhaps this is

Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Markus Neteler
On Thu, Jan 28, 2010 at 2:46 AM, Rich Shepard rshep...@appl-ecosys.com wrote: On Thu, 28 Jan 2010, Markus Neteler wrote: If you add -a to g.region, you obtain the desired resolution by (automatically) a slightly enlarged region which make the pixels fit into it properly. Markus,  Thank

Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Rich Shepard
On Thu, 28 Jan 2010, Markus Neteler wrote: You have to set to the raster map first. That's what I do, Markus, when I start GRASS and when I change from the 10m resolution maps to the 5m resolution maps. What I _really_ need to figure out is why so many modules fail for me. I cannot get

Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Milton Cezar Ribeiro
*Hum* Interesting -a flag. But g.region res=5 and g.region nsres=5 ewres=5 produce the same result? I never tryed. Rich, another way is you use n= s= w= e= options, that may be will result something like -a, I suppose. cheers milton 2010/1/27 Rich Shepard rshep...@appl-ecosys.com On Wed, 27

Re: [GRASS-user] Problems Running r.flow

2010-01-27 Thread Milton Cezar Ribeiro
Rich, If your are using a resolution of ~5m, I suggest you adjust your region ~1m. I think that the final result will not suffer so much changes. If so, may be you can try finer resolution (4m?). g.region n=1334420 s=1279150 w=769190 e=819255 res=5 good luck milton 2010/1/27 Rich Shepard