<?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="MakeStreamLines" 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-18 12:00:00 +0100 (Fri., October 18, 2013)
    $</pubdate>
  </info>

  <refnamediv>
    <refname>MakeStreamLines</refname>

    <refpurpose>Builds the streamlines (set of polylines) of a drainage network with a specified support threshold area</refpurpose>
  </refnamediv>

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

    <synopsis>[ STREAMS , downStream , downCell ] = MakeStreamLines ( 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 whose flowlines are to be built.</para>
	  </listitem>
      </varlistentry>

	
      <varlistentry>
      <term>threshold</term>
        <listitem>
          <para>
	  Support area (i.e. minimum weight) defining the first-order streams.</para>
	  </listitem>
      </varlistentry>
	  
	  <varlistentry>
      <term>STREAMS</term>
        <listitem>
          <para>
	  output: object of type <literal>list</literal> containing the streamlines. <literal>STREAMS(i)</literal> is a vector containing the cells (recor numbers) of streamline i, sorted downstream to upstream.</para>
	  </listitem>
      </varlistentry>
	 
	  <varlistentry>
      <term>downStream</term>
        <listitem>
          <para>
	  output: vector of length <literal>length(STREAMS)</literal> indicating the outlet stream of each stream. Stream <literal>STREAMS(i)</literal> drains into stream <literal>STREAMS(downStream(i))</literal>.</para>
	  </listitem>
      </varlistentry>
	  
	  <varlistentry>
      <term>downCell</term>
        <listitem>
          <para>
	  output: vector of length <literal>length(STREAMS)</literal> indicating the outlet cell of each steam. The most downstream cell of stream i, <literal>STREAMS(i)(1)</literal>, drains into cell <literal>downCell(i)</literal> (this cell belongs to stream <literal>STREAMS(downStream(i))</literal>).</para>
	  </listitem>
      </varlistentry>
	  
</variablelist>
  </refsection>



  <refsection>
    <title>Description</title>

    <para>Builds the streamlines (set of polylines) of a drainage network with a specified support threshold area, as well as the topology between thoses streams.</para>

  </refsection>

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


  <refsection>
    <title>Authors</title>

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