[GRASS-SVN] r38407 - in grass-addons/vector/v.strahler: . documentation images

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jul 14 01:52:42 EDT 2009


Author: hamish
Date: 2009-07-14 01:52:42 -0400 (Tue, 14 Jul 2009)
New Revision: 38407

Modified:
   grass-addons/vector/v.strahler/Makefile
   grass-addons/vector/v.strahler/description.html
   grass-addons/vector/v.strahler/documentation/r.broscoe_flowchart.jpeg
   grass-addons/vector/v.strahler/documentation/v.strahler_flowchart.jpeg
   grass-addons/vector/v.strahler/forest2tree.c
   grass-addons/vector/v.strahler/helper.c
   grass-addons/vector/v.strahler/images/Qgisout_vstrahler.jpg
   grass-addons/vector/v.strahler/images/at_rbroscoe.jpg
   grass-addons/vector/v.strahler/images/input_vstrahler.jpg
   grass-addons/vector/v.strahler/images/lr_rbroscoe.jpg
   grass-addons/vector/v.strahler/images/menotre.jpg
   grass-addons/vector/v.strahler/images/output_vstrahler.jpg
   grass-addons/vector/v.strahler/images/thrVScell.jpg
   grass-addons/vector/v.strahler/images/wt_rbroscoe.jpg
   grass-addons/vector/v.strahler/main.c
   grass-addons/vector/v.strahler/r.broscoe.sh
   grass-addons/vector/v.strahler/r.broscoe.sh.html
   grass-addons/vector/v.strahler/r.strahler.sh
   grass-addons/vector/v.strahler/r.strahler.sh.html
   grass-addons/vector/v.strahler/strahler.c
   grass-addons/vector/v.strahler/strahler.h
   grass-addons/vector/v.strahler/v.mainchannel.html
   grass-addons/vector/v.strahler/write.c
Log:
run grass_indent.sh, module_svn_propset.sh, linewrap html page at col80


Property changes on: grass-addons/vector/v.strahler/Makefile
___________________________________________________________________
Added: svn:mime-type
   + text/x-makefile

Modified: grass-addons/vector/v.strahler/description.html
===================================================================
--- grass-addons/vector/v.strahler/description.html	2009-07-14 05:49:26 UTC (rev 38406)
+++ grass-addons/vector/v.strahler/description.html	2009-07-14 05:52:42 UTC (rev 38407)
@@ -1,27 +1,49 @@
 <h2>DESCRIPTION</h2>
 
-<em>v.strahler</em> calculates the Strahler Order for all lines of a given dendritic network. The input vector map must be free of cycles. For the elaboration a new imported network or a network extracted from DEM by using <em><a HREF="r.watershed.html">r.watershed</a></em> can be used (in this case the topology has to be cleaned manually). More than one tree in the input data is allowed. No given flow direction is needed. To find the outlet of each tree, a DEM must be given.
+<em>v.strahler</em> calculates the Strahler Order for all lines of a given
+dendritic network. The input vector map must be free of cycles. For the
+elaboration a new imported network or a network extracted from DEM by
+using <em><a HREF="r.watershed.html">r.watershed</a></em> can be used
+(in this case the topology has to be cleaned manually). More than one
+tree in the input data is allowed. No given flow direction is needed.
+To find the outlet of each tree, a DEM must be given.
 
 There are two additional scripts distributed with v.strahler:<br />
-- <em>r.strahler.sh</em> extracts streams from a DEM and call v.strahler on the result. <br />
-- <em>r.broscoe.sh</em> computes further statistical values for a given basin. <br />
+- <em>r.strahler.sh</em> extracts streams from a DEM and call v.strahler
+  on the result. <br />
+- <em>r.broscoe.sh</em> computes further statistical values for a given
+  basin. <br />
 
 <h2>NOTES</h2>
+
 <h3>Problems</h3>
+
 This program is in beta status. It has the following shortcomings: <br />
 - The input data has to be topologically clean. Use <em>sloppy</em>=0.0 <br />
 - Source code comments are not doxydized. <br />
 
 
 <h3>How the algorithm works</h3>
-In a first step, <em>v.strahler</em> identifies all separate networks in the input dataset. That means, all connected lines are assigned a common <em>Basin ID</em>.<br />
-Consequently, the lowest leaf of each tree is identified as outlet. An auxiliary DEM is needed at this point. <br />
-Strahler ordering begins at each leaf of the tree with order N=1 (excluding the outlet). At a confluence, the order N(r) of the resulting stream is equal to the highest order N(max) of the joining streams or is raised by one if there are two or more joining streams of order N(max). <br />
-The algorithm returns an ASCII text file with columns: <em>Category</em> (from input map), <em>Line</em> (topology), <em>Basin</em>, <em>Order</em>; and the output map has the Strahler Order value instead of "category" for each line, and no connection with the database.
 
+In a first step, <em>v.strahler</em> identifies all separate networks in
+the input dataset. That means, all connected lines are assigned a common
+<em>Basin ID</em>.<br />
+Consequently, the lowest leaf of each tree is identified as outlet.
+An auxiliary DEM is needed at this point. <br />
+Strahler ordering begins at each leaf of the tree with order N=1
+(excluding the outlet). At a confluence, the order N(r) of the resulting
+stream is equal to the highest order N(max) of the joining streams or is
+raised by one if there are two or more joining streams of order N(max).<br />
+The algorithm returns an ASCII text file with columns: <em>Category</em>
+(from input map), <em>Line</em> (topology), <em>Basin</em>, <em>Order</em>;
+and the output map has the Strahler Order value instead of "category"
+for each line, and no connection with the database.
+
 See the also the diagrams in the documentation/ directory.
 
+
 <h2>EXAMPLE</h2>
+
 The input map (vector on DEM): <br />
 <br />
 <img src="images/input_vstrahler.jpg"> <br />
@@ -30,9 +52,10 @@
 An example of the sintax in GRASS shell: <br />
 <br />
 <div class="code"><pre>
-GRASS 6.3.0RC1 (ED50_Z33):~ > v.strahler input=esp_1 at mapset output=esp_1 dem=dem_20 at mapset \
-txout=/home/mapset/esp_1 sloppy=0 layer=1
+GRASS> v.strahler input=esp_1 at mapset output=esp_1 dem=dem_20 at mapset \
+          txout=/home/mapset/esp_1 sloppy=0 layer=1
 </pre></div>
+
 <br />
 <br />
 An extract from the resultant text file: <br />
@@ -80,14 +103,17 @@
 <img src="images/Qgisout_vstrahler.jpg"> <br />
 <br />
 <br />
+
 <h2>SEE ALSO</h2>
+
 <em><a href="r.watershed.html">r.watershed</a></em><BR>
 
+
 <h2>AUTHOR</h2>
 
 Florian Kindl, Univ. Innsbruck.<br />
 <br />
 Modified by: Ivan Marchesini and Annalisa Minelli, Univ. Perugia.<br />
 
-
-<p><i>Last changed: $Date: 2008/04/02 15:29:16 $</i>
+<p>
+<i>Last changed: $Date$</i>


Property changes on: grass-addons/vector/v.strahler/description.html
___________________________________________________________________
Added: svn:mime-type
   + text/html
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native


Property changes on: grass-addons/vector/v.strahler/documentation/r.broscoe_flowchart.jpeg
___________________________________________________________________
Modified: svn:mime-type
   - application/octet-stream
   + image/jpeg


Property changes on: grass-addons/vector/v.strahler/documentation/v.strahler_flowchart.jpeg
___________________________________________________________________
Modified: svn:mime-type
   - application/octet-stream
   + image/jpeg

Modified: grass-addons/vector/v.strahler/forest2tree.c
===================================================================
--- grass-addons/vector/v.strahler/forest2tree.c	2009-07-14 05:49:26 UTC (rev 38406)
+++ grass-addons/vector/v.strahler/forest2tree.c	2009-07-14 05:52:42 UTC (rev 38407)
@@ -7,104 +7,108 @@
    to handle entire lines, only their identifiers */
 
 #define STACK_SIZE 65535
-int sp = 0;				/* stack position */
+int sp = 0;			/* stack position */
 int stack[STACK_SIZE];		/* generous stack size */
 
-void push_line( int line )
+void push_line(int line)
 {
-	if ( sp < STACK_SIZE ) {
-		stack[sp++] = line;
-	} else {
-		G_fatal_error( "ForestToTrees: stack full" );
-	}
+    if (sp < STACK_SIZE) {
+	stack[sp++] = line;
+    }
+    else {
+	G_fatal_error("ForestToTrees: stack full");
+    }
 }
 
-int pop_line( void )
+int pop_line(void)
 {
-	if ( sp > 0 ) {
-		return stack[--sp];
-	} else {
-		G_debug( 3, "ForestToTrees: stack empty, tree finished" );
-		return 0;
-	}
+    if (sp > 0) {
+	return stack[--sp];
+    }
+    else {
+	G_debug(3, "ForestToTrees: stack empty, tree finished");
+	return 0;
+    }
 }
 
 
 /* or write our own lfind: nexttree() */
 /* start at offset, walk array up until bsnid == 0 and return that offset */
 
-int nexttree( DBBUF *dbbuf, int offset, int upper )
+int nexttree(DBBUF * dbbuf, int offset, int upper)
 {
-	while ((dbbuf[offset].bsnid != 0) && (offset < upper) ) {
-		++offset;
-		G_debug( 4, "bsnid[%d] is %d", offset, dbbuf[offset].bsnid);
-	}
-		return offset;
+    while ((dbbuf[offset].bsnid != 0) && (offset < upper)) {
+	++offset;
+	G_debug(4, "bsnid[%d] is %d", offset, dbbuf[offset].bsnid);
+    }
+    return offset;
 }
 
 /* Find trees, assign basinID */
