Re: [GRASS-dev] Re: grass-dev Digest, Vol 33, Issue 37

2009-01-17 Thread Markus Metz



Helena Mitasova wrote:


On Jan 17, 2009, at 12:07 AM, Michael Barton wrote:


Markus,

I compiled last night and was able to try this on my Mac this 
evening. No problem at all with the North Carolina elev_lid792_1m 
DEM. Everything ran very fast, of course--even though it runs at 
32bit on the Mac.


As expected, the MFD results look much more realistic than the SFD 
results. Much less linearity and more sinuosity. I can post the 
displays if anyone wants to see them.


No errors from the command.

No errors in compiling.

Seems to work fine on the Mac.

I'm not sure why this can't be backported to develbranch_6 since 
6.4RCx is already out. Does it change any of the r.watershed 
arguments or behavior using the pre-MFD arguments?
Yes, MFD is default, so using the same arguments produces different 
results. See also my reply to Helena:

http://lists.osgeo.org/pipermail/grass-dev/2009-January/041965.html

I would prefer to stay out of the discussion about backporting and leave 
this decision to the long-time developers.


Michael
- it needs to be thoroughly tested on wide range of data
before replacing it. I am trying to get to it too and Markus M has 
done already quite a bit of testing himself. If you can ask Isaac 
and/or whoever has grass7 and is around to test it with different data
(wide range of resolutions, data sources, combinations of parameters, 
integer or float DEMs, latlong, different size and type of depressions 
etc.) that would help.
I fully agree. BTW (repeating myself), the results improve a lot if 
float DEMs are multiplied with 100 or 1000 before used as input.


Markus M
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] Re: grass-dev Digest, Vol 33, Issue 37

2009-01-16 Thread Markus Metz



Michael Barton wrote:



On Jan 15, 2009, at 5:22 AM, grass-dev-requ...@lists.osgeo.org wrote:


[...]

Comment (by mmetz):

I have submitted a new version of r.watershed to trunk with various
changes


[..]


Markus,

Can this go into develbranch_6 too?
According to Markus Neteler, not as long as develbranch_6 is 6.4. If the 
version of develbranch_6 is changed to 6.5, I can think about asking to 
backport again. I will however continue to do active development in 
grass7. What I can do is to give instructions on how to add r.watershed 
from grass7 to grass6 manually on a local copy so that a subsequent svn 
up for grass6 doesn't create a mess. Of course this would be purely for 
testing purposes.


Markus M


Michael
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] Re: grass-dev Digest, Vol 33, Issue 37

2009-01-16 Thread Michael Barton

Markus,

I compiled last night and was able to try this on my Mac this evening.  
No problem at all with the North Carolina elev_lid792_1m DEM.  
Everything ran very fast, of course--even though it runs at 32bit on  
the Mac.


As expected, the MFD results look much more realistic than the SFD  
results. Much less linearity and more sinuosity. I can post the  
displays if anyone wants to see them.


No errors from the command.

No errors in compiling.

Seems to work fine on the Mac.

I'm not sure why this can't be backported to develbranch_6 since  
6.4RCx is already out. Does it change any of the r.watershed arguments  
or behavior using the pre-MFD arguments?


Michael


On Jan 15, 2009, at 12:39 PM, Markus Metz wrote:




Michael Barton wrote:



On Jan 15, 2009, at 5:22 AM, grass-dev-requ...@lists.osgeo.org  
wrote:



[...]

Comment (by mmetz):

I have submitted a new version of r.watershed to trunk with various
changes

[...]


Markus,

Can this go into develbranch_6 too?
I hope so:-) But I would like to get the new functionality tested by  
others before it is backported in case I missed something. You  
mentioned that you are testing the new functionality, and you are  
using Mac while I use Linux 64bit, so if the new version runs fine  
and produces proper results on your system that would be encouraging!
Below are test scripts for the North Carolina sample dataset  
nc_spm_08 and the Spearfish dataset spearfish60. You can copy the  
commands for each dataset into a script and then run the script,  
after updating to today's version of r.watershed:-)


Markus M


Testing commands for the elevation map elev_lid792_1m in the North  
Carolina sample dataset nc_spm_08. SFD and MFD output is strikingly  
different.


g.region rast=elev_lid792_1m
# multiply elev_lid792_1m to get millimetres as vertical units
r.mapcalc elev_lid792_1m.1mm = round(elev_lid792_1m * 1000.0)

# SFD (D8) flow distribution
r.watershed elev=elev_lid792_1m.1mm threshold=3000 \
accum=elev_lid792_1m.1mm.acc.sfd drain=elev_lid792_1m.1mm.drain.sfd \
basin=elev_lid792_1m.1mm.basin.sfd stream=elev_lid792_1m. 
1mm.stream.sfd \

