12da to from GIS: Difference between revisions
Content deleted Content added
Added some extra information on UTF16 conversion. |
|||
| (5 intermediate revisions by 2 users not shown) | |||
Line 1:
= Introduction =
The .12da file must be saved in ANSI encoding, not UTF.
Note, when converting from a .12da file to a .mif file without any options, 12da_to_from_mif automatically creates a .mif/.mid file suitable for use by Read GIS Z Line. This is useful for importing 3D breaklines (eg. of a road design) directly into TUFLOW.<br>▼
When importing or exporting between 12D and GIS, specify the file to be translated:
Of particular note is the -xs option to generate a TUFLOW 1D cross-section database from a 12D DTM. This approach is far more preferable to extracting cross-sections manually and is much better than extracting cross-sections from a grid based DTM (eg. Vertical Mapper or Spatial Analyst) as it only extracts points where the DTM triangle sides intersect the cross-section line, thereby keeping the number of points in the cross-section profile to a minimum, and also improving the accuracy of the profile.<br>▼
* If the file has a .12da or .4da extension the program converts it to a .mif/.mid file.
* If the file has a .mif extension the program converts it to a .12da file.
▲
This process is useful for importing 3D breaklines, for example a road design, directly into TUFLOW.
Several useful options are described in the table below. Particularly noteworthy are the following options:
* -xs: generates a TUFLOW 1D cross-section database from a 12D DTM.<br>
▲
* -zln: useful when river bathymetry in the DTM is poor because aerial survey data are inaccurate where water or dense vegetation is present.<br>
This option allows a section to be carved through the DTM along the river based on a cross section survey.
=Options (switches)=
'''TABLE 1: 12da_to_from_GIS Options (Switches)'''
Line 13 ⟶ 27:
! width=85% | Description
|-
!colspan="2" style="background-color:#005581; font-weight:bold; color:white;"| When converting from a
|-
|"-zln"|| When converting a .mif file to .12da file, if zln is specified polylines are interpreted in the same manner as a TUFLOW 3D breakline (see Read GIS Z Line) such that any points snapped to the polyline are used to set the elevations of any vertices along the polyline that do not have points snapped to them. The first attribute in the .mif file must be the Elevation. (Note, when converting in reverse from a .12da file to a .mif file without any options, 12da_to_from_mif automatically creates a .mif/.mid file suitable for use by Read GIS Z Line.)<br>
This is useful for creating 3D polylines for 12D where an elevation does not exist at a vertice. It is particularly useful where a river’s bathymetry in a DTM is being created from cross-section surveys, and the DTM operator wishes to use the elevations at the cross-section survey points, but needs to put more shape into the breaklines being digitised between the cross-sections so as to carve out the river’s bathymetry into the DTM. Using 12da_to_from_mid with the zln option will interpolate elevations at every string vertice, something that 12D does not offer (as far as we know!).
|-
!colspan="2" style="background-color:#005581; font-weight:bold; color:white;"| When converting from a .12da file to a
|-
|"-hip"|| When converting a .12da file to a .mif file will include any 12D hipdata polylines.
Line 33 ⟶ 47:
:This will produce a 1d_xs layer in shapefile format ready for use by TUFLOW and a .csv file for each cross-section line. Keep the 1d_xs layer and the .csv files in the same folder in the event that you move them elsewhere.<br>
Using the xsGenerator.exe utility, you can also assign material values to each of the cross-section points (see <u>[[xsGenerator | this page]]</u>).
|-
|"-out"|| <span style="color:red">'''UNDER CONSTRUCTION'''</span><br>
Specifies the output file name when creating a new file. <br>For example:<br>
Will create the file with the chosen output name instead of the default.
|-
|"-model"|| <span style="color:red">'''UNDER CONSTRUCTION'''</span><br>
When converting to a .12da file, sets the model name in the output. <br>For example:<br>
<tt>12da_to_from_gis.exe -model 12d_Model_Name <Lines>.mif</tt><br>
Will embed the specified 12d model name into the created .12da file.
|}
= Examples =
<tt>12da_to_from_gis.exe -mif road_breaklines.12da</tt><br>
creates .mif/.mid files of the 2D and 3D breaklines in the file road_breaklines.12da.
<tt>12da_to_from_gis.exe 2d_hx_lines.mif</tt><br>
creates a file 2d_hx_lines.mif.12da.
▲<tt>12da_to_from_gis.exe 2d_hx_lines_draped.12da</tt><br>
<tt>12da_to_from_gis.exe 2d_hx_lines_draped.12da</tt>
This creates 3D breakline .mif/.mid files of the TUFLOW HX lines that can be used to ensure the 2D HX cells are set to the exact elevations along the HX lines by using the below command in the .tgc file.:<br>
<tt>Read GIS Z Line THICK == mi\2d_hx_lines_draped.12da.mif </tt
<span style="color:red">'''UNDER CONSTRUCTION'''</span>
=== CONVERT FROM GIS TO 12DA ===
<tt>1: 12da_to_from_gis.exe <Lines>.mif</tt><br />
Converts to 2D breakline.
Options:<br />
<tt>-zln</tt> converts a TUFLOW 3D breakline to 12da format, including<br />
interpolation of Z values at intermediate vertices.
<tt>2: 12da_to_from_gis.exe -zln <Points>.shp <Lines>.shp</tt><br />
<tt>3: 12da_to_from_gis.exe -zln <Points>.mif <Lines>.mif</tt><br />
<tt>4: 12da_to_from_gis.exe -zln <Lines_and_Points>.mif</tt>
=== CONVERT FROM 12DA TO MIF ===
<tt>5: 12da_to_from_gis.exe -mif <12da_file>.12da <Header>.mif</tt><br />
<Header>.mif is any .mif file with the correct projection.<br />
Will search input directory for "Header.mif" or "Projection.mif" if omitted.
=== CONVERT FROM 12DA TO SHP ===
<tt>6: 12da_to_from_gis.exe -shp <12da_file>.12da <Header>.prj</tt><br />
<Header>.prj is any .prj file with the correct projection.<br />
Will search input directory for "Header.prj" or "Projection.prj" if omitted.<br />
.4da extension also accepted.
Options:<br />
<tt>-hip</tt> includes 12D hipdata polylines.<br />
<tt>-xs</tt> creates TUFLOW .csv cross-section files and 1d_xs layer.
Output Options:<br />
<tt>-out <output_filename></tt> Specify the output file name.<br />
For conversions to .12da the "<tt>-model <model_name></tt>" option can be used to set the model name.
<tt>7: 12da_to_from_gis.exe -out output_file.12da <Lines>.mif</tt><br />
<tt>8: 12da_to_from_gis.exe -model 12d_Model_Name <Lines>.mif</tt>
=Frequently Asked Questions (FAQ)=
Line 51 ⟶ 116:
[[File:12da_TIN_export_screenshot.JPG|500px]] <br>
This change will be highlighted at the bottom of the Write 12da pop up box. See figure below. <br>
[[File:12da_TIN_export_screenshot_ANSI_Format_set.JPG|500px]]
Alternatively, an existing .12da file can easily be converted to ANSI encoding in Notepad++, under the Encoding menu: <br>
| |||