[GRASS-SVN] r40253 - grass-addons/raster/r.stream.pos

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jan 5 08:59:11 EST 2010


Author: jarekj71
Date: 2010-01-05 08:59:11 -0500 (Tue, 05 Jan 2010)
New Revision: 40253

Added:
   grass-addons/raster/r.stream.pos/Makefile
   grass-addons/raster/r.stream.pos/description.html
   grass-addons/raster/r.stream.pos/global.h
   grass-addons/raster/r.stream.pos/io.c
   grass-addons/raster/r.stream.pos/main.c
   grass-addons/raster/r.stream.pos/pos.c
   grass-addons/raster/r.stream.pos/r.stream.pos.tmp.html
Log:


Added: grass-addons/raster/r.stream.pos/Makefile
===================================================================
--- grass-addons/raster/r.stream.pos/Makefile	                        (rev 0)
+++ grass-addons/raster/r.stream.pos/Makefile	2010-01-05 13:59:11 UTC (rev 40253)
@@ -0,0 +1,12 @@
+# fix this relative to include/
+# or use absolute path to the GRASS source code
+MODULE_TOPDIR = ../..
+
+PGM = r.stream.pos
+
+LIBES     = $(GISLIB)
+DEPENDENCIES =  $(GISDEP)
+
+include $(MODULE_TOPDIR)/include/Make/Module.make
+
+default: cmd

Added: grass-addons/raster/r.stream.pos/description.html
===================================================================
--- grass-addons/raster/r.stream.pos/description.html	                        (rev 0)
+++ grass-addons/raster/r.stream.pos/description.html	2010-01-05 13:59:11 UTC (rev 40253)
@@ -0,0 +1,58 @@
+<h2>OPTIONS</h2>
+<DL>
+<DT><b>-s</b></DT>
+<DD>Creates new category sequence for stream network instead of original. It may be usefull for calculating pixel position in ordered network (i.e Strahler or Horton). By defualt it use original category of streams</DD>
+<p>
+<DT><b>stream</b></DT>
+<DD>Stream network: name of input stream map on which calculation are be performed produced by r.watershed, r.stream.extract or r.stream.order. Because streams network produced by r.watershed and r.stream.extract may slighty differ in detail it is required to use both stream and direction map produced by the same module. Stream background shall have NULL value or zero value. 
+Background values of NULL are by default produced by r.watershed, r.stream.extract and r.stream.order. If not 0 or NULL use <a href="r.mapcalc.html">r.mapcalc</a> to set background values to null.  
+</DD>
+<p>
+<DT><b>dir</b></DT>
+<DD>Flow direction: name of input direction map produced by r.watershed or r.stream.extract. If r.stream.extract output map is used, it only has non-NULL values in places where streams occur. NULL (nodata) cells are ignored, zero and negative values are valid direction data if they vary from -8 to 8 (CCW from East in steps of 45 degrees). Direction map shall be of type CELL values. Region resolution and map resoultion must be the same. 
+Also <em>stream</em> network map must have the same resolution. It is checked by default. If resolutions differ the module informs about it and stops. Region boundary
+and maps boundary may be differ but it may lead to unexpected results.</DD>
+
+<p>
+<DT><b>multipier</b></DT>
+<DD>Integer used to multiply stream category for cells output map. Default is 1000. To store in one file both origial stream category and current pixel position the stream category is multipied by multipier and next current cell position is added.
+ For typical network, where stream segments are below 1000 cells such multipier seems to be enough. For bigger networks or ordered networks may be to small in that multiper shall be increased to larger number: 10000 or 100000. Wrong multipier (ie not power of 10) do not stop calculation but may lead to wrong results.</DD>
+
+<h2>OUTPUTS</h2>
+
+<P>At least one output map is required: </p>
+<DT><b>cells</b></DT>
+<DD>Name of integer map storing both original (or new) stream category and current pixel downstream position  according formula <CODE>category * multipier + cur_pix_pos</CODE>.</DD>
+
+<DT><b>lengths</b></DT>
+<DD>Name of floation point map storing current pixel upstream distance (in map units) to the begining of the stream. Categoy is not stored.</DD>
+
+
+<h2>DESCRIPTION</h2>
+<P>
+Module r.stream.pos is typical helper module which can be used to fine-tune investigation on stream network at pixel scale and linear geostatistics. Module can be used together with other GRASS modules and R-CRAN to investigate local geomorphometric properties at any stream position.
+
+For limiting oputput size, cells stores two informations in one file. To recive current pixel stream category use (in R-CRAN) function <CODE>floor(cells, multipier)</CODE>, where multipier is the multipier value used in r.stream.pos calculation. To recive current pixel position in segment use modulo operator: <CODE>cell %% multipier</CODE>. The lengths map store only upstream distance in map units from current pixel to the stream begining.
+
+
+<h2>NOTES</H2>
+<P>
+Module can work only if direction map, stream map and region map has same settings. It is also required that stream map and direction map come from the same source. For lots of reason this limitation probably cannot be omitted. This means if stream map comes from r.stream.extract also direction map from r.stream.extract must be used. If stream network was generated with MFD method also MFD direction map must be used.
+
+<h2>SEE ALSO</h2>
+
+<em>
+<a href="r.watershed.html">r.watershed</a>,
+<a href="r.stream.extract.html">r.stream.extract</a>,
+<a href="r.stream.order.html">r.stream.order</a>,
+</em>
+
+
+<h2>AUTHOR</h2>
+Jarek  Jasiewicz
+
+<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>
+<P>&copy; 2003-2009 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
+</body>
+</html>