half_b=elev_lid792_1m.1mm.halfb.sfd vis=elev_lid792_1m.1mm.viz.sfd \
length_sl=elev_lid792_1m.1mm.ls.sfd slope_st=elev_lid792_1m. 
1mm.sls.sfd -s


# MFD flow distribution
r.watershed elev=elev_lid792_1m.1mm threshold=3000 \
accum=elev_lid792_1m.1mm.acc.mfd drain=elev_lid792_1m.1mm.drain.mfd \
basin=elev_lid792_1m.1mm.basin.mfd stream=elev_lid792_1m. 
1mm.stream.mfd \

half_b=elev_lid792_1m.1mm.halfb.mfd vis=elev_lid792_1m.1mm.viz.mfd \
length_sl=elev_lid792_1m.1mm.ls.mfd slope_st=elev_lid792_1m. 
1mm.sls.mfd \

convergence=5


Testing commands for the elevation map elevation.10m in the  
Spearfish sample dataset spearfish60. Differences between SFD and  
MFD are mainly in the northern half.


g.region rast=elevation.10m
# multiply elevation.10m to get centimetres as vertical units
r.mapcalc elevation.10m.1cm = round(elevation.10m * 100.0)

# SFD (D8) flow distribution
r.watershed elev=elevation.10m.1cm threshold=3000 \
accum=elevation.10m.1cm.acc.sfd drain=elevation.10m.1cm.drain.sfd \
basin=elevation.10m.1cm.basin.sfd stream=elevation.10m. 
1cm.stream.sfd \

half_b=elevation.10m.1cm.halfb.sfd vis=elevation.10m.1cm.viz.sfd \
length_sl=elevation.10m.1cm.ls.sfd slope_st=elevation.10m. 
1cm.sls.sfd -s


# MFD flow distribution
r.watershed elev=elevation.10m.1cm threshold=3000 \
accum=elevation.10m.1cm.acc.mfd drain=elevation.10m.1cm.drain.mfd \
basin=elevation.10m.1cm.basin.mfd stream=elevation.10m. 
1cm.stream.mfd \

half_b=elevation.10m.1cm.halfb.mfd vis=elevation.10m.1cm.viz.mfd \
length_sl=elevation.10m.1cm.ls.mfd slope_st=elevation.10m. 
1cm.sls.mfd \

convergence=5



Michael
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev



___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] Re: grass-dev Digest, Vol 33, Issue 37

2009-01-16 Thread Helena Mitasova


On Jan 17, 2009, at 12:07 AM, Michael Barton wrote:


Markus,

I compiled last night and was able to try this on my Mac this  
evening. No problem at all with the North Carolina elev_lid792_1m  
DEM. Everything ran very fast, of course--even though it runs at  
32bit on the Mac.


As expected, the MFD results look much more realistic than the SFD  
results. Much less linearity and more sinuosity. I can post the  
displays if anyone wants to see them.


No errors from the command.

No errors in compiling.

Seems to work fine on the Mac.

I'm not sure why this can't be backported to develbranch_6 since  
6.4RCx is already out. Does it change any of the r.watershed  
arguments or behavior using the pre-MFD arguments?


Michael
-  it needs to be thoroughly tested on wide range of data
before replacing it. I am trying to get to it too and Markus M has  
done already quite a bit of testing himself. If you can ask Isaac and/ 
or whoever  has grass7 and is around to test it with different data
(wide range of resolutions, data sources, combinations of parameters,  
integer or float DEMs, latlong, different size and type of  
depressions etc.) that would help.


Has anybody any other issues with the new r.watershed than testing?

Helena



Michael


On Jan 15, 2009, at 12:39 PM, Markus Metz wrote:




Michael Barton wrote:



On Jan 15, 2009, at 5:22 AM, grass-dev-requ...@lists.osgeo.org  
wrote:



[...]

Comment (by mmetz):

I have submitted a new version of r.watershed to trunk with various
changes

[...]


Markus,

Can this go into develbranch_6 too?
I hope so:-) But I would like to get the new functionality tested  
by others before it is backported in case I missed something. You  
mentioned that you are testing the new functionality, and you are  
using Mac while I use Linux 64bit, so if the new version runs fine  
and produces proper results on your system that would be encouraging!
Below are test scripts for the North Carolina sample dataset  
nc_spm_08 and the Spearfish dataset spearfish60. You can copy the  
commands for each dataset into a script and then run the script,  
after updating to today's version of r.watershed:-)


Markus M


Testing commands for the elevation map elev_lid792_1m in the North  
Carolina sample dataset nc_spm_08. SFD and MFD output is  
strikingly different.


