<?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="FlagCatchmentCells" 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>FlagCatchmentCells</refname>

    <refpurpose>Identifies all cells belonging to a (sub)catchment and flags them in an existing raster</refpurpose>
  </refnamediv>

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

    <synopsis>FlagCatchmentCells ( handle_fdr , outlet , handle_ras , flag [, INLETS] )</synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Arguments</title>
    <variablelist>
	  
      <varlistentry>
      <term>handle_fdr</term>
        <listitem>
          <para>
	  integer: handle on the flow direction grid defining the stream network</para>
	  </listitem>
      </varlistentry>

      <varlistentry>
      <term>outlet</term>
        <listitem>
          <para>
	  integer: ID of the outlet pixel, as returned by <literal>XY2rec</literal></para>
	  </listitem>
  	</varlistentry>

      <varlistentry>
      <term>handle_ras</term>
        <listitem>
          <para>
	  integer: handle on an existing raster in which catchment cells will be flagged. This raster is not created by the function, it must exist before and can be created with functions such as <literal>CreateFloatRaster</literal> or <literal>CreateConstantRaster</literal></para>
	  </listitem>
  	</varlistentry>

      <varlistentry>
      <term>flag</term>
        <listitem>
          <para>
	  double: value to be used for flagging catchment cells in the raster</para>
	  </listitem>
  	</varlistentry>

      <varlistentry>
      <term>INLETS</term>
        <listitem>
          <para>
	  (optional) vector of inlet IDs. By default, the function flags all cells upstream the outlet pixel. If you want to exclude some subcatchments then provide a vector of inlet IDs defining those subcatchments. The recursive accumulation will not go further upstream whenever one of these inlets is met.</para>
	  </listitem>
       </varlistentry>

</variablelist>
  </refsection>



  <refsection>
    <title>Description</title>

    <para>Identifies all cells belonging to a (sub)catchment and flags them in an existing raster</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='XY2rec'>XY2rec</link>, <link linkend='CreateFloatRaster'>CreateFloatRaster</link>, <link linkend='CreateConstantRaster'>CreateConstantRaster</link>
      </member>
     
   </simplelist></refsection>


  <refsection>
    <title>Authors</title>

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