GRASS logo

NAME

m.definput - Creation xml files or fluidx files for OpenFluid Engine 1.5 or superior

KEYWORDS

vector, OpenFluid, fluidx, xml

SYNOPSIS

m.definput
m.definput help
m.definput [-sx] input=name directory=string type=string [IDCOL=string] [TYPEDOWNCOL=string] [DOWNCOL=string] [GUCOL=string] [PCSSCOL=string] [COLUMN=string[,string,...]] [NAME=string] [--verbose] [--quiet]

Flags:

-s
only show attribute columns of input and exit (no file creation)
-x
create xml extension instead of default fluidx extension format
--verbose
Verbose module output
--quiet
Quiet module output

Parameters:

input=name
Input vector name
directory=string
Name directory for the file(s)
type=string
Unit type (SU, RS or GU)
Options: SU, RS, GU
IDCOL=string
Column name ID unit (default is SELF_ID)
TYPEDOWNCOL=string
Column name for the TYPE downstream unit only if TYPE = SU (default is for SU TYPE : FLOW_CDE)
DOWNCOL=string
Column name for the ID downstream unit (default is for SU TYPE : FLOW_ID, for RS TYPE : LORCH_ID and for GU TYPE : EXHGW_ID)
GUCOL=string
Column name for the Exchange GU connected to SU (default is EXHGW_ID)
PCSSCOL=string
Column name for the Process Order (default is PCSS_ORD)
COLUMN=string[,string,...]
Column names of attribut data for the XXdefs.ddata.fluidx/xml (column name separated by comma ',')
NAME=string
File name for XXddef.fluidx/xml and XXdefs.ddata.fluidx/xml (default is $TYPEddef.fluidx/xml and $TYPEdefs.ddata.fluidx/xml)

DESCRIPTION

m.definput allows the user to create xml files or fluidx files for OpenFLUID version 1.5 or superior. Flag s allows to see column names for input file and exit (it's a front end of v.info command). The input layers must have been created for RS layer by m.toporeach, for SU layer by m.toposu; if not, input layers must contain compulsory columns (See Notes paragraph for details). Flag x allows to create xml files (for OpenFLUID 1.5) instead of fluidx files (for OpenFLUID 1.6)

NOTES

If input layer is created by segmentation functions (m.toporeach, m.toposu ), the following parameters are optional: IDCOL, TYPEDOWNCOL, DOWNCOL, GUCOL and PCSSCOL.
If the user wants to create XXdefs.ddata.fluidx/xml file, COLUMN must be provided with column names desired.
NAME parameter is optional; if not set, fluidx/xml files will have a type name (RSddef.fluidx/xml and RSdefs.ddata.fluidx/xml for RS type, SUddef.fluidx/xml and SUdefs.ddata.fluidx/xml for SU type and GUddef.fluidx/xml and GUdefs.ddata.fluidx/xml for GU type).
For more informations about fluidx/xml formats, please go to the OpenFLUID Community website.

EXAMPLES

Creation of xml file for SU layer

Creation of SUddef.xml
GRASS 6.3.0 :~ > m.definput -x input=SU directory=~/tmp/ type=SU
GRASS 6.3.0 :~ > cat ~/tmp/SUddef.xml
<?xml version="1.0" standalone="yes"?>
<openfluid>
  <domain>
    <definition>
      <unit class="SU" ID="1" pcsorder="1">
        <to class="SU" ID="2" />

      </unit>
      <unit class="SU" ID="2" pcsorder="2">
        <to class="RS" ID="1" />
      </unit>
      <unit class="SU" ID="3" pcsorder="1">
        <to class="RS" ID="2" />

      </unit>
      <unit class="RS" ID="1" pcsorder="1">
        <to class="RS" ID="2" />
      </unit>
      <unit class="RS" ID="2" pcsorder="1">
      </unit>

    </definition>
  </domain>
</openfluid>
Creation of SUddef.fluidx and SUdefs.ddata.fluidx
GRASS 6.3.0 :~ > m.definput input=SU directory=~/tmp/ type=SU COLUMN=ks,slope

Creation of xml file for RS layer (not created by segmentation functions)

Showing column names
GRASS 6.3.0 :~ > m.definput -s input=RSmanual directory=~/tmp/ type=RS
Displaying column types/names for database connection of layer 1:
INTEGER|cat
INTEGER|Id
INTEGER|num_bief
CHARACTER|encombre_
CHARACTER|substrat
INTEGER|haut
INTEGER|bas
INTEGER|prof_
CHARACTER|infos
INTEGER|UpNode
INTEGER|DownNode
INTEGER|LowRS
DOUBLE PRECISION|LENGTH
INTEGER|ExchangeGU
INTEGER|ProcessOrd
DOUBLE PRECISION|Slope


GRASS 6.3.0 :~ > m.definput -x input=RSmanual directory=~/tmp/ type=RS IDCOL=num_bief DOWNCOL=LowRS GUCOL=ExchangeGU PCSSCOL=ProcessOrd NAME=reach

SEE ALSO

m.toporeach, m.toposu

AUTHORS

Michael Rabotin, UMR LISAH, Montpellier, France

rabotin@supagro.inra.fr

Last Changed: 23 January 2012


Main index

Copyright UMR LISAH OpenFluid