<?xml version="1.0" encoding="ISO-8859-1"?>
<!--
 * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
 * Copyright (C) INRIA - Allan CORNET
 * 
 * This file is released into the public domain
 *
 -->
<refentry version="5.0-subset Scilab" xml:id="MakeStrahlerStreams" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns3="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:db="http://docbook.org/ns/docbook">
  <info>
    <pubdate>$LastChangedDate: 2013-10-16 12:00:00 +0100 (Wed., October 16, 2013)
    $</pubdate>
  </info>

  <refnamediv>
    <refname>MakeStrahlerStreams</refname>

    <refpurpose>Extracts Strahler streams</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>Calling Sequence</title>

    <synopsis>[ STREAMS , StreamOrder , downStream , downCell ] = MakeStrahlerStreams ( handle_tree , threshold )</synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Arguments</title>
    <variablelist>
	  
      <varlistentry>
      <term>handle_tree</term>
        <listitem>
          <para>
	  integer: handle of the cell tree defining the catchment in which to compute Strahler orders.</para>
	  </listitem>
      </varlistentry>
	  
	  <varlistentry>
      <term>threshold</term>
        <listitem>
          <para>
	  Support area (i.e. minimal weight) defining the first-order streams.</para>
	  </listitem>
      </varlistentry>
	  
	  <varlistentry>
      <term>STREAMS</term>
        <listitem>
        <para>
	  output: object of type <literal>list</literal> containing the stream links. <literal>STREAMS(i)</literal> is a vector containing the cells (recor numbers) of stream link i, sorted downstream to upstream.
	  </para>
	  </listitem>
      </varlistentry>
	    
	  <varlistentry>
      <term>StreamOrder</term>
        <listitem>
          <para>
	  output: vector of size <literal>size(STREAMS,'*')</literal>. <literal>StreamOrder(i)</literal> is the stream order of link i.</para>
	  </listitem>	
	</varlistentry>
			
	  <varlistentry>
      <term>downStream</term>
        <listitem>
          <para>
	  output: vector of size <literal>size(STREAMS,'*')</literal> containing link topology. <literal>downStream(i)</literal> is the index of the stream link in which stream link i is draining.</para>
	  </listitem>		
	</varlistentry>
	
	<varlistentry>
      <term>downCell</term>
        <listitem>
          <para>
	  output: vector of size <literal>size(STREAMS,'*')</literal>. <literal>downCell(i)</literal> is the ID of the cell in which stream link i is draining. According to the topology this cell <literal>downCell(i)</literal> is part of stream link <literal>downStream(i)</literal> and can be found in the vector <literal>STREAMS(downStream(i))</literal>.
	  </para>
	  </listitem>		
	</varlistentry>		

</variablelist>
  </refsection>



  <refsection>
    <title>Description</title>

    <para>Returns a list of links and their Strahler order, as well as the links topology.</para>

  </refsection>

  <refsection>
    <title>Examples</title>
  </refsection>

   <refsection>
    <title>References</title>
    <para>
    </para>
  </refsection>
  
   <refsection><title>See Also</title><simplelist type='inline'>
    
      <member> 
         <link linkend='CreateCellTree'>CreateCellTree'</link>, <link linkend='XY2rec'>XY2rec</link>, <link linkend='rec2XY'>rec2XY</link> 
      </member>
     
   </simplelist></refsection>


  <refsection>
    <title>Authors</title>

    <simplelist type="vert">
      <member>Nicolas LE MOINE</member>
    </simplelist>
  </refsection>
</refentry>
