TUFLOW to GIS: Difference between revisions
Content deleted Content added
No edit summary |
|||
| (7 intermediate revisions by 5 users not shown) | |||
Line 1:
=Introduction=
The TUFLOW_to_GIS.exe is a utility available on the TUFLOW website <u>([
<br>
The utility can be used to convert TUFLOW outputs (.xmdf and .dat) into formats that can be imported into GIS packages such as MapInfo, ArcGIS, and QGIS.
<br>
'''Note''' That as per the 2013 version of TUFLOW, TUFLOW can now write directly to the gridded formats (.asc and .flt). This avoids the need for a separate conversion step. This is outlined in the <u>[
<br>
The output frequency and data types can now be specified independently for each data output format. An example is given below:<br>
Line 19:
=Running TUFLOW_to_GIS=
Simply double clicking on the TUFLOW_to_GIS executable will bring up a
The most common way to run the utility is from a batch file. This allows the user to process multiple outputs at once. A batch file is simply a plain text file containing one or more lines that execute a utility as per the example sections below.<br>
<br>
Line 28:
=Output Options=
== Gridded Data ==
Gridded (raster) data is outputted in the ESRI ASCII grid format. This is plain text format and is very widely recognised and used by a variety of GIS software including ArcGIS (requires Spatial Analyst), QGIS, and MapInfo (requires Vertical Mapper or Encom Discover). This is specified with the flag '''-asc'''.<br>
The TUFLOW to GIS utility uses the same approach as TUFLOW for interpolating a raster. That is, each cell is split into 4 triangles with a common vertex at the cell centre. An ASCII grid output directly from TUFLOW will use the calculated value at the cell centre (ZC). For an ASCII grid output using the TUFLOW to GIS utility, the centre used is the average of the corners. For this reason, the grids will not be exactly the same.
==Point and Vector Data==
Line 78 ⟶ 80:
|-
|"-sgs"|| Suppresses the grid size from the output file name. For example Run_h_g005_max.asc will become Run_h_max.asc
|-
|"-rmp<mesh_part>" || Removes a mesh part from the output. <mesh_part> must be the same name as appears in the .2dm file. The .tcf command Meshparts == ON must have been specified.
|-
|"-ttf<TT_Factor>" || Scales the thickness of arrow tails (default = 0). It will produce arrows suitable for ArcGIS if TT_factor is non-zero. <br>
+ve value(eg. -ttf.01): Thickness is TT_Factor times the arrow size.<br>
-ve value(eg. -ttf-.01): Thickness is TT_Factor times the cell size.
|-
|"-vmax<vmax>"|| The max vector magnitude for scaling vector arrow points.Default is no scaling except for _V.dat files which it is 10.
|-
|" -wld "|| It is used for creating a .wld file from a .tab file. The .tab file must be one created using the Save Window As...option in MapInfo to geo-reference a screen image.
|-
|"-pts<pt types>"|| Outputs only the specified out locations. Note: only valid with -mif or -shp output. Default is All. Any combination of the following:<br>
C - 2D cell centres<br>
H - 2D cell corners<br>
UV - 2D cell sides<br>
T - 1D Water Level Line triangles<br>
T - 1D Water Level Line triangles<br>
Eg: -ptsCT would output only 2D cell centres and 1D water level line points
|-
|"-region"||Outputs a region object, for each 2D cell the output value is the cell centre output. Note: only valid with -mif or -shp output.
|}
Line 93 ⟶ 115:
|-
|"-
|-
|"-typeAll"|| Converts all available output types in an xmdf file.
|-
|"-
|-
|"-v<output id(integer)>"|| Converts the specified vector dataset in an xmdf file. For example, <tt>-v1</tt> will convert the first vector dataset. A summary of the available datasets is listed within the console window when TUFLOW_to_GIS is preprocessing results. Check <u>[[TUFLOW_to_GIS#XMDF_Dataset_Example | XMDF Dataset Example]]</u>. To keep the console window open write "pause" at the end of the processing batch file and remove -b switch.
|-
|"-Folder<Folder Name>"|| Converts all datasets within a particular xmdf file. For example, <tt>-Folder"Maximums"</tt> will convert all datasets in the \Maximums\ folder.
Line 106 ⟶ 130:
|}
===XMDF Dataset Example===
For example, to convert the maximum Z1 output from “M01_5m_002_mult.xmdf” the
<tt>TUFLOW_to_GIS_w64.exe -asc -s5 -max M01_5m_002_mult.xmdf </tt><br>
Another way to extract the same dataset using the -path switch is:<br>
Line 137 ⟶ 161:
=Examples=
== Converting to 3D grids==
Probably the most common use of the TUFLOW_to_GIS utility is to convert the maximum results to a 3D surface. A number of examples are given below:<br>
<ol>
<li>Convert water level maximums to a 3D grid:<br>
*<tt>TUFLOW_to_GIS.exe -b -asc -max -typeH M01_5m_001.xmdf</tt><br>
*<u>Description:</u> Using batch mode (-b), convert to a 3D grid (-asc), converting the maximums (-max) for the water level results (-typeH).<br>
<br>
<li>Convert to a 3D grid at a specific time:<br>
*<tt>TUFLOW_to_GIS.exe -b -asc -t3 -typeH M01_5m_001.xmdf</tt><br>
*<u>Description:</u> As per example 1, except conversion at time 3 hours (-t3) instead of the maximums.<br>
<br>
<li>Convert to a 3D grid of specified grid cell size:<br>
*<tt>TUFLOW_to_GIS.exe -b -asc -max -grid1 -typeH M01_5m_001.xmdf</tt><br>
*<u>Description:</u> As per example 1, except the raster cell size is specified at 1m instead of being half the 2D cell size.<br>
<br>
<li>Convert velocity maximums to a 3D grid:<br>
*<tt>TUFLOW_to_GIS.exe -b -asc -max -typeV M01_5m_001.xmdf</tt><br>
*<u>Description:</u> As per example 1, except the velocity results (-typeV) are processed instead of water level (-typeH).<br>
<br>
<li>Convert Z1 hazard maximums to a 3D grid:<br>
*<tt>TUFLOW_to_GIS.exe -b -asc -max -s5 M01_5m_001.xmdf</tt><br>
*<u>Description:</u> As per example 1, except the Z1 hazard (-s5 based on the <u>[[TUFLOW_to_GIS#XMDF_Dataset_Example | XMDF Dataset Example]]</u>) are processed instead of water level (-typeH).<br>
</ol>
== Converting to Points ==
To output to a points file specify either a shapefiles output with the "-shp" switch or MapInfo output with the "-mif" output. To output at cell corners only:
<ol start="6">
<li>Convert maximums to a shapefile points file at cell corners:<br>
*<tt>TUFLOW_to_GIS.exe -b -shp -max -typeH M01_5m_001.xmdf</tt><br>
*<u>Description:</u> Using batch mode (-b), convert to a shapefile format (-shp), converting the maximums (-max) for the water level results (-typeH).<br>
<br>
<li>Convert maximums to a shapefile points file on a regular grid:<br>
*<tt>TUFLOW_to_GIS.exe -b -shp -max -grid2 -typeH M01_5m_001.xmdf</tt><br>
*<u>Description:</u> Using batch mode (-b), convert to a shapefile format (-shp), converting the maximums (-max), on a regular 2m grid (-grid2) for the water level results (-typeH).<br>
<br>
<li>Convert velocity at time 2 hours to shapefile points file:<br>
*<tt>TUFLOW_to_GIS.exe -b -shp -t2 -typeV M01_5m_001.xmdf</tt><br>
*<u>Description:</u> Using batch mode (-b), convert to a shapefile format (-shp), at time of 2 hours (-t2), converting the velocity output (-typeV).<br>
<br>
<li>Convert the model topography to shapefile points file format:<br>
*<tt>TUFLOW_to_GIS.exe -b -shp M01_5m_001.2dm</tt><br>
*<u>Description:</u> Using batch mode (-b), convert to a shapefile format (-shp), converting the model topography.<br>
</ol>
== Converting to Arrows ==
Line 182 ⟶ 209:
The size of the vectors can be controlled with the scale factor ("-sf") switch.<br>
'''NOTE:''' If using input .dat file the dataset type must be a vector dataset, such as velocity or unit flow.<br>
<ol start="10">
*<u>Description:</u> Using batch mode (-b), convert to a shapefile format (-shp), using vector outputs (-vector), and converting at time 2 hours (-t2) for the velocity results (-typeV).<br>
<br>
*<u>Description:</u> As above with a scale factor of 0.5, so that the arrows will be half the length.<br>
<br>
*<u>Description:</u> As above on a regular 2 metre grid (-grid2) for the unit flow results (-typeq).<br>
<br>
<u>Note:</u> When using processed maxmax xmdf from RES_to_RES utility the -typeV switch needs to be replaced with -v1 switch. -v1 switch calls for the first vector dataset.<br>
</ol>
== Calibration Points and Longitudinal Profiles ==
These command options are used to extract longitudinal profile information from model results. Input format requirements for the CP and LP files are provided in the calibration point and longitudinal profile commands table within the 'Input Flags' section of this page. <br>
<ol start="13">
<li>Compute difference between recorded high water mark (in shp or mif format) and modelled maximum flood level:<br>
*<tt>TUFLOW_to_GIS.exe -cp "CP_File.shp" -typeH -max M03_5m_003.xmdf</tt><br>
*<tt>TUFLOW_to_GIS.exe -cp "CP_File.mif" -typeH -max M03_5m_003.xmdf</tt><br>
The CP file inputs, flood model result and difference in peak flood level relative to the recorded level is output to a GIS file (eg. '<CP_filename>_<TUFLOW_model_filename>.shp') <br>
<br>
[[File: T2G_Longsection_001.PNG|300px]]<br>
<br>
<li>Compute longitudinal profiles of maximum flood level model results. Associate recorded high water marks (in shp or mif format) with the profile if the point location is within a defined radius of the longitudinal profile line.<br>
*<tt>TUFLOW_to_GIS.exe -cp "CP_File.shp" -lp "LP_File.shp" -cpsd100 -lpmd2500 -typeH -max M03_5m_003.xmdf</tt><br>
*<tt>TUFLOW_to_GIS.exe -cp "CP_File.mif" -lp "LP_File.mif" -cpsd100 -lpmd2500 -typeH -max M03_5m_003.xmdf</tt><br>
The longitude profile results are output to a csv file. The output increment matches the resolution of vertices along the longitudinal profile line. The GIS dataset defines the longitudinal profile chainage at a regular (specified) increment.<br>
<br>
[[File: T2G_Longsection_005.PNG|950px]]
[[File: T2G_Longsection_004.PNG|500px]]
<br>
</ol>
<br>
| |||