<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.tuflow.com/w/index.php?action=history&amp;feed=atom&amp;title=Tute_M04_QGIS_1D2D_Breaklines_Archive</id>
	<title>Tute M04 QGIS 1D2D Breaklines Archive - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.tuflow.com/w/index.php?action=history&amp;feed=atom&amp;title=Tute_M04_QGIS_1D2D_Breaklines_Archive"/>
	<link rel="alternate" type="text/html" href="https://wiki.tuflow.com/w/index.php?title=Tute_M04_QGIS_1D2D_Breaklines_Archive&amp;action=history"/>
	<updated>2026-07-11T02:50:17Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.9</generator>
	<entry>
		<id>https://wiki.tuflow.com/w/index.php?title=Tute_M04_QGIS_1D2D_Breaklines_Archive&amp;diff=31372&amp;oldid=prev</id>
		<title>ElizaCollison: Created page with &quot;=Introduction= In this section we will define within the model the elevation of the 2D cells activated by the HX lines we created in the previous step. The elevation of the HX...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.tuflow.com/w/index.php?title=Tute_M04_QGIS_1D2D_Breaklines_Archive&amp;diff=31372&amp;oldid=prev"/>
		<updated>2023-01-06T06:02:15Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=Introduction= In this section we will define within the model the elevation of the 2D cells activated by the HX lines we created in the previous step. The elevation of the HX...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Introduction=&lt;br /&gt;