Added: grass-addons/raster/r.stream.pos/global.h
===================================================================
--- grass-addons/raster/r.stream.pos/global.h	                        (rev 0)
+++ grass-addons/raster/r.stream.pos/global.h	2010-01-05 13:59:11 UTC (rev 40253)
@@ -0,0 +1,82 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <grass/gis.h>
+#include <grass/dbmi.h>
+#include <grass/Vect.h>
+
+	  /* define */
+
+#define STREAMS struct stream
+#define PI 3.141592654
+
+
+#ifdef MAIN
+#  define GLOBAL
+#else
+#  define GLOBAL extern
+#endif
+
+/* dirs
+ *** next ***
+
+ 3 | 2 | 1
+ --- --- ---
+ 4 | 0 | 8
+ --- --- --- 
+ 5 | 6 | 7 
+
+ *** prev ***
+
+ 7 | 6 | 5
+ --- --- ---
+ 8 | 0 | 4
+ --- --- --- 
+ 1 | 2 | 3 
+ */
+
+#define STREAM struct streem
+STREAM {
+    int stream;			/* index */
+    int init_r, init_c;
+  };
+
+	
+
+	  /* functions.c */
+
+
+/* io.c */
+int open_raster(char *mapname);
+int create_base_maps(void);
+int stream_number(void);
+int write_maps_f(char *mapname, FCELL ** map);
+int write_maps_c(char *mapname, CELL ** map);
+int set_null_f(FCELL ** map);
+int set_null_c(CELL ** map);
+
+/* order.c */
+int trib_nums(int r, int c);
+int init_streams(void);
+int find_inits(void);
+int calculate (void);
+
+
+	  /* variables */
+
+GLOBAL struct Cell_head window;
+GLOBAL char *in_dirs, *in_streams, *out_streams, *out_streams_length;	/* input dirrection and accumulation raster names */
+GLOBAL int seq_cats;
+GLOBAL int multipier;
+int stream_num;
+
+GLOBAL CELL **dirs, **streams;	/* matrix with input data */
+GLOBAL FCELL **streams_length;
+GLOBAL int nrows, ncols;
+
+GLOBAL STREAM *s_streams;	/* stream structure all parameters we have here */
+GLOBAL struct History history;
+
+
+