g.region rast=elev_lid792_1m
# multiply elev_lid792_1m to get millimetres as vertical units
r.mapcalc elev_lid792_1m.1mm = round(elev_lid792_1m * 1000.0)

# SFD (D8) flow distribution
r.watershed elev=elev_lid792_1m.1mm threshold=3000 \
accum=elev_lid792_1m.1mm.acc.sfd drain=elev_lid792_1m.1mm.drain.sfd \
basin=elev_lid792_1m.1mm.basin.sfd stream=elev_lid792_1m. 
1mm.stream.sfd \

half_b=elev_lid792_1m.1mm.halfb.sfd vis=elev_lid792_1m.1mm.viz.sfd \
length_sl=elev_lid792_1m.1mm.ls.sfd slope_st=elev_lid792_1m. 
1mm.sls.sfd -s


# MFD flow distribution
r.watershed elev=elev_lid792_1m.1mm threshold=3000 \
accum=elev_lid792_1m.1mm.acc.mfd drain=elev_lid792_1m.1mm.drain.mfd \
basin=elev_lid792_1m.1mm.basin.mfd stream=elev_lid792_1m. 
1mm.stream.mfd \

half_b=elev_lid792_1m.1mm.halfb.mfd vis=elev_lid792_1m.1mm.viz.mfd \
length_sl=elev_lid792_1m.1mm.ls.mfd slope_st=elev_lid792_1m. 
1mm.sls.mfd \

convergence=5


Testing commands for the elevation map elevation.10m in the  
Spearfish sample dataset spearfish60. Differences between SFD and  
MFD are mainly in the northern half.


g.region rast=elevation.10m
# multiply elevation.10m to get centimetres as vertical units
r.mapcalc elevation.10m.1cm = round(elevation.10m * 100.0)

# SFD (D8) flow distribution
r.watershed elev=elevation.10m.1cm threshold=3000 \
accum=elevation.10m.1cm.acc.sfd drain=elevation.10m.1cm.drain.sfd \
basin=elevation.10m.1cm.basin.sfd stream=elevation.10m. 
1cm.stream.sfd \

half_b=elevation.10m.1cm.halfb.sfd vis=elevation.10m.1cm.viz.sfd \
length_sl=elevation.10m.1cm.ls.sfd slope_st=elevation.10m. 
1cm.sls.sfd -s


# MFD flow distribution
r.watershed elev=elevation.10m.1cm threshold=3000 \
accum=elevation.10m.1cm.acc.mfd drain=elevation.10m.1cm.drain.mfd \
basin=elevation.10m.1cm.basin.mfd stream=elevation.10m. 
1cm.stream.mfd \

half_b=elevation.10m.1cm.halfb.mfd vis=elevation.10m.1cm.viz.mfd \
length_sl=elevation.10m.1cm.ls.mfd slope_st=elevation.10m. 
1cm.sls.mfd \

convergence=5



Michael
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev



___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


[GRASS-dev] Re: grass-dev Digest, Vol 33, Issue 37

2009-01-15 Thread Michael Barton



On Jan 15, 2009, at 5:22 AM, grass-dev-requ...@lists.osgeo.org wrote:


Date: Thu, 15 Jan 2009 09:39:00 -
From: GRASS GIS t...@osgeo.org
Subject: [GRASS-dev] Re: [GRASS GIS] #398: r.watershed with MFD
To: undisclosed-recipients:;
Message-ID: 048.b6a7364e017fd287d20f06fe708ae...@osgeo.org
Content-Type: text/plain; charset=utf-8

#398: r.watershed with MFD
-- 
+-

 Reporter:  mmetz|   Owner:  grass-dev@lists.osgeo.org
 Type:  enhancement  |  Status:  reopened
 Priority:  minor|   Milestone:  7.0.0
Component:  Raster   | Version:  svn-trunk
Resolution:   |Keywords:
 Platform:  Unspecified  | Cpu:  Unspecified
-- 
+-

Comment (by mmetz):

I have submitted a new version of r.watershed to trunk with various
changes

MFD is fully supported: drainage directions, stream segments, basins,
half-basins, RUSLE LS and S factors are all in accordance with MFD  
flow

accumulation.

The module is slightly faster and uses a bit less memory. See updated
documentation to estimate memory requirements for the ram (all in  
memory)

mode (max 31 MB of RAM for 1 million cells).

It is no longer necessary to create a MASK for cells with unknown
elevation (NULL values). All cells with unknown elevation (masked or  
NULL
values) are skipped. Zero and negative values are valid elevation  
values.


The color rules generated by the module for flow accumulation have  
worked

for all tests so far and allow visual inspection without manually
assigning a color table. I'm using standard deviation and log  
transform,

based on Hamish's (I think) suggestions. Visual output is obsolete but
left for comparison.

