Difference between revisions of "XsGenerator"
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | = Introduction = | ||
xsGenerator.exe creates TUFLOW 1D cross-section databases (ie. a 1d_xs layer and a .csv file for each cross-section) using .mif layers of survey (elevation) points and, optionally, lines.<br> | xsGenerator.exe creates TUFLOW 1D cross-section databases (ie. a 1d_xs layer and a .csv file for each cross-section) using .mif layers of survey (elevation) points and, optionally, lines.<br> | ||
Any number of .mif layers can be specified. The elevation points can be in the same layer, several layers or a different layer to the cross-section lines. The cross-section lines are optional (as discussed below). Each .mif layer must have four attributes as described in the first table below, and in the same order as in the table. For line/polyline objects of the cross-section locations, only the XS_ID attribute is used. The second table below describes the options (switches) available.<br> | Any number of .mif layers can be specified. The elevation points can be in the same layer, several layers or a different layer to the cross-section lines. The cross-section lines are optional (as discussed below). Each .mif layer must have four attributes as described in the first table below, and in the same order as in the table. For line/polyline objects of the cross-section locations, only the XS_ID attribute is used. The second table below describes the options (switches) available.<br> | ||
Line 7: | Line 8: | ||
#If there is no cross-section line for a set of elevation points, this is accepted provided that at least one point (the start on the left bank) has a LCR values of “L” to denote the start of the cross-section. There must also be at least two “C” points in succession. Except for the first “L” point, subsequent isolated “L” and “R” points are ignored. This means it is possible to generate a cross-section database from a layer of surveyed points only, provided each point is assigned their respective XS_ID. | #If there is no cross-section line for a set of elevation points, this is accepted provided that at least one point (the start on the left bank) has a LCR values of “L” to denote the start of the cross-section. There must also be at least two “C” points in succession. Except for the first “L” point, subsequent isolated “L” and “R” points are ignored. This means it is possible to generate a cross-section database from a layer of surveyed points only, provided each point is assigned their respective XS_ID. | ||
If a TUFLOW cross-section database has been created using [[12da_to_from_mif | 12da_to_from_mif.exe]], it will have created a .mif layer ready to be used for xsGenerator.exe. This layer can be used to assign material values in a GIS to the MNR attribute from a material polygon layer (e.g. 2d_mat layer), then processed by xsGenerator to recreate the TUFLOW cross-section database with material values allocated across the cross-section profiles in the .csv files.<br> | If a TUFLOW cross-section database has been created using [[12da_to_from_mif | 12da_to_from_mif.exe]], it will have created a .mif layer ready to be used for xsGenerator.exe. This layer can be used to assign material values in a GIS to the MNR attribute from a material polygon layer (e.g. 2d_mat layer), then processed by xsGenerator to recreate the TUFLOW cross-section database with material values allocated across the cross-section profiles in the .csv files.<br> | ||
− | xsGenerator can also be used to generate a cross-section database using survey data in the ISIS format (see the isis option). The first file specified must a .mif file in the correct projection, with subsequent files being the survey files. Wildcards can be used to input numerous files ( | + | xsGenerator can also be used to generate a cross-section database using survey data in the ISIS format (see the isis option). The first file specified must be a .mif file in the correct projection, with subsequent files being the survey files. Wildcards can be used to input numerous files (e.g. *.xyz).<br><br> |
'''TABLE 1: xsGenerator .mif Layer Attributes''' | '''TABLE 1: xsGenerator .mif Layer Attributes''' | ||
{| align="center" class="wikitable" | {| align="center" class="wikitable" | ||
Line 18: | Line 19: | ||
Mandatory for point objects. Not used for lines. | Mandatory for point objects. Not used for lines. | ||
|- | |- | ||
− | |MNR|| Float || The Material, Manning’s n or Relative resistance value at that point along the cross-section. Use the | + | |MNR|| Float || The Material, Manning’s n or Relative resistance value at that point along the cross-section. Use the -M, -N or -R switch in the table below to indicate which type of value it is.<br> |
Mandatory for point objects. Not used for lines. | Mandatory for point objects. Not used for lines. | ||
|- | |- | ||
Line 41: | Line 42: | ||
|"-R"||The MNR attribute in the .mif file is a relative resistance number. | |"-R"||The MNR attribute in the .mif file is a relative resistance number. | ||
|- | |- | ||
− | |"-ppol"||Project Points Onto Line. This option projects points onto their line . | + | |"-ppol"||Project Points Onto Line. This option projects points onto their line. Only lines with two vertices can be used. This is very useful if the cross-section points are not surveyed perpendicular to flow, this ensures that the flow area is not exaggerated. |
|} | |} | ||
<br> | <br> | ||
Line 62: | Line 63: | ||
|} | |} | ||
=Examples= | =Examples= | ||
− | + | <li><tt>xsGenerator.exe -M -isis projection.mif datafile.asc</tt><br> | |
+ | <li><tt>xsGenerator.exe -M -m11 projection.mif xs.txt model.nwk11 model.hd11</tt><br> | ||
+ | <br> | ||
{{Tips Navigation | {{Tips Navigation | ||
|uplink=[[TUFLOW_Utilities | Back to TUFLOW Utilities]] | |uplink=[[TUFLOW_Utilities | Back to TUFLOW Utilities]] | ||
}} | }} |
Latest revision as of 16:48, 14 January 2021
Introduction
xsGenerator.exe creates TUFLOW 1D cross-section databases (ie. a 1d_xs layer and a .csv file for each cross-section) using .mif layers of survey (elevation) points and, optionally, lines.
Any number of .mif layers can be specified. The elevation points can be in the same layer, several layers or a different layer to the cross-section lines. The cross-section lines are optional (as discussed below). Each .mif layer must have four attributes as described in the first table below, and in the same order as in the table. For line/polyline objects of the cross-section locations, only the XS_ID attribute is used. The second table below describes the options (switches) available.
The logic for interpreting the .mif layer is:
- The association between an elevation point and a cross-section line is based on having the same XS_ID. It is not based on whether the point is snapped to the line or not. This means the cross-section line is purely schematic and does not have to be located at exactly the same point as the first elevation point.
- The first point in a cross-section line is treated as the start of the cross-section on the left bank.
- Elevation points having the same XS_ID are sorted based on the shortest distance between them. This means the points do not have to be in order across the cross-section (as often seems to be the case!). The cross-section line is not used for setting the distance (X) values for the profile.
- If there is no cross-section line for a set of elevation points, this is accepted provided that at least one point (the start on the left bank) has a LCR values of “L” to denote the start of the cross-section. There must also be at least two “C” points in succession. Except for the first “L” point, subsequent isolated “L” and “R” points are ignored. This means it is possible to generate a cross-section database from a layer of surveyed points only, provided each point is assigned their respective XS_ID.
If a TUFLOW cross-section database has been created using 12da_to_from_mif.exe, it will have created a .mif layer ready to be used for xsGenerator.exe. This layer can be used to assign material values in a GIS to the MNR attribute from a material polygon layer (e.g. 2d_mat layer), then processed by xsGenerator to recreate the TUFLOW cross-section database with material values allocated across the cross-section profiles in the .csv files.
xsGenerator can also be used to generate a cross-section database using survey data in the ISIS format (see the isis option). The first file specified must be a .mif file in the correct projection, with subsequent files being the survey files. Wildcards can be used to input numerous files (e.g. *.xyz).
TABLE 1: xsGenerator .mif Layer Attributes
Attribute | Type | Description |
---|---|---|
Z | Float | The ground/bed survey elevation at that point on the cross-section. Must be in metres. Mandatory for point objects. Not used for lines. |
MNR | Float | The Material, Manning’s n or Relative resistance value at that point along the cross-section. Use the -M, -N or -R switch in the table below to indicate which type of value it is. Mandatory for point objects. Not used for lines. |
LCR | Character (1) | One of “L”, “C” or “R” to indicate whether the point is on the left, centre or right bank. If this is unknown, specify “C” for all points along the cross-section. If left blank, “C” is assumed. Optional for point objects, unless there is no associated line, in which case the start of the cross-section must be denoted by a “L” and the remaining points must be assigned a value (there must be at least two “C” points in succession, and subsequent isolated “L” and “R” points are ignored). |
XS_ID | Character (12) | The ID or label to be used for the cross-section. This same label is used for naming the .csv file that will contain the XZ profile of the cross-section. Mandatory for point and line objects. |
TABLE 2: xsGenerator Options (Switches) for .MIF Input Files
Switch | Description |
---|---|
"-M" | The MNR attribute in the .mif file is a material number. |
"-N" | The MNR attribute in the .mif file is a Manning’s n value. |
"-R" | The MNR attribute in the .mif file is a relative resistance number. |
"-ppol" | Project Points Onto Line. This option projects points onto their line. Only lines with two vertices can be used. This is very useful if the cross-section points are not surveyed perpendicular to flow, this ensures that the flow area is not exaggerated. |
TABLE 3: xsGenerator Options (Switches) for .ISIS Cross-Section Input Files or Mike11 input files
Switch | Description |
---|---|
"-isis" | Indicates the input files are in the ISIS cross-section format. |
"-m11" | Indicates the input files are in the Mike11 XZ cross-section format. For Mike11 cross-section conversion the utility also requires the network (.nwk11) and parameter (.hd11) files. For Mike11 the subsequent input data files are .txt, .nwk11 and .hd11 in any order. |
"-M" | Use materials where the material number is equal to 1000 times the Manning’s n value. |
"-N" | Use the Manning’s n values (rather than materials). |
"-trim" | To omit points outside of the left and right markers in the Mike11 cross-sections. |
Examples
Up |
---|
Back to TUFLOW Utilities |