Added: grass-addons/raster/r.stream.pos/io.c
===================================================================
--- grass-addons/raster/r.stream.pos/io.c	                        (rev 0)
+++ grass-addons/raster/r.stream.pos/io.c	2010-01-05 13:59:11 UTC (rev 40253)
@@ -0,0 +1,182 @@
+#include <grass/glocale.h>
+#include "global.h"
+
+
+int open_raster(char *mapname)
+{
+
+    int fd = 0;
+    char *mapset;
+    struct Cell_head cellhd;	/* it stores region information, and header information of rasters */
+
+    mapset = G_find_cell2(mapname, "");	/* checking if map exist */
+
+    if (mapset == NULL)
+	G_fatal_error(_("Raster map <%s> not found"), mapname);
+
+  /* checking if the input maps type is CELL */ 
+ 		if (G_raster_map_type(mapname, mapset) != CELL_TYPE)	
+	G_fatal_error(_("<%s> is not of type CELL"), mapname);
+
+    if ((fd = G_open_cell_old(mapname, mapset)) < 0)	/* file descriptor */
+	G_fatal_error(_("Unable to open raster map <%s>"), mapname);
+
+    if (G_get_cellhd(mapname, mapset, &cellhd) < 0)
+	G_fatal_error(_("Unable to read file header of <%s>"), mapname);
+
+    if (window.ew_res != cellhd.ew_res || window.ns_res != cellhd.ns_res)
+	G_fatal_error(_("Region resolution and map %s resolution differs. Run g.region rast=%s to set proper resolution"),
+		      mapname, mapname);
+
+    return fd;
+}
+
+
+int create_base_maps(void)
+{
+    int r, c;
+    CELL *r_dirs=NULL, *r_streams=NULL, *r_mask=NULL;
+    
+    int in_dir_fd=0, in_stm_fd=0, in_mask_fd=0;	/* input file descriptors: indir_fd - direction.... etc */
+
+    in_dir_fd = open_raster(in_dirs);
+    in_stm_fd = open_raster(in_streams);
+		
+    dirs = (CELL **) G_malloc(sizeof(CELL *) * nrows);
+		streams = (CELL **) G_malloc(sizeof(CELL *) * nrows);
+		
+		if(out_streams_length)
+		streams_length = (FCELL **) G_malloc(sizeof(FCELL *) * nrows);
+
+    r_dirs = (CELL *) G_malloc(sizeof(CELL) * ncols);
+    r_streams = (CELL *) G_malloc(sizeof(CELL) * ncols);
+	
+    G_message("Reading maps...");
+
+    for (r = 0; r < nrows; ++r) {
+	G_percent(r, nrows, 2);
+	/* dirs & streams */
+	dirs[r] = G_malloc(sizeof(CELL) * ncols);
+	streams[r] = G_malloc(sizeof(CELL) * ncols);
+	
+		if(out_streams_length)
+	streams_length[r] = G_malloc(sizeof(FCELL *) * ncols);
+
+	
+	if (G_get_c_raster_row(in_dir_fd, r_dirs, r) < 0 ||
+	    G_get_c_raster_row(in_stm_fd, r_streams, r) < 0 )
+	     {
+	    G_close_cell(in_dir_fd);
+	    G_close_cell(in_stm_fd);
+
+	    G_fatal_error(_("Unable to read raster maps at row <%d>"), r);
+	}
+	
+
+	for (c = 0; c < ncols; ++c) {
+	    if (G_is_c_null_value(&r_dirs[c])) 
+		dirs[r][c] = 0;
+	    else 
+		dirs[r][c] = r_dirs[c];
+	   
+	    if (G_is_c_null_value(&r_streams[c]))
+		streams[r][c] = 0;
+	    else 
+	   streams[r][c] = r_streams[c];
+	   
+		if(out_streams_length)
+	streams_length[r][c] = 0.;
+	   
+	   
+	}			/* end for c */
+
+    } /* end for r */
+    G_free(r_streams);
+    G_free(r_dirs);
+    G_close_cell(in_dir_fd);
+    G_close_cell(in_stm_fd);
+		G_percent(r, nrows, 2);
+    return 0;
+}				/* end create base maps */
+
+/*
+int stream_number(void)
+{
+	char *cur_mapset;
+	CELL c_min, c_max;
+	struct Range stream_range;
+	G_init_range(&stream_range);
+	cur_mapset = G_find_cell2(in_streams, "");
+	G_read_range(in_streams,cur_mapset,&stream_range);
+	G_get_range_min_max(&stream_range, &c_min, &c_max);
+	stream_num=c_max;
+	return 0;
+}
+*/
+
+int write_maps_f(char *mapname, FCELL ** map)
+{
+    int r, c;
+    int fd = 0;
+
+    if ((fd = G_open_raster_new(mapname, FCELL_TYPE)) < 0)
+	G_fatal_error(_("Unable to create raster map <%s>"), mapname);
+
+    for (r = 0; r < nrows; ++r)
+	G_put_f_raster_row(fd, map[r]);
+
+    G_close_cell(fd);
+    G_short_history(mapname, "raster", &history);
+    G_write_history(mapname, &history);
+    G_message(_("%s Done"), mapname);
+    G_free(mapname);
+
+    return 0;
+}
+
+int write_maps_c(char *mapname, CELL ** map)
+{
+    int r, c;
+    int fd = 0;
+
+    if ((fd = G_open_raster_new(mapname, CELL_TYPE)) < 0)
+	G_fatal_error(_("Unable to create raster map <%s>"), mapname);
+
+    for (r = 0; r < nrows; ++r)
+	G_put_c_raster_row(fd, map[r]);
+
+    G_close_cell(fd);
+    G_short_history(mapname, "raster", &history);
+    G_write_history(mapname, &history);
+    G_message(_("%s Done"), mapname);
+    G_free(mapname);
+
+    return 0;
+}
+
+
+int set_null_f(FCELL ** map)
+{
+    int r, c;
+
+    for (r = 0; r < nrows; ++r) {
+	for (c = 0; c < ncols; ++c) {
+	    if (streams[r][c] == 0)
+		G_set_f_null_value(&map[r][c], 1);
+	}
+    }
+    return 0;
+}
+
+int set_null_c(CELL ** map)
+{
+    int r, c;
+
+    for (r = 0; r < nrows; ++r) {
+	for (c = 0; c < ncols; ++c) {
+	    if (streams[r][c] == 0)
+		G_set_c_null_value(&map[r][c], 1);
+	}
+    }
+    return 0;
+}