In this section we will define within the model the elevation of the 2D cells activated by the HX lines we created in the previous step. The elevation of the HX activated cells control the flux between the 1D and 2D domains, and so it is important that the cell elevations reflect the true water level required for flow to cross the HX boundaries.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
As we have the HX lines in a 2d_bc format, we can add the elevation points in the same format.  Alternatively, we could use the 2D Z Shape (2d_zsh) format that was used in module three of the tutorial.  If using this format it is important to ensure that a &amp;quot;thick&amp;quot; breakline format is used (by specifying a width greater than 0, and less than 1.5 times the cell size). &lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
To create the breaklines we are going to convert the vertices along the &amp;quot;HX&amp;quot; lines to points and then sample the elevations from the DEM.  Another method would be to create a buffer (region) around each of these points and sample for the maximum elevation within the buffer.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
In order to convert the line vertices to points we will use a plugin called &amp;#039;&amp;#039;&amp;#039;MMQGIS&amp;#039;&amp;#039;&amp;#039;. For more information on this plugin please see [http://michaelminn.com/linux/mmqgis/ http://michaelminn.com/linux/mmqgis/].&lt;br /&gt;
&amp;lt;br&amp;gt;To inspect the elevations at the points we will use another plugin called &amp;#039;&amp;#039;&amp;#039;Point Sampling Tool&amp;#039;&amp;#039;&amp;#039; for more information see [[QGIS_Point_Sampling_Plugin | this QGIS tip].&lt;br /&gt;
&lt;br /&gt;
=Method=&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Select all the &amp;quot;&amp;#039;&amp;#039;&amp;#039;HX&amp;#039;&amp;#039;&amp;#039;&amp;quot; lines from the  &amp;#039;&amp;#039;&amp;#039;2d_bc_M04_HX_001_L&amp;#039;&amp;#039;&amp;#039; layer.  To do this use open the attribute table for the layer (right click on the layer in the Table of Contents and select &amp;#039;&amp;#039;Open Attribute Table&amp;#039;&amp;#039;.  Use the select function &amp;quot;Type&amp;quot; equal to &amp;quot;HX&amp;quot;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;TYPE = &amp;#039;HX&amp;#039;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;To create points from these we need to save these as a separate table.  This will not be read into TUFLOW and can be deleted at the end of this step.  Save the selection as &amp;#039;&amp;#039;&amp;#039;tmp_M04_HX_lines&amp;#039;&amp;#039;&amp;#039;.  To export a selection as a new layer in QGIS, right click on the layer in the table of contents, select &amp;#039;&amp;#039;Save As...&amp;#039;&amp;#039; and check the box &amp;#039;&amp;#039;Save only selected features&amp;#039;&amp;#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Next we need to convert the vertices along these lines to points.  This process uses the &amp;#039;&amp;#039;&amp;#039;MMQGIS&amp;#039;&amp;#039;&amp;#039; plugin described in the introduction.  Ensure that the plugin has been loaded.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;From the menu select &amp;#039;&amp;#039;Plugins &amp;gt;&amp;gt; mmqgis &amp;gt;&amp;gt; Modify &amp;gt;&amp;gt; Convert Geometry Type&amp;#039;&amp;#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:QGIS Lines to Points.jpg|500px]]&lt;br /&gt;
&amp;lt;li&amp;gt;Set the following:&amp;lt;br&amp;gt;&lt;br /&gt;
* The source layer to be the temporary file containing the HX lines (&amp;#039;&amp;#039;&amp;#039;tmp_M04_HX_lines&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
* The new geometry type to &amp;#039;&amp;#039;&amp;#039;Nodes&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* The output file to &amp;#039;&amp;#039;&amp;#039;tmp_M04_HX_points&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Select ok to complete the conversion.&lt;br /&gt;
&amp;lt;li&amp;gt;Ensure the DEM (&amp;#039;&amp;#039;&amp;#039;DEM_M01&amp;#039;&amp;#039;&amp;#039;) is open.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt; The next step is to inspect the elevations from the DEM.  To do this we will use the point sampling plugin; make sure this is installed.&amp;lt;br&amp;gt;&lt;br /&gt;
Once installed the plug can be accessed from the &amp;quot;Plugins &amp;gt;&amp;gt; Analyses&amp;quot; menu item.&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:QGIS Plugin PointSamplingTool Use.png|400px]]&lt;br /&gt;
&amp;lt;li&amp;gt;Set the input layer as the intermediate &amp;#039;&amp;#039;&amp;#039;tmp_M04_HX_points&amp;#039;&amp;#039;&amp;#039; layer containing the points.  Select all of the attributes on the &amp;#039;&amp;#039;&amp;#039;tmp_M04_HX_points&amp;#039;&amp;#039;&amp;#039; and also the DEM. These are the fields that are output.  Set the output name as &amp;#039;&amp;#039;&amp;#039;2d_bc_M04_HX_001_P&amp;#039;&amp;#039;&amp;#039;and output this to the &amp;#039;&amp;#039;&amp;#039;TUFLOW\model\gis\&amp;#039;&amp;#039;&amp;#039; folder.  This file will be input to TUFLOW.&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:Tute M04 QGIS 2d breaklines 03.jpg|600px]]&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Once the points have been created we need to update the &amp;quot;TYPE&amp;quot; attribute to &amp;quot;&amp;#039;&amp;#039;&amp;#039;ZP&amp;#039;&amp;#039;&amp;#039;&amp;quot;. This tells TUFLOW that the points contain elevation points.  To update the column, use the field calculator to update the &amp;quot;TYPE&amp;quot; attribute for &amp;lt;u&amp;gt;all&amp;lt;/u&amp;gt; points to be &amp;quot;ZP&amp;quot;.  Set the &amp;quot;FLAGS&amp;quot; to blank (&amp;quot;&amp;quot;).&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;For elevation points contained in the 2d_bc format, we need to copy the values from the &amp;quot;&amp;#039;&amp;#039;&amp;#039;dem_m01&amp;#039;&amp;#039;&amp;#039;&amp;quot; column to the &amp;quot;&amp;#039;&amp;#039;&amp;#039;f&amp;#039;&amp;#039;&amp;#039;&amp;quot; column.  To update this, open the attribute table and select &amp;#039;&amp;#039;Field Calculator&amp;#039;&amp;#039;.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;In the dialogue box select &amp;quot;Update existing field&amp;quot;, choose column &amp;quot;&amp;#039;&amp;#039;&amp;#039;f&amp;#039;&amp;#039;&amp;#039;&amp;quot; from the drop down menu, in the &amp;quot;Expression&amp;quot; tab expand &amp;quot;Fields and Values&amp;quot; and double click on &amp;quot;&amp;#039;&amp;#039;&amp;#039;dem_m01&amp;#039;&amp;#039;&amp;#039;&amp;quot;, click OK.&amp;lt;/li&amp;gt;&lt;br /&gt;
[[File:M04 Field Calculator Marked.png]]&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;2d_bc_M04_HX_001_P&amp;#039;&amp;#039;&amp;#039; which contains elevation points for the &amp;quot;HX&amp;quot; line has been created.  Please return to the tutorial where the next step is to &amp;lt;u&amp;gt;[[Tutorial_Module04_Archive#Deactivate_2D_Cells | deactivate the 2D cells in the creek areas.]]&amp;lt;/u&amp;gt;&lt;/div&gt;</summary>
		<author><name>ElizaCollison</name></author>
	</entry>
</feed>