-int StrahForestToTrees( struct Map_info *In, struct Map_info *Out, DBBUF *dbbuf )
+int StrahForestToTrees(struct Map_info *In, struct Map_info *Out,
+		       DBBUF * dbbuf)
 {
-	int tree, tree_finished, forest_done;	/* ID of tree (basin), processing status */
-	int l, n, d, degr, node;	/* iterators */
-	int nlines, offset;				/* number of lines, position in dbbuf */
-	int cline, aline;		/* currently harvested line, adjacent line */
-	int lnodes[2];			/* nodes of cline */ 
-	
+    int tree, tree_finished, forest_done;	/* ID of tree (basin), processing status */
+    int l, n, d, degr, node;	/* iterators */
+    int nlines, offset;		/* number of lines, position in dbbuf */
+    int cline, aline;		/* currently harvested line, adjacent line */
+    int lnodes[2];		/* nodes of cline */
 
-	G_debug( 1, "reached StrahForestToTrees" );
 
-	nlines = Vect_get_num_lines( In );
-	
-	forest_done = 0;
-	tree = 1;	/* we start with tree no. 1 */
-	offset = cline = 1;	/* we start at line 1 */
+    G_debug(1, "reached StrahForestToTrees");
 
-	while ( forest_done == 0 ) {
-  		G_debug( 3, "\nProcessing Tree %d", tree );
-		tree_finished = 0;	/* initialize status indicator for this tree */
-		while ( tree_finished == 0 ) {
-			/* procedure to get adjacent lines and push them on the stack */
-			Vect_get_line_nodes( In, cline, &lnodes[0], &lnodes[1] );
-  			G_debug( 4, "nodes for line %d: %d %d", cline, lnodes[0], lnodes[1] );
-	
-			for ( n=0; n<=1; n++) {		/* loop through array[2] of fnode and tnode */
-				node = lnodes[n];
-				/*degr = Vect_get_node_n_lines( In, node );*/
-				degr = StrahGetDegr( In, node );
- 				G_debug( 4, "degr %d for node %d", degr, node );
-				for (d = 0; d < degr; d++) {
-					/*aline = abs( Vect_get_node_line( In, node, d ) );*/
-					aline = abs( StrahGetNodeLine( In, node, d ) );
-					if ( dbbuf[aline].bsnid == 0 ) {		/* push line on stack only if not done yet */
-						G_debug( 4, "pushing line %d on sp %d", aline, sp);
-						push_line( aline );
-						G_debug( 4, "pushed, sp is now %d", sp);
-	 					dbbuf[aline].bsnid = tree;			/* line is done when pushed on stack */
-						dbbuf[aline].line = aline;
-					}
-				}
-			}
-	
-			/* pop a line from stack */
-			cline = (int)pop_line();
-  			G_debug( 4, "popped line %d", cline );
-			/* tree is finished when pop_line returned 0 */
-			if ( cline == 0 ) {
-				tree_finished = 1;
-			}
+    nlines = Vect_get_num_lines(In);
+
+    forest_done = 0;
+    tree = 1;			/* we start with tree no. 1 */
+    offset = cline = 1;		/* we start at line 1 */
+
+    while (forest_done == 0) {
+	G_debug(3, "\nProcessing Tree %d", tree);
+	tree_finished = 0;	/* initialize status indicator for this tree */
+	while (tree_finished == 0) {
+	    /* procedure to get adjacent lines and push them on the stack */
+	    Vect_get_line_nodes(In, cline, &lnodes[0], &lnodes[1]);
+	    G_debug(4, "nodes for line %d: %d %d", cline, lnodes[0],
+		    lnodes[1]);
+
+	    for (n = 0; n <= 1; n++) {	/* loop through array[2] of fnode and tnode */
+		node = lnodes[n];
+		/*degr = Vect_get_node_n_lines( In, node ); */
+		degr = StrahGetDegr(In, node);
+		G_debug(4, "degr %d for node %d", degr, node);
+		for (d = 0; d < degr; d++) {
+		    /*aline = abs( Vect_get_node_line( In, node, d ) ); */
+		    aline = abs(StrahGetNodeLine(In, node, d));
+		    if (dbbuf[aline].bsnid == 0) {	/* push line on stack only if not done yet */
+			G_debug(4, "pushing line %d on sp %d", aline, sp);
+			push_line(aline);
+			G_debug(4, "pushed, sp is now %d", sp);
+			dbbuf[aline].bsnid = tree;	/* line is done when pushed on stack */
+			dbbuf[aline].line = aline;
+		    }
 		}
-	
-		/* get first cline of next tree */
-		offset = cline = nexttree( dbbuf, ++offset, nlines );
-		G_debug( 3, "cline/offset for tree %d is %d", tree, cline );
-		if ( offset == nlines ) {
-			forest_done = 1;	/* what if last line still is 0 - it is a tree consisting of this line only - it shall keep bsnid 0 */
-		} else {
-			tree++;		/* continue with next tree */
-		}
+	    }
+
+	    /* pop a line from stack */
+	    cline = (int)pop_line();
+	    G_debug(4, "popped line %d", cline);
+	    /* tree is finished when pop_line returned 0 */
+	    if (cline == 0) {
+		tree_finished = 1;
+	    }
 	}
 
-	return tree;
+	/* get first cline of next tree */
+	offset = cline = nexttree(dbbuf, ++offset, nlines);
+	G_debug(3, "cline/offset for tree %d is %d", tree, cline);
+	if (offset == nlines) {
+	    forest_done = 1;	/* what if last line still is 0 - it is a tree consisting of this line only - it shall keep bsnid 0 */
+	}
+	else {
+	    tree++;		/* continue with next tree */
+	}
+    }
+
+    return tree;
 }
-


Property changes on: grass-addons/vector/v.strahler/forest2tree.c
___________________________________________________________________
Added: svn:mime-type
   + text/x-csrc

Modified: grass-addons/vector/v.strahler/helper.c
===================================================================
--- grass-addons/vector/v.strahler/helper.c	2009-07-14 05:49:26 UTC (rev 38406)
+++ grass-addons/vector/v.strahler/helper.c	2009-07-14 05:52:42 UTC (rev 38407)
@@ -1,77 +1,80 @@
 #include "strahler.h"
 
 /* Replacement for Vect_get_node_n_lines in sloppy mode
-Gets adjacent lines by coordinate */
+   Gets adjacent lines by coordinate */
 
-int StrahGetDegr( struct Map_info *In, int node )
+int StrahGetDegr(struct Map_info *In, int node)
 {
-	extern double sloppy;
-	int degr, onode, j;
-	double x, y;
-	BOUND_BOX *Box;
-	struct ilist *list;
+    extern double sloppy;
+    int degr, onode, j;
+    double x, y;
+    BOUND_BOX *Box;
+    struct ilist *list;
 
-	if ( sloppy != 0.0 ) {
-		Vect_get_node_coor( In, node, &x, &y, NULL );
+    if (sloppy != 0.0) {
+	Vect_get_node_coor(In, node, &x, &y, NULL);
 
-		Box->N = y + sloppy;
-		Box->S = y - sloppy; 
-		Box->W = x + sloppy; 
-		Box->E = x - sloppy; 
+	Box->N = y + sloppy;
+	Box->S = y - sloppy;
+	Box->W = x + sloppy;
+	Box->E = x - sloppy;
 
-		list = Vect_new_list();
+	list = Vect_new_list();
 
-/*
-		printf( "N %f\n", Box->N );
-		printf( "S %f\n", Box->S );
-		printf( "W %f\n", Box->W );
-		printf( "E %f\n", Box->E );
-*/
+	/*
+	   printf( "N %f\n", Box->N );
+	   printf( "S %f\n", Box->S );
+	   printf( "W %f\n", Box->W );
+	   printf( "E %f\n", Box->E );
+	 */
 
-		Vect_select_nodes_by_box( In, Box, list );
-    	G_debug( 3, "  %d nodes selected", list->n_values );
-		/* is always 0 -why? */
-		for ( j = 0; j < list->n_values; j++ ) {
-			onode =  abs( list->value[j] );
-			G_debug( 3, "List %d: %d\n",j , onode );
-		}
-/*		
-Vect_list_append ( StArcs, line );
-Vect_get_line_nodes ( &Map, line, &node1, &node2);
-Vect_list_append ( StNodes, node1 ); 
-Vect_list_append ( StNodes, node2 );
-*/
+	Vect_select_nodes_by_box(In, Box, list);
+	G_debug(3, "  %d nodes selected", list->n_values);
+	/* is always 0 -why? */
+	for (j = 0; j < list->n_values; j++) {
+	    onode = abs(list->value[j]);
+	    G_debug(3, "List %d: %d\n", j, onode);
+	}
+	/*              
+	   Vect_list_append ( StArcs, line );
+	   Vect_get_line_nodes ( &Map, line, &node1, &node2);
+	   Vect_list_append ( StNodes, node1 ); 
+	   Vect_list_append ( StNodes, node2 );
+	 */
 
-	} else {
-		degr = Vect_get_node_n_lines( In, node );
-	}
-	
-	G_debug( 4, "node %d degr %d sloppy %f\n", node, degr, sloppy );
-	return degr;
+    }
+    else {
+	degr = Vect_get_node_n_lines(In, node);
+    }
+
+    G_debug(4, "node %d degr %d sloppy %f\n", node, degr, sloppy);
+    return degr;
 }
 
-int StrahGetNodeLine( struct Map_info *In, int node, int d ) {
+int StrahGetNodeLine(struct Map_info *In, int node, int d)
+{
 
     extern double sloppy;
-	int aline;
+    int aline;
 
-	if ( sloppy != 0.0 ) {
-		G_debug(4, "StrahGetNodeLine at node %d", node);
-		/* 
-		get all nodes within sloppy from node -> from table StrahGetDegr has written
-		get all lines for each found node -> Vect_get_node_line(In, foundnode, df)
-		for ( fn=0; fn<foundnodes.length; fn++ ) {
-			degrf = Vect_get_node_n_lines( In, fn );
-			for (df = 0; df < degrf; df++) {
-				foundline = abs( Vect_get_node_line( In, fn, df ) );
-				addtolist(foundline);
-			}
-		}
-		return line d in list of foundlines;
-		*/
-	} else {
-		/* method if junction is only 1 node */
-		aline = abs( Vect_get_node_line( In, node, d ) );
-	}
-	return aline;
+    if (sloppy != 0.0) {
+	G_debug(4, "StrahGetNodeLine at node %d", node);
+	/* 
+	   get all nodes within sloppy from node -> from table StrahGetDegr has written
+	   get all lines for each found node -> Vect_get_node_line(In, foundnode, df)
+	   for ( fn=0; fn<foundnodes.length; fn++ ) {
+	   degrf = Vect_get_node_n_lines( In, fn );
+	   for (df = 0; df < degrf; df++) {
+	   foundline = abs( Vect_get_node_line( In, fn, df ) );
+	   addtolist(foundline);
+	   }
+	   }
+	   return line d in list of foundlines;
+	 */
+    }
+    else {
+	/* method if junction is only 1 node */
+	aline = abs(Vect_get_node_line(In, node, d));
+    }
+    return aline;
 }


Property changes on: grass-addons/vector/v.strahler/helper.c
___________________________________________________________________
Added: svn:mime-type
   + text/x-csrc


Property changes on: grass-addons/vector/v.strahler/images/Qgisout_vstrahler.jpg
___________________________________________________________________
Modified: svn:mime-type
   - application/octet-stream
   + image/jpeg


Property changes on: grass-addons/vector/v.strahler/images/at_rbroscoe.jpg
___________________________________________________________________
Modified: svn:mime-type
   - application/octet-stream
   + image/jpeg


Property changes on: grass-addons/vector/v.strahler/images/input_vstrahler.jpg
___________________________________________________________________
Modified: svn:mime-type
   - application/octet-stream
   + image/jpeg


Property changes on: grass-addons/vector/v.strahler/images/lr_rbroscoe.jpg
___________________________________________________________________
Modified: svn:mime-type
   - application/octet-stream
   + image/jpeg


Property changes on: grass-addons/vector/v.strahler/images/menotre.jpg
___________________________________________________________________
Deleted: svn:executable
   - *
Modified: svn:mime-type
   - application/octet-stream
   + image/jpeg


Property changes on: grass-addons/vector/v.strahler/images/output_vstrahler.jpg
___________________________________________________________________
Modified: svn:mime-type
   - application/octet-stream
   + image/jpeg


Property changes on: grass-addons/vector/v.strahler/images/thrVScell.jpg
___________________________________________________________________
Deleted: svn:executable
   - *
Modified: svn:mime-type
   - application/octet-stream
   + image/jpeg


Property changes on: grass-addons/vector/v.strahler/images/wt_rbroscoe.jpg
___________________________________________________________________
Modified: svn:mime-type
   - application/octet-stream
   + image/jpeg

Modified: grass-addons/vector/v.strahler/main.c
===================================================================
--- grass-addons/vector/v.strahler/main.c	2009-07-14 05:49:26 UTC (rev 38406)
+++ grass-addons/vector/v.strahler/main.c	2009-07-14 05:52:42 UTC (rev 38407)
@@ -1,3 +1,4 @@
+
 /****************************************************************************
  * 
  *  MODULE:       v.strahler
@@ -18,14 +19,14 @@
  ****************************************************************************/
 
 /*! \file main.c
-\brief Assign Strahler order to dendritic network
-\author Florian Kindl
+   \brief Assign Strahler order to dendritic network
+   \author Florian Kindl
 
-\todo Deal with poor topology 
-  \li implemement sloppy mode or
-  \li force clean topology
-\todo ...
-*/
+   \todo Deal with poor topology 
+   \li implemement sloppy mode or
+   \li force clean topology
+   \todo ...
+ */
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -45,312 +46,341 @@
 #define RITEDBLAH 1
 #define EBUG 1
 #define REATEDBLAH 1
-   
-int ret, type;		/* return and type related to Vect_read_line and Vect_write_line */
-int fdrast;		/* file descriptor for raster file is int */
-int ntrees;		/* number of trees in dataset, returned by StrahForestToTrees */
+
+int ret, type;			/* return and type related to Vect_read_line and Vect_write_line */
+int fdrast;			/* file descriptor for raster file is int */
+int ntrees;			/* number of trees in dataset, returned by StrahForestToTrees */
 double sloppy;
 
 int main(int argc, char **argv)
 {
-    int    line, node;
-    char   buf[1024];
-    int    nnodes, nlines, tlines;
-	DBBUF  *dbbuf;
-	NODEV  *nodev;
-    struct Option *input, *output, *dem_opt, *txout_opt, *sloppy_opt, *field_opt;
+    int line, node;
+    char buf[1024];
+    int nnodes, nlines, tlines;
+    DBBUF *dbbuf;
+    NODEV *nodev;
+    struct Option *input, *output, *dem_opt, *txout_opt, *sloppy_opt,
+	*field_opt;
     struct GModule *module;
-    char   *inputset, *demset;
+    char *inputset, *demset;
     struct Map_info In, Out;
-	struct Map_info Trees;
-	FILE   *txout;
-	struct Cell_head window; /* for cell sampling */
-	
-    extern int  ntrees;	/* number of trees calculated by StrahForestToTrees */
-    extern int  fdrast;
+    struct Map_info Trees;
+    FILE *txout;
+    struct Cell_head window;	/* for cell sampling */
+
+    extern int ntrees;		/* number of trees calculated by StrahForestToTrees */
+    extern int fdrast;
     extern double sloppy;
-	
+
     /* Attribute table (from v.net.path/path.c) */
 
-    struct line_cats *Cats;		/* introduced and initialized the structures line_cats and line_pnts */
+    struct line_cats *Cats;	/* introduced and initialized the structures line_cats and line_pnts */
     static struct line_pnts *Points;
-    Points = Vect_new_line_struct ();
-    Cats = Vect_new_cats_struct ();
+
+    Points = Vect_new_line_struct();
+    Cats = Vect_new_cats_struct();
     dbString sql;
     dbDriver *driver;
-	dbColumn *column;
-	
+    dbColumn *column;
+
     struct field_info *Fi;
-	int field;	
-   
+    int field;
+
     /* Initialize the GIS calls */
-    
-    G_gisinit (argv[0]) ;
 
+    G_gisinit(argv[0]);
+
     input = G_define_standard_option(G_OPT_V_INPUT);
     output = G_define_standard_option(G_OPT_V_OUTPUT);
 
     module = G_define_module();
     module->description = _("Strahler order");
 
-	dem_opt = G_define_standard_option(G_OPT_R_INPUT);
-	dem_opt->key = "dem";
-	dem_opt->description = _("Underlying DEM");
-	
-	txout_opt = G_define_option();
-	txout_opt->key = "txout";
+    dem_opt = G_define_standard_option(G_OPT_R_INPUT);
+    dem_opt->key = "dem";
+    dem_opt->description = _("Underlying DEM");
+
+    txout_opt = G_define_option();
+    txout_opt->key = "txout";
     txout_opt->type = TYPE_STRING;
     txout_opt->required = NO;
     txout_opt->multiple = NO;
     txout_opt->gisprompt = "new_file,file,output";
-    txout_opt->description = _("Path to ASCII file where results will be written");
+    txout_opt->description =
+	_("Path to ASCII file where results will be written");
 
 
     /* option sloppy for bad topology */
 
-	sloppy_opt = G_define_option();
-	sloppy_opt->key = "sloppy";
+    sloppy_opt = G_define_option();
+    sloppy_opt->key = "sloppy";
     sloppy_opt->type = TYPE_DOUBLE;
     sloppy_opt->required = NO;
-	sloppy_opt->answer = "0.0";
+    sloppy_opt->answer = "0.0";
     sloppy_opt->multiple = NO;
-    sloppy_opt->description = _("Threshold for distance within different nodes are considered the same node - may not work");
+    sloppy_opt->description =
+	_("Threshold for distance within different nodes are considered the same node - may not work");
 
 
     field_opt = G_define_standard_option(G_OPT_V_FIELD);
-    field = atoi (field_opt->answer);
+    field = atoi(field_opt->answer);
 
-    if(G_parser(argc,argv)) exit (EXIT_FAILURE);
-    
-	Vect_check_input_output_name( input->answer, output->answer, GV_FATAL_EXIT );
-	
-    inputset = G_find_vector2 (input->answer, NULL);
-	if ( inputset == NULL) {
-		G_fatal_error (_("Could not find input input <%s>"), input->answer);
-	}
-	
+    if (G_parser(argc, argv))
+	exit(EXIT_FAILURE);
+
+    Vect_check_input_output_name(input->answer, output->answer,
+				 GV_FATAL_EXIT);
+
+    inputset = G_find_vector2(input->answer, NULL);
+    if (inputset == NULL) {
+	G_fatal_error(_("Could not find input input <%s>"), input->answer);
+    }
+
     /* open datasets at topology level 2 */
-    
+
     Vect_set_open_level(2);
-    Vect_open_old (&In, input->answer, inputset); 
+    Vect_open_old(&In, input->answer, inputset);
 
-	G_debug(1, "Input vector opened");
+    G_debug(1, "Input vector opened");
 
     /* Open new vector, make 3D if input is 3D */
-    
-    if (1 > Vect_open_new( &Out, output->answer, Vect_is_3d( &In ))) {
-        Vect_close( &In );
-    	G_fatal_error("Failed opening output vector file %s", output->answer);
+
+    if (1 > Vect_open_new(&Out, output->answer, Vect_is_3d(&In))) {
+	Vect_close(&In);
+	G_fatal_error("Failed opening output vector file %s", output->answer);
     }
 
-	/* Open DEM */
-	
-	demset = G_find_cell2( dem_opt->answer, NULL);
-	if ( demset == NULL ) {
-		G_fatal_error ("DEM file %s not found", dem_opt->answer);
-	}
-	if (1 > (fdrast = G_open_cell_old( dem_opt->answer, demset ))) {
-		G_fatal_error("Failed opening DEM file %s", dem_opt->answer);
-	}
+    /* Open DEM */
 
-	/* Open text file for results if given */
-	
-	if ( txout_opt->answer ) {
-		txout = fopen( txout_opt->answer, "w" );
-	        if ( txout == NULL )
-		   G_fatal_error( _("Cannot open file %s"), txout_opt->answer);
-	}
-					
-	sloppy = atof( sloppy_opt->answer );
-	/* printf("blah %f", sloppy*2.4 ); */
-	
-						
-	/* write history */
+    demset = G_find_cell2(dem_opt->answer, NULL);
+    if (demset == NULL) {
+	G_fatal_error("DEM file %s not found", dem_opt->answer);
+    }
+    if (1 > (fdrast = G_open_cell_old(dem_opt->answer, demset))) {
+	G_fatal_error("Failed opening DEM file %s", dem_opt->answer);
+    }
+
+    /* Open text file for results if given */
+
+    if (txout_opt->answer) {
+	txout = fopen(txout_opt->answer, "w");
+	if (txout == NULL)
+	    G_fatal_error(_("Cannot open file %s"), txout_opt->answer);
+    }
+
+    sloppy = atof(sloppy_opt->answer);
+    /* printf("blah %f", sloppy*2.4 ); */
+
+
+    /* write history */
     /*Vect_copy_head_data( &In, &Out );
-    Vect_hist_copy( &In, &Out );
-    Vect_hist_command( &Out );*/
-	
+       Vect_hist_copy( &In, &Out );
+       Vect_hist_command( &Out ); */
+
 #ifdef COPYBLAH
-	/* this works, we want to continue here and ADD two columns to the &Out */
+    /* this works, we want to continue here and ADD two columns to the &Out */
     /* Copy input to output (from v.clean/main.c) */
     /*G_debug( 1, "Copying vector lines to Output" );
 
-    /* This works for both level 1 and 2 */
-    /*Vect_copy_map_lines ( &In, &Out );	*/ 
- 	/* 0: copy all fields, else field number */
+       /* This works for both level 1 and 2 */
+    /*Vect_copy_map_lines ( &In, &Out );        */
+    /* 0: copy all fields, else field number */
 #endif
 
 
-#ifdef ADDFIELDBLAH /* Create table (from v.net.path/path.c) */
-	/* or: add fields to existing table? */
-	/*							*Map, field, field_name, type */
+#ifdef ADDFIELDBLAH		/* Create table (from v.net.path/path.c) */
+    /* or: add fields to existing table? */
+    /*                                                      *Map, field, field_name, type */
 
-    Fi = Vect_default_field_info ( &Out, field, NULL, GV_1TABLE );
-    Vect_map_add_dblink ( &Out, field, NULL, Fi->table, "cat", Fi->database, Fi->driver);
+    Fi = Vect_default_field_info(&Out, field, NULL, GV_1TABLE);
+    Vect_map_add_dblink(&Out, field, NULL, Fi->table, "cat", Fi->database,
+			Fi->driver);
 
-    driver = db_start_driver_open_database ( Fi->driver, Fi->database );
-	    driver = db_start_driver_open_database ( Fi->driver, Vect_subst_var(Fi->database, &Out) );
-		/* from v.reclass/main.c :
-		*/
+    driver = db_start_driver_open_database(Fi->driver, Fi->database);
+    driver =
+	db_start_driver_open_database(Fi->driver,
+				      Vect_subst_var(Fi->database, &Out));
+    /* from v.reclass/main.c :
+     */
 
-    if ( driver == NULL ) {
-    	G_fatal_error ( "Cannot open database %s by driver %s", Fi->database, Fi->driver );
-	}
+    if (driver == NULL) {
+	G_fatal_error("Cannot open database %s by driver %s", Fi->database,
+		      Fi->driver);
+    }
 
 
-	/* store the statement to create a table with category, basin ID and strahler order of the arc */
-    sprintf ( buf, "CREATE TABLE %s ( cat integer, bsnid integer, sorder integer )", Fi->table );
+    /* store the statement to create a table with category, basin ID and strahler order of the arc */
+    sprintf(buf,
+	    "CREATE TABLE %s ( cat integer, bsnid integer, sorder integer )",
+	    Fi->table);
 
-		/* from v.reclass/main.c :*/
-	    dbString stmt;
-	    db_init_string ( &stmt );
-	    db_set_string ( &stmt, buf);
+    /* from v.reclass/main.c : */
+    dbString stmt;
 
-	    if (db_execute_immediate (driver, &stmt) != DB_OK ) {
-			Vect_close (&Out);
-			db_close_database_shutdown_driver ( driver );
-			G_fatal_error ( "Cannot create table: %s", db_get_string (&stmt) );
-	    }
+    db_init_string(&stmt);
+    db_set_string(&stmt, buf);
 
-	/*
-	sprintf ( buf, "ALTER TABLE %s ADD COLUMN cat integer", Fi->table );
-	sprintf ( buf, "ALTER TABLE %s ADD COLUMN bsnid integer", Fi->table );
-	sprintf ( buf, "ALTER TABLE %s ADD COLUMN sorder integer", Fi->table );
-    */
+    if (db_execute_immediate(driver, &stmt) != DB_OK) {
+	Vect_close(&Out);
+	db_close_database_shutdown_driver(driver);
+	G_fatal_error("Cannot create table: %s", db_get_string(&stmt));
+    }
+
+    /*
+       sprintf ( buf, "ALTER TABLE %s ADD COLUMN cat integer", Fi->table );
+       sprintf ( buf, "ALTER TABLE %s ADD COLUMN bsnid integer", Fi->table );
+       sprintf ( buf, "ALTER TABLE %s ADD COLUMN sorder integer", Fi->table );
+     */
 #endif
 
 #ifdef DBADDCOLUMNBLAH
-	sprintf ( buf, "bsnid");
-    db_set_string ( &sql, buf );
-	column->columnName = sql;
-	column->sqlDataType = 1;
-	sprintf ( buf, "%s", Fi->table );
-    /*db_set_string ( &sql, buf );*/
-	/* why such complicated arguments for db_add_column???
-	dbDriver, dbString, dbColumn*/
-	if ( db_add_column( driver, &sql, column ) != DB_OK ) {
-        db_close_database_shutdown_driver ( driver );
-    	G_fatal_error ( "Cannot add column column in table %s", Fi->table );
-	}
+    sprintf(buf, "bsnid");
+    db_set_string(&sql, buf);
+    column->columnName = sql;
+    column->sqlDataType = 1;
+    sprintf(buf, "%s", Fi->table);
+    /*db_set_string ( &sql, buf ); */
+    /* why such complicated arguments for db_add_column???
+       dbDriver, dbString, dbColumn */
+    if (db_add_column(driver, &sql, column) != DB_OK) {
+	db_close_database_shutdown_driver(driver);
+	G_fatal_error("Cannot add column column in table %s", Fi->table);
+    }
 #endif
 
-	
-	/* execute statement */
+
+    /* execute statement */
 #ifdef CREATEDBLAH
-    sprintf ( buf, "CREATE TABLE %s ( cat integer, bsnid integer, sorder integer )", Fi->table );
-    db_set_string ( &sql, buf );
-    G_debug ( 2, db_get_string ( &sql ) );
-	
-    if (db_execute_immediate (driver, &sql) != DB_OK ) {
-        db_close_database_shutdown_driver ( driver );
-    	G_fatal_error ( "Cannot create table: %s", db_get_string ( &sql )  );
-    } else printf("table created\n");
+    sprintf(buf,
+	    "CREATE TABLE %s ( cat integer, bsnid integer, sorder integer )",
+	    Fi->table);
+    db_set_string(&sql, buf);
+    G_debug(2, db_get_string(&sql));
 
-    if ( db_create_index2(driver, Fi->table, "cat" ) != DB_OK ) {
-    	G_warning ( "Cannot create index" );
-    } else printf("index created\n");
-	
-    if (db_grant_on_table (driver, Fi->table, DB_PRIV_SELECT, DB_GROUP|DB_PUBLIC ) != DB_OK ) {
-    	G_fatal_error ( "Cannot grant privileges on table %s", Fi->table );
-    } else printf("privileges granted\n");
+    if (db_execute_immediate(driver, &sql) != DB_OK) {
+	db_close_database_shutdown_driver(driver);
+	G_fatal_error("Cannot create table: %s", db_get_string(&sql));
+    }
+    else
+	printf("table created\n");
+
+    if (db_create_index2(driver, Fi->table, "cat") != DB_OK) {
+	G_warning("Cannot create index");
+    }
+    else
+	printf("index created\n");
+
+    if (db_grant_on_table
+	(driver, Fi->table, DB_PRIV_SELECT, DB_GROUP | DB_PUBLIC) != DB_OK) {
+	G_fatal_error("Cannot grant privileges on table %s", Fi->table);
+    }
+    else
+	printf("privileges granted\n");
 #endif
 
-	nnodes = Vect_get_num_nodes ( &In );
-	nlines = Vect_get_num_lines ( &In );
-	G_debug( 1, "Number of lines: %d", nlines);
-	G_debug( 1, "Number of nodes: %d", nnodes);
+    nnodes = Vect_get_num_nodes(&In);
+    nlines = Vect_get_num_lines(&In);
+    G_debug(1, "Number of lines: %d", nlines);
+    G_debug(1, "Number of nodes: %d", nnodes);
 
-	/* Create table to store ordering */
-	dbbuf = (DBBUF *) G_malloc ( (nlines + 1) * ((int)sizeof (DBBUF)) );
-	nodev = (NODEV *) G_malloc ( (nnodes + 1) * ((int)sizeof (NODEV)) );
-	
-	/* initialize properly */
-	for ( line=1; line <= nlines; line++) {
-		dbbuf[line].category = dbbuf[line].line = dbbuf[line].bsnid = dbbuf[line].sorder = 0;
-	}
-	for ( node=1; node <= nnodes; node++) {
-		nodev[node].node = nodev[node].degree = nodev[node].visited = 0;
-	}
+    /* Create table to store ordering */
+    dbbuf = (DBBUF *) G_malloc((nlines + 1) * ((int)sizeof(DBBUF)));
+    nodev = (NODEV *) G_malloc((nnodes + 1) * ((int)sizeof(NODEV)));
 
-	ntrees = (int)StrahForestToTrees( &In, &Out, dbbuf );
-	G_debug( 1, "Number of trees: %d", ntrees);
-	
-	StrahFindLeaves( &In, dbbuf, nodev, ntrees, fdrast );
+    /* initialize properly */
+    for (line = 1; line <= nlines; line++) {
+	dbbuf[line].category = dbbuf[line].line = dbbuf[line].bsnid =
+	    dbbuf[line].sorder = 0;
+    }
+    for (node = 1; node <= nnodes; node++) {
+	nodev[node].node = nodev[node].degree = nodev[node].visited = 0;
+    }
 
-	G_debug(2, "dbbuf after FindLeaves:\nline\tbsnid\tsorder");
-	for ( line=1; line<=nlines; line++) {
-		sprintf( buf, "%d\t%d\t%d\n",dbbuf[line].line, dbbuf[line].bsnid, dbbuf[line].sorder);
-		G_debug(2, "%s", buf);
-	}
-	G_debug(2, "nodev after FindLeaves:\nnode\tdegree\tvisited");
-	for ( node=1; node<=nnodes; node++) {
-		sprintf( buf, "%d\t%d\t%d\n",(int)nodev[node].node, nodev[node].degree, nodev[node].visited);
-		G_debug(2, "%s", buf);
-	}
+    ntrees = (int)StrahForestToTrees(&In, &Out, dbbuf);
+    G_debug(1, "Number of trees: %d", ntrees);
 
-	StrahOrder( &In, dbbuf, nodev );
-	
-	G_debug(2, "dbbuf after StrahOrder:\nline\tbsnid\tsorder\n");
-	for ( line=1; line<=nlines; line++) {
-		sprintf( buf, "%d\t%d\t%d\n",dbbuf[line].line, dbbuf[line].bsnid, dbbuf[line].sorder);
-		G_debug(2, "%s", buf);
-	}
-	G_debug(2, "nodev after StrahOrder:\nnode\tdegree\tvisited\n");
-	for ( node=1; node<=nnodes; node++) {
-		sprintf( buf, "%d\t%d\t%d\n",(int)nodev[node].node, nodev[node].degree, nodev[node].visited);
-		G_debug(2, "%s", buf);
-	}
+    StrahFindLeaves(&In, dbbuf, nodev, ntrees, fdrast);
 
+    G_debug(2, "dbbuf after FindLeaves:\nline\tbsnid\tsorder");
+    for (line = 1; line <= nlines; line++) {
+	sprintf(buf, "%d\t%d\t%d\n", dbbuf[line].line, dbbuf[line].bsnid,
+		dbbuf[line].sorder);
+	G_debug(2, "%s", buf);
+    }
+    G_debug(2, "nodev after FindLeaves:\nnode\tdegree\tvisited");
+    for (node = 1; node <= nnodes; node++) {
+	sprintf(buf, "%d\t%d\t%d\n", (int)nodev[node].node,
+		nodev[node].degree, nodev[node].visited);
+	G_debug(2, "%s", buf);
+    }
+
+    StrahOrder(&In, dbbuf, nodev);
+
+    G_debug(2, "dbbuf after StrahOrder:\nline\tbsnid\tsorder\n");
+    for (line = 1; line <= nlines; line++) {
+	sprintf(buf, "%d\t%d\t%d\n", dbbuf[line].line, dbbuf[line].bsnid,
+		dbbuf[line].sorder);
+	G_debug(2, "%s", buf);
+    }
+    G_debug(2, "nodev after StrahOrder:\nnode\tdegree\tvisited\n");
+    for (node = 1; node <= nnodes; node++) {
+	sprintf(buf, "%d\t%d\t%d\n", (int)nodev[node].node,
+		nodev[node].degree, nodev[node].visited);
+	G_debug(2, "%s", buf);
+    }
+
 #ifdef WRITEDBLAH
-	/* and write DB records */
-	db_begin_transaction( driver );
+    /* and write DB records */
+    db_begin_transaction(driver);
 
-	for ( line=1; line<=nlines; line++) {
-   		sprintf (buf, "insert into %s values ( %d, %d, %d )", Fi->table, line, dbbuf[line].bsnid, dbbuf[line].sorder );
-   		db_set_string ( &sql, buf );
-  		/* G_debug ( 3, db_get_string ( &sql ) ); */
-		if (db_execute_immediate (driver, &sql) != DB_OK ) {
-			db_close_database_shutdown_driver ( driver );
-			G_fatal_error ( "Insert new row: %s", db_get_string ( &sql )  );
-		}
+    for (line = 1; line <= nlines; line++) {
+	sprintf(buf, "insert into %s values ( %d, %d, %d )", Fi->table, line,
+		dbbuf[line].bsnid, dbbuf[line].sorder);
+	db_set_string(&sql, buf);
+	/* G_debug ( 3, db_get_string ( &sql ) ); */
+	if (db_execute_immediate(driver, &sql) != DB_OK) {
+	    db_close_database_shutdown_driver(driver);
+	    G_fatal_error("Insert new row: %s", db_get_string(&sql));
 	}
+    }
 
-	db_commit_transaction( driver );
+    db_commit_transaction(driver);
 
-    db_close_database_shutdown_driver( driver );
+    db_close_database_shutdown_driver(driver);
 #endif
-   
-   	/* writing StrahOrder instead of category in the output */	
-   
-   for ( line=1; line<=nlines; line++) {
-	type=Vect_read_line(&In, Points, Cats, line);
-	ret = Vect_cat_del (Cats, field);
+
+    /* writing StrahOrder instead of category in the output */
+
+    for (line = 1; line <= nlines; line++) {
+	type = Vect_read_line(&In, Points, Cats, line);
+	ret = Vect_cat_del(Cats, field);
 	G_debug(4, "deleted categories, ret=%d", ret);
-	Vect_cat_set (Cats, field, dbbuf[line].sorder);
-   	Vect_write_line ( &Out, type, Points, Cats );
+	Vect_cat_set(Cats, field, dbbuf[line].sorder);
+	Vect_write_line(&Out, type, Points, Cats);
 	G_debug(4, "category written for line %d", line);
-   }
+    }
 
-	/* assign category values */
-   
-   for ( line=1; line<=nlines; line++) {
-	dbbuf[line].category = Vect_get_line_cat ( &In, line, field );
-	G_debug(4, "added category %d for line %d", dbbuf[line].category, dbbuf[line].line);
-   }
-    
-	/* Write text file for results if given */
-    
-    if ( txout_opt->answer )
-		StrahWriteToFile( dbbuf, nlines, txout );
+    /* assign category values */
 
-    Vect_close( &In );
-    G_close_cell( fdrast );
+    for (line = 1; line <= nlines; line++) {
+	dbbuf[line].category = Vect_get_line_cat(&In, line, field);
+	G_debug(4, "added category %d for line %d", dbbuf[line].category,
+		dbbuf[line].line);
+    }
 
-    Vect_build( &Out );
-    Vect_close( &Out );
-	
-    if ( txout_opt->answer )
-	    fclose( txout );
+    /* Write text file for results if given */
 
-	return (EXIT_SUCCESS);
+    if (txout_opt->answer)
+	StrahWriteToFile(dbbuf, nlines, txout);
+
+    Vect_close(&In);
+    G_close_cell(fdrast);
+
+    Vect_build(&Out);
+    Vect_close(&Out);
+
+    if (txout_opt->answer)
+	fclose(txout);
+
+    return (EXIT_SUCCESS);
 }


Property changes on: grass-addons/vector/v.strahler/main.c
___________________________________________________________________
Added: svn:mime-type
   + text/x-csrc


Property changes on: grass-addons/vector/v.strahler/r.broscoe.sh
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/x-sh
Added: svn:eol-style
   + native

Modified: grass-addons/vector/v.strahler/r.broscoe.sh.html
===================================================================
--- grass-addons/vector/v.strahler/r.broscoe.sh.html	2009-07-14 05:49:26 UTC (rev 38406)
+++ grass-addons/vector/v.strahler/r.broscoe.sh.html	2009-07-14 05:52:42 UTC (rev 38407)
@@ -101,7 +101,7 @@
 Ivan Marchesini and Annalisa Minelli, Univ. Perugia. <br>
 
 <p>
-<i>Last changed: $Date: 2007/12/12 14:54:40 $</i>
+<i>Last changed: $Date$</i>
 <HR>
 <P><a href="index.html">Main index</a> - <a href="raster.html">raster index</a> - <a href="full_index.html">Full index</a></P>
 </body>


Property changes on: grass-addons/vector/v.strahler/r.broscoe.sh.html
___________________________________________________________________
Added: svn:mime-type
   + text/html
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native


Property changes on: grass-addons/vector/v.strahler/r.strahler.sh
___________________________________________________________________
Added: svn:mime-type
   + text/x-sh
Added: svn:eol-style
   + native

Modified: grass-addons/vector/v.strahler/r.strahler.sh.html
===================================================================
--- grass-addons/vector/v.strahler/r.strahler.sh.html	2009-07-14 05:49:26 UTC (rev 38406)
+++ grass-addons/vector/v.strahler/r.strahler.sh.html	2009-07-14 05:52:42 UTC (rev 38407)
@@ -36,4 +36,4 @@
 
 
 <p>
-<i>Last changed: $Date: 2007/12/12 14:54:40 $</i>
+<i>Last changed: $Date$</i>


Property changes on: grass-addons/vector/v.strahler/r.strahler.sh.html
___________________________________________________________________
Added: svn:mime-type
   + text/html
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native

Modified: grass-addons/vector/v.strahler/strahler.c
===================================================================
--- grass-addons/vector/v.strahler/strahler.c	2009-07-14 05:49:26 UTC (rev 38406)
+++ grass-addons/vector/v.strahler/strahler.c	2009-07-14 05:52:42 UTC (rev 38407)
@@ -1,210 +1,224 @@
 #include "strahler.h"
 
 /* Find Leaves of tree and distinguish outlet from sources */
-int StrahFindLeaves( struct Map_info *In, DBBUF *dbbuf, NODEV *nodev, int ntrees, int fdrast )
+int StrahFindLeaves(struct Map_info *In, DBBUF * dbbuf, NODEV * nodev,
+		    int ntrees, int fdrast)
 {
-	int nnodes, degr, aline, node, unode, dnode, tree, outlet;
-	double x, y, z, z_init;
+    int nnodes, degr, aline, node, unode, dnode, tree, outlet;
+    double x, y, z, z_init;
 
-	int n;
-	
-	struct Cell_head window;
-	INTERP_TYPE method = NEAREST;
-	
-	OUTLETS *outlets;
-	
-	nnodes = Vect_get_num_nodes( In );
+    int n;
 
-	z = z_init = 27000000.0; 	/* is it safe to initialize lowest z with the height of Olympus Mons above Martian Datum in millimeters? */
-	
-	outlets = (OUTLETS *) G_malloc ( (ntrees + 1) * ((int)sizeof (OUTLETS)) );
-	
-	/* initialize outlet table properly */
-	for ( n=1; n <= ntrees; n++ ) {
-		outlets[n].z = z_init;
-		outlets[n].leaf = 0;
-	}
+    struct Cell_head window;
+    INTERP_TYPE method = NEAREST;
 
-	G_debug( 1, "Reached StrahFindLeaves with %d trees", ntrees);
-	
-	G_get_window( &window );
-	G_debug( 2, "window: N %f S %f W %f E %f\n", window.north,window.south,window.west,window.east); 
-	
-	G_debug( 2, "%d nodes in map", nnodes);
-	for ( node = 1; node <= nnodes; node++ ) {
-		/*degr = Vect_get_node_n_lines( In, node );*/
-		degr = StrahGetDegr( In, node );
-		nodev[node].node = node;
-		nodev[node].degree = degr;
+    OUTLETS *outlets;
 
-		G_debug( 4, "node %d: degr=%d", node, degr );
+    nnodes = Vect_get_num_nodes(In);
 
-		if ( degr == 1 ) {
-			unode = node;
-			nodev[node].visited = 1;	/*set the "visited" parameter to 1... can't be less*/
-		    /*aline = abs( Vect_get_node_line( In, unode, 0 ) );*/
-			aline = abs( StrahGetNodeLine( In, unode, 0 ) );
-			/*Vect_get_line_nodes( In, aline, &unode, &dnode);*/
-			/* these are not necessarily up-node and down-node but we need not distinguish here... */
-			dbbuf[aline].sorder = 1;
-			/* no, do not visit yet 
-			nodev[node].visited += 1;
-			*/
-			/*
-			nodev[unode].visited += 1;
-			nodev[dnode].visited += 1;
-			*/
-			/* get z value or DEM value under node here, remember lowest */
-			if ( Vect_is_3d( In ) ) {
-				Vect_get_node_coor( In, node, &x, &y, &z );
-			} else {
-				Vect_get_node_coor( In, node, &x, &y, NULL );
-				z = (double)G_get_raster_sample( fdrast, &window, NULL, y, x, 0, method );
-			}
+    z = z_init = 27000000.0;	/* is it safe to initialize lowest z with the height of Olympus Mons above Martian Datum in millimeters? */
 
-			G_debug( 5, "fdrast=%d node=%d y=%f x=%f z=%f\n", fdrast, node, y, x, z );
+    outlets = (OUTLETS *) G_malloc((ntrees + 1) * ((int)sizeof(OUTLETS)));
 
-			tree = dbbuf[aline].bsnid;
-			if ( z < outlets[tree].z ) {
-				outlets[tree].z = z;
-				outlets[tree].leaf = aline;
-			}
-		}
+    /* initialize outlet table properly */
+    for (n = 1; n <= ntrees; n++) {
+	outlets[n].z = z_init;
+	outlets[n].leaf = 0;
+    }
+
+    G_debug(1, "Reached StrahFindLeaves with %d trees", ntrees);
+
+    G_get_window(&window);
+    G_debug(2, "window: N %f S %f W %f E %f\n", window.north, window.south,
+	    window.west, window.east);
+
+    G_debug(2, "%d nodes in map", nnodes);
+    for (node = 1; node <= nnodes; node++) {
+	/*degr = Vect_get_node_n_lines( In, node ); */
+	degr = StrahGetDegr(In, node);
+	nodev[node].node = node;
+	nodev[node].degree = degr;
+
+	G_debug(4, "node %d: degr=%d", node, degr);
+
+	if (degr == 1) {
+	    unode = node;
+	    nodev[node].visited = 1;	/*set the "visited" parameter to 1... can't be less */
+	    /*aline = abs( Vect_get_node_line( In, unode, 0 ) ); */
+	    aline = abs(StrahGetNodeLine(In, unode, 0));
+	    /*Vect_get_line_nodes( In, aline, &unode, &dnode); */
+	    /* these are not necessarily up-node and down-node but we need not distinguish here... */
+	    dbbuf[aline].sorder = 1;
+	    /* no, do not visit yet 
+	       nodev[node].visited += 1;
+	     */
+	    /*
+	       nodev[unode].visited += 1;
+	       nodev[dnode].visited += 1;
+	     */
+	    /* get z value or DEM value under node here, remember lowest */
+	    if (Vect_is_3d(In)) {
+		Vect_get_node_coor(In, node, &x, &y, &z);
+	    }
+	    else {
+		Vect_get_node_coor(In, node, &x, &y, NULL);
+		z = (double)G_get_raster_sample(fdrast, &window, NULL, y, x,
+						0, method);
+	    }
+
+	    G_debug(5, "fdrast=%d node=%d y=%f x=%f z=%f\n", fdrast, node, y,
+		    x, z);
+
+	    tree = dbbuf[aline].bsnid;
+	    if (z < outlets[tree].z) {
+		outlets[tree].z = z;
+		outlets[tree].leaf = aline;
+	    }
 	}
-	/* reset outlets to 0 */
-	for ( n=1; n<=ntrees; n++) {
-		G_debug( 2, "outlet tree %d: line %d with %f", n, outlets[n].leaf, outlets[n].z );
-		outlet = outlets[n].leaf;
-		dbbuf[outlet].sorder = 0;
-		/*
-		Vect_get_line_nodes( In, outlet, &unode, &dnode);
-		nodev[unode].visited = 0;
-		nodev[dnode].visited = 0;
-		*/
-	}
-	return 1;
+    }
+    /* reset outlets to 0 */
+    for (n = 1; n <= ntrees; n++) {
+	G_debug(2, "outlet tree %d: line %d with %f", n, outlets[n].leaf,
+		outlets[n].z);
+	outlet = outlets[n].leaf;
+	dbbuf[outlet].sorder = 0;
+	/*
+	   Vect_get_line_nodes( In, outlet, &unode, &dnode);
+	   nodev[unode].visited = 0;
+	   nodev[dnode].visited = 0;
+	 */
+    }
+    return 1;
 }
 
 /* assign strahler order */
-int StrahOrder( struct Map_info *In, DBBUF *dbbuf, NODEV *nodev )
+int StrahOrder(struct Map_info *In, DBBUF * dbbuf, NODEV * nodev)
 {
-	int nlines, line;
-	int fnode, tnode, unode, dnode;					/* from-, to-, up-, down- node */
-	int degr, d, aline, aorder;					/* find adjacent lines */
-	int corder, norder, dorder, dline;				/* assign order */
-	int cline, rfinish;						/* follow one line until this stop-condition is 1 */
-	
-	struct dbbuf;
-	struct nodev;
+    int nlines, line;
+    int fnode, tnode, unode, dnode;	/* from-, to-, up-, down- node */
+    int degr, d, aline, aorder;	/* find adjacent lines */
+    int corder, norder, dorder, dline;	/* assign order */
+    int cline, rfinish;		/* follow one line until this stop-condition is 1 */
 
-	nlines =  Vect_get_num_lines ( In );
+    struct dbbuf;
+    struct nodev;
 
-	G_debug( 1, "reached StrahOrder");
+    nlines = Vect_get_num_lines(In);
 
-	for (line = 1; line <= nlines; line++) { 
-		if (dbbuf[line].sorder == 1) {							/* get lines of order 1 */
-															
-			cline = line;								/* and start run downwards */
-			rfinish = 0;
-			while (rfinish == 0) {
-				G_debug( 3, "reached line %d", cline);
-				
-				Vect_get_line_nodes( In, cline, &fnode, &tnode);		/* and their nodes */
+    G_debug(1, "reached StrahOrder");
 
+    for (line = 1; line <= nlines; line++) {
+	if (dbbuf[line].sorder == 1) {	/* get lines of order 1 */
+
+	    cline = line;	/* and start run downwards */
+	    rfinish = 0;
+	    while (rfinish == 0) {
+		G_debug(3, "reached line %d", cline);
+
+		Vect_get_line_nodes(In, cline, &fnode, &tnode);	/* and their nodes */
+
 		/**** BAUSTELLE ****/
-				/* check nodes - we do not rely on flow direction */	
-				if ( nodev[fnode].visited == 1 ) {
-					unode = fnode;
-					dnode = tnode;
-				} else {
-					unode = tnode;
-					dnode = fnode;
-				}
-				
-				/*
-				if (nodev[fnode].visited == nodev[tnode].visited) {
-					printf("Line %d: both nodes are visited or not - what now?\n", line);
-				} else if (nodev[fnode].visited == 0) {
-					node = fnode;
-				} else {
-					node = tnode;
-				}
-				*/
+		/* check nodes - we do not rely on flow direction */
+		if (nodev[fnode].visited == 1) {
+		    unode = fnode;
+		    dnode = tnode;
+		}
+		else {
+		    unode = tnode;
+		    dnode = fnode;
+		}
 
-				/* 
-				if ( (nodev[fnode].degree - nodev[fnode].visited) < (nodev[tnode].degree - nodev[tnode].visited) ) {
-					unode = fnode;
-					dnode = tnode;
-				} else if ( (nodev[fnode].degree - nodev[fnode].visited) > (nodev[tnode].degree - nodev[tnode].visited) ) {
-					unode = tnode;
-					dnode = fnode;
-				} else {
-					G_message("Line %d: nodes have same diff(degree,visited) - what now?\n", cline);
-				*/
-				/* ok, what now?
-					- occurs when leaf meets node with norder==0 -> visit nodes and continue
-					- or: is outlet -> assign order
-					*/
-					/* continue? */
-				/*
-				printf("visiting tnode %d and fnode %d for line %d and break\n\n", tnode, fnode, cline);
-					nodev[tnode].visited += 1;
-					nodev[fnode].visited += 1;
-					break;
-				}
-				*/
+		/*
+		   if (nodev[fnode].visited == nodev[tnode].visited) {
+		   printf("Line %d: both nodes are visited or not - what now?\n", line);
+		   } else if (nodev[fnode].visited == 0) {
+		   node = fnode;
+		   } else {
+		   node = tnode;
+		   }
+		 */
 
-				G_debug( 3, "unode is %d and dnode is %d", unode, dnode);
-				
-				/*degr = Vect_get_node_n_lines ( In, dnode );		 use downward node */
-				degr = StrahGetDegr( In, dnode );
+		/* 
+		   if ( (nodev[fnode].degree - nodev[fnode].visited) < (nodev[tnode].degree - nodev[tnode].visited) ) {
+		   unode = fnode;
+		   dnode = tnode;
+		   } else if ( (nodev[fnode].degree - nodev[fnode].visited) > (nodev[tnode].degree - nodev[tnode].visited) ) {
+		   unode = tnode;
+		   dnode = fnode;
+		   } else {
+		   G_message("Line %d: nodes have same diff(degree,visited) - what now?\n", cline);
+		 */
+		/* ok, what now?
+		   - occurs when leaf meets node with norder==0 -> visit nodes and continue
+		   - or: is outlet -> assign order
+		 */
+		/* continue? */
+		/*
+		   printf("visiting tnode %d and fnode %d for line %d and break\n\n", tnode, fnode, cline);
+		   nodev[tnode].visited += 1;
+		   nodev[fnode].visited += 1;
+		   break;
+		   }
+		 */
 
-				G_debug( 4, "deg for dnode %d is %d", dnode, degr );
-				
-				corder = dbbuf[cline].sorder;			/* current order - result won't be less than that */
-				norder = dorder = 0;				/* no order - how many lines have none?, highest order of others */
-				for (d = 0; d < degr; d++) {
-					/*aline = abs( Vect_get_node_line ( In, dnode, d ) );*/
-					aline = abs( StrahGetNodeLine( In, dnode, d ) );
-					G_debug( 4, "line %d at dnode %d is %d", d, dnode, aline);
-					if (aline != cline) {					/* we don't need the line we come from */
-						aorder = dbbuf[aline].sorder;
-						if (aorder == 0) {
-							norder++;
-							dline = aline;					/* downward line */
-						} else if (aorder > dorder) {
-							dorder = aorder;					/* find highest order */
-						}
-					}
-				}
-                             
-				if (norder > 1 || norder == 0) {	/* if (norder > 1: node indeterminate OR norder == 0 : subtree finished) */
-					G_debug( 3, "Finished run at line %d because norder=%d", cline, norder);
-					G_debug( 4, "visiting unode %d for line %d\n", unode, cline);
-					nodev[unode].visited += 1;	/* visit unode, for the sake of completeness */
-					rfinish = 1;			/* finish this run */
-					
-				} else {							/* or */
-				    if (dorder > corder) {
-						;					/* assign highest order of alines */
-					} else if (dorder < corder) {
-						dorder=corder;					/* or keep order of cline */
-					} else {
-						dorder++;					/* or raise order by one */
-					}
-					
-					dbbuf[dline].sorder = dorder;				/* assign order */
-			
-					G_debug( 4, "visiting dnode %d and unode %d for line %d", dnode, unode, cline);
-					nodev[dnode].visited += 1;				/* visit dnode */
-					nodev[unode].visited += 1;				/* visit unode, for the sake of completeness */
+		G_debug(3, "unode is %d and dnode is %d", unode, dnode);
 
-					cline = dline;						/* and continue with this line */
-				
-					G_debug( 3, "StrahOrder for dline %d: %d", dline, dorder);
-				}
-			} /* while */
+		/*degr = Vect_get_node_n_lines ( In, dnode );            use downward node */
+		degr = StrahGetDegr(In, dnode);
+
+		G_debug(4, "deg for dnode %d is %d", dnode, degr);
+
+		corder = dbbuf[cline].sorder;	/* current order - result won't be less than that */
+		norder = dorder = 0;	/* no order - how many lines have none?, highest order of others */
+		for (d = 0; d < degr; d++) {
+		    /*aline = abs( Vect_get_node_line ( In, dnode, d ) ); */
+		    aline = abs(StrahGetNodeLine(In, dnode, d));
+		    G_debug(4, "line %d at dnode %d is %d", d, dnode, aline);
+		    if (aline != cline) {	/* we don't need the line we come from */
+			aorder = dbbuf[aline].sorder;
+			if (aorder == 0) {
+			    norder++;
+			    dline = aline;	/* downward line */
+			}
+			else if (aorder > dorder) {
+			    dorder = aorder;	/* find highest order */
+			}
+		    }
 		}
+
+		if (norder > 1 || norder == 0) {	/* if (norder > 1: node indeterminate OR norder == 0 : subtree finished) */
+		    G_debug(3, "Finished run at line %d because norder=%d",
+			    cline, norder);
+		    G_debug(4, "visiting unode %d for line %d\n", unode,
+			    cline);
+		    nodev[unode].visited += 1;	/* visit unode, for the sake of completeness */
+		    rfinish = 1;	/* finish this run */
+
+		}
+		else {		/* or */
+		    if (dorder > corder) {
+			;	/* assign highest order of alines */
+		    }
+		    else if (dorder < corder) {
+			dorder = corder;	/* or keep order of cline */
+		    }
+		    else {
+			dorder++;	/* or raise order by one */
+		    }
+
+		    dbbuf[dline].sorder = dorder;	/* assign order */
+
+		    G_debug(4, "visiting dnode %d and unode %d for line %d",
+			    dnode, unode, cline);
+		    nodev[dnode].visited += 1;	/* visit dnode */
+		    nodev[unode].visited += 1;	/* visit unode, for the sake of completeness */
+
+		    cline = dline;	/* and continue with this line */
+
+		    G_debug(3, "StrahOrder for dline %d: %d", dline, dorder);
+		}
+	    }			/* while */
 	}
-	return 1;
+    }
+    return 1;
 }


Property changes on: grass-addons/vector/v.strahler/strahler.c
___________________________________________________________________
Added: svn:mime-type
   + text/x-csrc

Modified: grass-addons/vector/v.strahler/strahler.h
===================================================================
--- grass-addons/vector/v.strahler/strahler.h	2009-07-14 05:49:26 UTC (rev 38406)
+++ grass-addons/vector/v.strahler/strahler.h	2009-07-14 05:52:42 UTC (rev 38407)
@@ -8,88 +8,93 @@
 #include "grass/dbmi.h"
 
 /*! \typedef DBBUF
-    \brief Buffer to keep track of assigned tree and Strahler order for each line
-*/
+   \brief Buffer to keep track of assigned tree and Strahler order for each line
+ */
 
 /*! \typedef NODEV
-    \brief Buffer to keep track of valency for each node
-*/
+   \brief Buffer to keep track of valency for each node
+ */
 
 /*! \typedef OUTLETS
-    \brief Buffer to determine lowest leaf of each tree
-*/
+   \brief Buffer to determine lowest leaf of each tree
+ */
 
-typedef struct { /* collect lines in Strahler order */
-	int category;
-	int  line;     /* line number */
-	int  bsnid;     /* basin ID */
-    int  sorder;     /* Strahler order */
+typedef struct
+{				/* collect lines in Strahler order */
+    int category;
+    int line;			/* line number */
+    int bsnid;			/* basin ID */
+    int sorder;			/* Strahler order */
 } DBBUF;
 
-typedef struct { /* visited nodes */
-	int  node;	/* node number */
-	int  degree;  /* valency */
-	int  visited; /* is between 0 and degr(node) */
+typedef struct
+{				/* visited nodes */
+    int node;			/* node number */
+    int degree;			/* valency */
+    int visited;		/* is between 0 and degr(node) */
 } NODEV;
 
-typedef struct {	/* keep track of lowest leaf (=outlet) of each tree */
-	double z;		/* z-value of leaf */
-	int    leaf;		/* line-id of outlet leaf */
+typedef struct
+{				/* keep track of lowest leaf (=outlet) of each tree */
+    double z;			/* z-value of leaf */
+    int leaf;			/* line-id of outlet leaf */
 } OUTLETS;
 
 /* in forest2tree.c */
 /*! \fn int StrahForestToTrees( struct Map_info *In, struct Map_info *Out, DBBUF *dbbuf );
-    \brief Returns the number of trees in *In
-    \param *In The input map
-    \param *Out The output map
-    \param *dbbuf The buffer table for line orders
-*/
+   \brief Returns the number of trees in *In
+   \param *In The input map
+   \param *Out The output map
+   \param *dbbuf The buffer table for line orders
+ */
 
 
 /* in strahler.c */
 /*! \fn int StrahFindLeaves( struct Map_info *In, DBBUF *dbbuf, NODEV *nodev, int ntrees, int fdrast );
-    \brief Identifies all leaves of each tree and the one that lies lowest
-    \param *In The input map
-    \param *dbbuf The buffer table for line orders
-    \param *nodev The buffer table for node valency
-    \param ntrees Number of trees in map
-    \param fdrast File descriptor of DEM raster map
-*/
+   \brief Identifies all leaves of each tree and the one that lies lowest
+   \param *In The input map
+   \param *dbbuf The buffer table for line orders
+   \param *nodev The buffer table for node valency
+   \param ntrees Number of trees in map
+   \param fdrast File descriptor of DEM raster map
+ */
 
 /*! \fn int StrahOrder( struct Map_info *In, DBBUF *dbbuf, NODEV *nodev );
-    \brief Calculates the Strahler order of each line
-    \param *In The input map
-    \param *dbbuf The buffer table for line orders
-    \param *nodev The buffer table for node valency
-*/
+   \brief Calculates the Strahler order of each line
+   \param *In The input map
+   \param *dbbuf The buffer table for line orders
+   \param *nodev The buffer table for node valency
+ */
 
 
 /* in write.c */
 /*! \fn int StrahWriteToFile( DBBUF *dbbuf, int nlines, FILE *txout );
-    \brief Writes ASCII representation of calculated order to file
-    \param *dbbuf The buffer table for line orders
-    \param nlines Number of lines in *In map
-	\param *txout ASCII output file name
-*/
+   \brief Writes ASCII representation of calculated order to file
+   \param *dbbuf The buffer table for line orders
+   \param nlines Number of lines in *In map
+   \param *txout ASCII output file name
+ */
 
 
 /* in helper.c */
 /*! \fn int StrahGetDegr( struct Map_info *In, int node );
-    \brief Get degree of node (for sloppy mode)
-    \param *In The input map
-	\param node Node number in *In
-*/
+   \brief Get degree of node (for sloppy mode)
+   \param *In The input map
+   \param node Node number in *In
+ */
 
 /*! \fn int StrahNodeLine( struct Map_info *In, int node, int d );
-    \brief Get lines connected in node (for sloppy mode)
-    \param *In The input map
-	\param node Node number in *In
-	\param d n-th line connected to node
-*/
+   \brief Get lines connected in node (for sloppy mode)
+   \param *In The input map
+   \param node Node number in *In
+   \param d n-th line connected to node
+ */
 
-int StrahForestToTrees( struct Map_info *In, struct Map_info *Out, DBBUF *dbbuf );
-int StrahFindLeaves( struct Map_info *In, DBBUF *dbbuf, NODEV *nodev, int ntrees, int fdrast );
-int StrahOrder( struct Map_info *In, DBBUF *dbbuf, NODEV *nodev );
-int StrahWriteToFile( DBBUF *dbbuf, int nlines, FILE *txout );
-int StrahGetDegr( struct Map_info *In, int node );
-int StrahGetNodeLine( struct Map_info *In, int node, int d );
+int StrahForestToTrees(struct Map_info *In, struct Map_info *Out,
+		       DBBUF * dbbuf);
+int StrahFindLeaves(struct Map_info *In, DBBUF * dbbuf, NODEV * nodev,
+		    int ntrees, int fdrast);
+int StrahOrder(struct Map_info *In, DBBUF * dbbuf, NODEV * nodev);
+int StrahWriteToFile(DBBUF * dbbuf, int nlines, FILE * txout);
+int StrahGetDegr(struct Map_info *In, int node);
+int StrahGetNodeLine(struct Map_info *In, int node, int d);


Property changes on: grass-addons/vector/v.strahler/strahler.h
___________________________________________________________________
Added: svn:mime-type
   + text/x-chdr

Modified: grass-addons/vector/v.strahler/v.mainchannel.html
===================================================================
--- grass-addons/vector/v.strahler/v.mainchannel.html	2009-07-14 05:49:26 UTC (rev 38406)
+++ grass-addons/vector/v.strahler/v.mainchannel.html	2009-07-14 05:52:42 UTC (rev 38407)
@@ -26,4 +26,4 @@
 
 
 <p>
-<i>Last changed: $Date: 2007/03/03 14:54:40 $</i>
+<i>Last changed: $Date$</i>


Property changes on: grass-addons/vector/v.strahler/v.mainchannel.html
___________________________________________________________________
Added: svn:mime-type
   + text/html
Added: svn:keywords
   + Author Date Id
Added: svn:eol-style
   + native

Modified: grass-addons/vector/v.strahler/write.c
===================================================================
--- grass-addons/vector/v.strahler/write.c	2009-07-14 05:49:26 UTC (rev 38406)
+++ grass-addons/vector/v.strahler/write.c	2009-07-14 05:52:42 UTC (rev 38407)
@@ -1,14 +1,15 @@
 #include "strahler.h"
 
-int StrahWriteToFile( DBBUF *dbbuf, int nlines, FILE *txout )
+int StrahWriteToFile(DBBUF * dbbuf, int nlines, FILE * txout)
 {
-	int line;
+    int line;
 
-	G_debug( 1, "Reached WriteToFile - writing %d lines", nlines);
-	fprintf( txout, "== Result of Strahler Order ==\n" );
-	fprintf( txout, " Category:   Line:   Basin:    Order:\n" );		/*added cat column*/
-	for ( line=1; line<=nlines; line++) {
-		fprintf( txout, "%9d%8d%8d%8d\n", dbbuf[line].category, dbbuf[line].line, dbbuf[line].bsnid, dbbuf[line].sorder );
-	}
-	return 1;
+    G_debug(1, "Reached WriteToFile - writing %d lines", nlines);
+    fprintf(txout, "== Result of Strahler Order ==\n");
+    fprintf(txout, " Category:   Line:   Basin:    Order:\n");	/*added cat column */
+    for (line = 1; line <= nlines; line++) {
+	fprintf(txout, "%9d%8d%8d%8d\n", dbbuf[line].category,
+		dbbuf[line].line, dbbuf[line].bsnid, dbbuf[line].sorder);
+    }
+    return 1;
 }


Property changes on: grass-addons/vector/v.strahler/write.c
___________________________________________________________________
Added: svn:mime-type
   + text/x-csrc



More information about the grass-commit mailing list