Added: grass-addons/raster/r.stream.pos/main.c
===================================================================
--- grass-addons/raster/r.stream.pos/main.c	                        (rev 0)
+++ grass-addons/raster/r.stream.pos/main.c	2010-01-05 13:59:11 UTC (rev 40253)
@@ -0,0 +1,126 @@
+
+/****************************************************************************
+ *
+ * MODULE:			r.stream.pos
+ * AUTHOR(S):		Jarek Jasiewicz jarekj amu.edu.pl
+ *							 
+ * PURPOSE:			Helper module to calculate pixel positon (downstream) on stream route. Pr
+ *							It use r.stream.extract or r.watershed output files: stream and direction. 
+ * 							Usefull in statistical computation with R.
+ *
+ * COPYRIGHT:		 (C) 2002,2009 by the GRASS Development Team
+ *
+ *								 This program is free software under the GNU General Public
+ *								 License (>=v2). Read the file COPYING that comes with GRASS
+ *								 for details.
+ *
+ *****************************************************************************/
+#define MAIN
+#include <grass/glocale.h>
+#include "global.h"
+
+/*
+ * main function *
+ */
+int main(int argc, char *argv[])
+{
+    struct GModule *module;	/* GRASS module for parsing arguments */
+    struct Option *in_dir_opt, *in_stm_opt, *in_multipier, *in_order, *out_str_length, *out_str;	/* options */
+		struct Flag *out_seq;	/* flags */
+    /* initialize GIS environment */
+    G_gisinit(argv[0]);		/* reads grass env, stores program name to G_program_name() */
+
+    /* initialize module */
+    module = G_define_module();
+    module->keywords =
+	_("stream, order, route azimuth, route direction");
+    module->description =
+	_("Route azimuth, direction and relation to streams of higher order");
+
+    /*input option direction is reqired, acummulation is optional */
+
+    in_stm_opt = G_define_option();	/* input stream mask file - optional */
+    in_stm_opt->key = "stream";	/* required if strahler stream order is calculated for existing stream network */
+    in_stm_opt->type = TYPE_STRING;
+    in_stm_opt->required = YES;	/* for now; TO DO: is planned to be optional */
+    in_stm_opt->gisprompt = "old,cell,raster";
+    in_stm_opt->description =
+	"Name of stream mask input map (r.watershed or r.stream.extract)";
+
+    in_dir_opt = G_define_option();	/* input directon file */
+    in_dir_opt->key = "dir";
+    in_dir_opt->type = TYPE_STRING;
+    in_dir_opt->required = YES;
+    in_dir_opt->gisprompt = "old,cell,raster";
+    in_dir_opt->description =
+	"Name of direction input map (r.watershed or r.stream.extract)";
+			  
+    in_multipier = G_define_option();
+    in_multipier->key = "multipier";
+    in_multipier->label = _("Multipier to store stream index value");
+    in_multipier->description = _("Must be > 0");
+		in_multipier->required = YES;
+		in_multipier->answer = "1000";
+		in_multipier->type = TYPE_INTEGER;
+		
+		
+		out_str = G_define_option();
+		out_str->key = "cells";
+		out_str->label = _("File to store pixel's position");
+		out_str->required = NO;
+		out_str->answer = NULL;
+		out_str->type = TYPE_STRING;
+		out_str->gisprompt = "new,cell,raster";
+		
+		
+		out_str_length = G_define_option();
+		out_str_length->key = "lengths";
+		out_str_length->label = _("File to store current stream length");
+		out_str_length->required = NO;
+		out_str_length->answer = NULL;
+		out_str_length->type = TYPE_STRING;
+		out_str_length->gisprompt = "new,cell,raster";
+	
+		out_seq = G_define_flag();
+		out_seq->key = 's';
+		out_seq->description = _("Create new stream category sequence");	     
+      
+    if (G_parser(argc, argv))	/* parser */
+	exit(EXIT_FAILURE);
+
+      if (!out_str->answer && !out_str_length->answer)
+	G_fatal_error("You must select one or more output maps: cells or lengths or both ");
+    
+    G_get_window(&window);
+    
+    /* stores input options to variables */
+    in_dirs = in_dir_opt->answer;
+    in_streams = in_stm_opt->answer;
+    out_streams_length = out_str_length->answer;
+    out_streams = out_str->answer;
+    seq_cats = (out_seq->answer == 0);
+    
+    multipier = atoi(in_multipier->answer);
+    if (multipier <= 0)
+	G_fatal_error("Multipier must be > 0");
+    
+    /* stores output options to variables */
+ 		
+    nrows = G_window_rows();
+    ncols = G_window_cols();
+
+    create_base_maps();
+    find_inits();
+    calculate();
+ 
+ 	 if (out_streams_length) {
+	set_null_f(streams_length);
+	write_maps_f(out_streams_length, streams_length);
+    }
+ 
+     if (out_streams) {
+	set_null_c(streams);
+	write_maps_c(out_streams, streams);
+    }
+    exit(EXIT_SUCCESS);
+}