The output drainage direction is slightly changed in case an input map
with real depressions was supplied. Previously, real depressions had a
drainage direction of -1, but -1 was and is a valid drainage direction
indicating a drainage of 45 degree CCW from East towards a cell with
unknown elevation. Therefore real depressions have now a drainage
direction of 0. As before, if a cell drains due East the drainage
direction is 360 degrees, 0 (zero) as drainage direction was unused.

RUSLE LS and S factor output maps are now of type DCELL without
multiplication by 100. Both factors have always been processed as type
double, previously the output maps for the two factors were written  
out by

typecasting from (DCELL * 100) to CELL.

Please read the updated documentation before using the new module.

Best regards,


Markus,

Can this go into develbranch_6 too?

Michael
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


Re: [GRASS-dev] Re: grass-dev Digest, Vol 33, Issue 37

2009-01-15 Thread Markus Metz



Michael Barton wrote:



On Jan 15, 2009, at 5:22 AM, grass-dev-requ...@lists.osgeo.org wrote:


[...]

Comment (by mmetz):

I have submitted a new version of r.watershed to trunk with various
changes

[...]


Markus,

Can this go into develbranch_6 too?
I hope so:-) But I would like to get the new functionality tested by 
others before it is backported in case I missed something. You mentioned 
that you are testing the new functionality, and you are using Mac while 
I use Linux 64bit, so if the new version runs fine and produces proper 
results on your system that would be encouraging!
Below are test scripts for the North Carolina sample dataset nc_spm_08 
and the Spearfish dataset spearfish60. You can copy the commands for 
each dataset into a script and then run the script, after updating to 
today's version of r.watershed:-)


Markus M


Testing commands for the elevation map elev_lid792_1m in the North 
Carolina sample dataset nc_spm_08. SFD and MFD output is strikingly 
different.


g.region rast=elev_lid792_1m
# multiply elev_lid792_1m to get millimetres as vertical units
r.mapcalc elev_lid792_1m.1mm = round(elev_lid792_1m * 1000.0)

# SFD (D8) flow distribution
r.watershed elev=elev_lid792_1m.1mm threshold=3000 \
accum=elev_lid792_1m.1mm.acc.sfd drain=elev_lid792_1m.1mm.drain.sfd \
basin=elev_lid792_1m.1mm.basin.sfd stream=elev_lid792_1m.1mm.stream.sfd \
half_b=elev_lid792_1m.1mm.halfb.sfd vis=elev_lid792_1m.1mm.viz.sfd \
length_sl=elev_lid792_1m.1mm.ls.sfd slope_st=elev_lid792_1m.1mm.sls.sfd -s

# MFD flow distribution
r.watershed elev=elev_lid792_1m.1mm threshold=3000 \
accum=elev_lid792_1m.1mm.acc.mfd drain=elev_lid792_1m.1mm.drain.mfd \
basin=elev_lid792_1m.1mm.basin.mfd stream=elev_lid792_1m.1mm.stream.mfd \
half_b=elev_lid792_1m.1mm.halfb.mfd vis=elev_lid792_1m.1mm.viz.mfd \
length_sl=elev_lid792_1m.1mm.ls.mfd slope_st=elev_lid792_1m.1mm.sls.mfd \
convergence=5


Testing commands for the elevation map elevation.10m in the Spearfish 
sample dataset spearfish60. Differences between SFD and MFD are mainly 
in the northern half.


g.region rast=elevation.10m
# multiply elevation.10m to get centimetres as vertical units
r.mapcalc elevation.10m.1cm = round(elevation.10m * 100.0)

# SFD (D8) flow distribution
r.watershed elev=elevation.10m.1cm threshold=3000 \
accum=elevation.10m.1cm.acc.sfd drain=elevation.10m.1cm.drain.sfd \
basin=elevation.10m.1cm.basin.sfd stream=elevation.10m.1cm.stream.sfd \
half_b=elevation.10m.1cm.halfb.sfd vis=elevation.10m.1cm.viz.sfd \
length_sl=elevation.10m.1cm.ls.sfd slope_st=elevation.10m.1cm.sls.sfd -s

# MFD flow distribution
r.watershed elev=elevation.10m.1cm threshold=3000 \
accum=elevation.10m.1cm.acc.mfd drain=elevation.10m.1cm.drain.mfd \
basin=elevation.10m.1cm.basin.mfd stream=elevation.10m.1cm.stream.mfd \
half_b=elevation.10m.1cm.halfb.mfd vis=elevation.10m.1cm.viz.mfd \
length_sl=elevation.10m.1cm.ls.mfd slope_st=elevation.10m.1cm.sls.mfd \
convergence=5



Michael
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev