Generate depth contours
Contour lines are lines connecting points with the same depth, elevation or other data. Contour lines are also known as iso-lines. During the generation of contour lines from a matrix, the scattered points are converted to regularly spaced data using a TIN (Triangulated Irregularly Network). This TIN is generated using a Delaunay triangulation algorithm. After this step, Hydromagic calculates the contour lines by determining the positions where the depth contour crosses the calculated triangles. All these lines are connected to each other, and stored as a vector layer, which is saved as an AutoCAD DXF or ESRI Shape file and added to the current Hydromagic project.
In addition, the generated contours can be smoothed using a B-spline interpolation algorithm in cases where you do not want unnatural looking sharp edges in the contour lines.
Example of a Hydromagic matrix with generated contours as overlay.
Creating contours
To generate depth contours, you must first create a matrix. A matrix can be generated from depth data, elevation data, bottom information data or other sensor data like temperature.
Hydromagic ships with a built-in tool which generates contour lines
from a matrix or digital elevation model.
Open the 'Generate Contours' tool by right-clicking the matrix you want to use as the data source, and select the "Generate Contours..." option from the popup menu:
Right click a matrix in the "Project Explorer" and select the
"Generate Contours" option to start the contouring tool.
Input options
Input matrix
This field has been added in Hydromagic version 10.1. It just shows the matrix which has been selected to generate contour lines from. Click the 'Properties...' button next to the name of the matrix to show its properties, such as depth or elevation range and the spacing used to generate the matrix.
Click the "Properties..." button to show more information.
Output options
Output Format
Use the output format dropdown box to select the file format in which you want to save the contour shapes. At this moment the supported file formats are: AutoCAD DXF file (default) and ESRI shapefile. In addition to the file containing the shapes, a projection file will also be written, allowing you to import the file into third-party CAD or GIS software.
Use the drop down selection box to select the output file format.
Output File
The generated contour lines will be written to a file in the selected output format and added to the project. Click the 'Browse...' button to select the location and filename of the output file. When the file name already exists, the software asks you whether to overwrite the existing file first.
Contour options
Contour Levels
You can generate contours using fixed levels or color ranges. You can also combine the two options. Using a fixed level can be useful, to display a reference line (for instance the dredging depth) to see what's above and below this line. You can enter multiple levels by separating them using semicolons. When using the color ranges, the levels displayed as colors will be accentuated.
Contour smoothing
When generating depth contours from a TIN model containing large triangles, it happens often that sharp edges appear in the contour lines. To make the lines look more pleasant for the eye, you can enable the "Use contour smoothing" option to use a B-Spline algorithm to smoothen the lines. Please note that choosing a higher smoothing level will slow down the contour generation process.
The level settings allows you to set the degree of smoothing. When using level 1, a small amount of smoothing is applied, while level 9 applies the most. A good value to start with is level 5. When contours are starting to cross, you might want to try a lower level.
Select a smoothing level to remove unnatural sharp edges.
Finish
When all settings are correct, click the 'OK' button to complete the process. The software will now create the TIN model, and generate the contour lines. You will have to wait a couple of seconds, depending on the number of records your sounding contains. When ready, the dialog will disappear, and the contours are drawn on the screen.
Example of a Hydromagic matrix with generated contours and values.em>
Elevation or depth labels
When the contour shapes are displayed in the map view, the software automatically shows the elevation or depth values next to the generated lines. These values can be switched on or off. To toggle the values, right click the "Maps" folder in the "Project Explorer" and select the "Display Options..." option. In the window which appears, you can toggle the "Display elevation labels for poly(lines)" check box.
Note that the elevation labels are not stored as separate shape objects in the exported file. Hydromagic will draw elevation labels for each polyline in any CAD file which has an elevation assigned to it. These values can also be shown or hide with the "Display elevation labels for poly(lines)" check box.
The elevation or depth labels can be toggled
in the "Map Display Options" window.
Managing contours
Show / Hide contours
To temporarily hide or show a collection of contour lines, click the 'eye' icon in front of the contour name. When hidden, the contour is still loaded, but just not shown on the screen.
Delete contours
To remove a collection of contour lines from your project, look for the name in the "Project Explorer" and right click on it. Please note that the contour map is only removed from the project. The file will not be deleted and stay in the project folder.
Select the 'Remove Map...' option from the pop-up menu and confirm the action.
use the "Project Manager" to remove contours from your project.
Export contours to Google Earth
Example of a matrix with contour lines overlay exported as KML file.
Once the contours have been generated and added to the project, you can also export the contours as Google Earth KML file. You can open the "Export KML data" tool directly from the "File" => "Export" menu.
Select the contour vector files by setting checks.
Video tutorial
This video tutorial shows how to generate contours from a matrix or DEM.