Added: grass-addons/raster/r.stream.pos/pos.c
===================================================================
--- grass-addons/raster/r.stream.pos/pos.c	                        (rev 0)
+++ grass-addons/raster/r.stream.pos/pos.c	2010-01-05 13:59:11 UTC (rev 40253)
@@ -0,0 +1,161 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <grass/glocale.h>
+#include "global.h"
+
+int trib_nums(int r, int c)
+{				/* calcualte number of tributuaries */
+
+    int nextr[9] = { 0, -1, -1, -1, 0, 1, 1, 1, 0 };
+    int nextc[9] = { 0, 1, 0, -1, -1, -1, 0, 1, 1 };
+    int trib = 0;
+    int i, j;
+
+    for (i = 1; i < 9; ++i) {
+			if (r + nextr[i] < 0 || r + nextr[i] > (nrows - 1) || c + nextc[i] < 0
+				|| c + nextc[i] > (ncols - 1))
+	    continue;
+		
+			j = (i + 4) > 8 ? i - 4 : i + 4;
+			
+			if (streams[r + nextr[i]][c + nextc[i]] > 0 &&
+				dirs[r + nextr[i]][c + nextc[i]] == j)
+			trib++;
+    }
+
+		if(trib>1) {
+			for (i = 1; i < 9; ++i) {
+			if (r + nextr[i] < 0 || r + nextr[i] > (nrows - 1) || c + nextc[i] < 0
+				|| c + nextc[i] > (ncols - 1))
+	    continue;
+		
+			j = (i + 4) > 8 ? i - 4 : i + 4;
+			
+			if (streams[r + nextr[i]][c + nextc[i]] == streams[r][c] &&
+				dirs[r + nextr[i]][c + nextc[i]] == j)
+			trib--;
+			}
+		}
+
+    if (trib > 5)
+	G_fatal_error("Error finding inits. Stream and direction maps probably do not match...");
+    if (trib > 3)
+	G_warning("Stream network may be too dense...");
+
+   return trib;
+}				/* end trib_num */
+
+
+int find_inits(void)
+{
+    int r, c;
+    stream_num=0;
+
+    s_streams = (STREAM *) G_malloc((nrows+ncols) * sizeof(STREAM));
+    G_message("Finding inits...");
+
+   for (r = 0; r < nrows; ++r) {
+		for (c = 0; c < ncols; ++c) {
+	   	if (streams[r][c] > 0) {
+	
+				if (trib_nums(r, c) != 1) {	/* adding inits */
+					
+					if (stream_num>(2*(nrows+ncols)))
+						G_fatal_error("Error finding inits. Stream and direction maps probably do not match...");
+					if (stream_num>(nrows+ncols)) /* almost not possible */
+						s_streams = G_realloc(s_streams,2*(nrows+ncols)*sizeof(STREAM));
+						
+						s_streams[stream_num].stream = streams[r][c];
+		 				s_streams[stream_num].init_r = r;
+						s_streams[stream_num++].init_c = c;
+					}	
+	    		}			/* end if streams */
+			}			/* c */
+    }				/* r */
+    return 0;
+}
+
+int calculate (void) {
+	
+	int nextr[9] = { 0, -1, -1, -1, 0, 1, 1, 1, 0 };
+  int nextc[9] = { 0, 1, 0, -1, -1, -1, 0, 1, 1 };
+
+  int i, s, d;		/* s - streams index; d - direction */
+  int done = 1;
+  int r, c;
+  int next_r, next_c;
+  int cur_stream;
+  int cur_cat;
+  float cur_northing, cur_easting;
+  float next_northing, next_easting;
+  
+	int cur_pixel;
+	float cur_length=0.;
+  float cur_accum=0.;
+	
+	G_message("Calculating...");
+	G_begin_distance_calculations();
+	
+	for (s=0; s<stream_num+1; ++s) { /* main loop on treams */
+
+			if(s_streams[s].stream<0)
+		continue;
+		
+		r = s_streams[s].init_r;
+		c = s_streams[s].init_c;
+		
+		cur_stream=streams[r][c];
+		cur_cat= (seq_cats) ? cur_stream : s;
+
+		cur_length=0.;
+		cur_accum=0.;
+		cur_pixel=0;
+		done=1;
+
+		while(done) {
+
+		 cur_northing = window.north - (r + .5) * window.ns_res;
+	   cur_easting = window.west + (c + .5) * window.ew_res;
+		 d=dirs[r][c];
+		 next_r=r+nextr[d];
+	   next_c=c+nextc[d];
+			
+		if (d<1|| /* end of route: sink */
+		r + nextr[d] < 0 || r + nextr[d] > (nrows - 1) || /*border*/
+		c + nextc[d] < 0 || c + nextc[d] > (ncols - 1) ||
+		streams[next_r][next_c]<1) { /* mask */
+			
+			cur_accum += (window.ns_res+window.ew_res)/2;	   
+			cur_pixel++;
+			
+				if(out_streams_length)
+			streams_length[r][c] = cur_accum;
+				if(out_streams)
+			streams[r][c] = cur_cat * multipier + cur_pixel;
+ 			break;
+		}
+
+		 next_northing = window.north - (next_r + .5) * window.ns_res;
+		 next_easting = 	window.west + (next_c + .5) * window.ew_res;
+		 cur_length =	G_distance(next_easting, next_northing, cur_easting,  cur_northing);
+		 cur_accum += cur_length;
+		 cur_pixel++;
+		 
+			
+			if(out_streams_length)
+		 streams_length[r][c] = cur_accum;
+			if(out_streams)
+		 streams[r][c] = cur_cat * multipier + cur_pixel;
+		 
+		 r=next_r;
+		 c=next_c;
+
+				if (streams[next_r][next_c] != cur_stream) 
+			break;
+		
+		} /* end while */
+	} /* end for s*/
+return 0;
+}
+
+

Added: grass-addons/raster/r.stream.pos/r.stream.pos.tmp.html
===================================================================
--- grass-addons/raster/r.stream.pos/r.stream.pos.tmp.html	                        (rev 0)
+++ grass-addons/raster/r.stream.pos/r.stream.pos.tmp.html	2010-01-05 13:59:11 UTC (rev 40253)
@@ -0,0 +1,58 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>GRASS GIS manual: r.stream.pos</title>
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<link rel="stylesheet" href="grassdocs.css" type="text/css">
+</head>
+<body bgcolor="white">
+
+<img src="grass_logo.png" alt="GRASS logo"><hr align=center size=6 noshade>
+
+<h2>NAME</h2>
+<em><b>r.stream.pos</b></em>  - Route azimuth, direction and relation to streams of higher order
+<h2>KEYWORDS</h2>
+stream, order, route azimuth, route direction
+<h2>SYNOPSIS</h2>
+<b>r.stream.pos</b><br>
+<b>r.stream.pos help</b><br>
+<b>r.stream.pos</b> [-<b>s</b>] <b>stream</b>=<em>string</em> <b>dir</b>=<em>string</em> <b>multipier</b>=<em>integer</em>  [<b>cells</b>=<em>string</em>]   [<b>lengths</b>=<em>string</em>]   [--<b>overwrite</b>]  [--<b>verbose</b>]  [--<b>quiet</b>] 
+
+<h3>Flags:</h3>
+<DL>
+<DT><b>-s</b></DT>
+<DD>Create new stream category sequence</DD>
+
+<DT><b>--overwrite</b></DT>
+<DD>Allow output files to overwrite existing files</DD>
+<DT><b>--verbose</b></DT>
+<DD>Verbose module output</DD>
+<DT><b>--quiet</b></DT>
+<DD>Quiet module output</DD>
+</DL>
+
+<h3>Parameters:</h3>
+<DL>
+<DT><b>stream</b>=<em>string</em></DT>
+<DD>Name of stream mask input map (r.watershed or r.stream.extract)</DD>
+
+<DT><b>dir</b>=<em>string</em></DT>
+<DD>Name of direction input map (r.watershed or r.stream.extract)</DD>
+
+<DT><b>multipier</b>=<em>integer</em></DT>
+<DD>Multipier to store stream index value</DD>
+<DD>Must be &gt; 0</DD>
+<DD>Default: <em>1000</em></DD>
+
+<DT><b>cells</b>=<em>string</em></DT>
+<DD>File to store pixel's position</DD>
+
+<DT><b>lengths</b>=<em>string</em></DT>
+<DD>File to store current stream length</DD>
+
+</DL>
+<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>
+<P>&copy; 2003-2009 <a href="http://grass.osgeo.org">GRASS Development Team</a></p>
+</body>
+</html>



More information about the grass-commit mailing list