Eye4Software Hydromagic

  Hydrographic Survey Software

Download free demo version

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
Example of a Hydromagic matrix with generated contours as overlay.

Creating contours

To generate depth contours, you must have created a matrix first. A matrix can be generated from depth data, elevation data, bottom information data or other sensor data like temperature.

Create depth contours tool
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 data source, and select the "Generate Contours..." option from the popup menu:

Start the contour generator from the matrix 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. By clicking the "Properties..." button, next to the name of the matrix, you can show it's properties, like depth or elevation range and the spacing used to generated the matrix.

Click the Properties button to show more information
Click the "Properties..." button to show more information.

Output options

Output Format

Use the output format drop down box to select in which file format 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 be written as well, allowing you to import the file into third party CAD or GIS software.

Select output file format for contour shapes
Use the drop down selection box to select the output file format.

Output File

The generated contour lines will be written to a file with the selected output format and added to the project. Click the "Browse..." button to select the location and file name 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 level(s), or use 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.

Generate contour levels
Auto generate contour levels

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, just a little bit 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 the shape smoothing level
Select a smoothing level to remove unnatural sharp edges.


When all settings are correct, click the "OK" button to finish 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.

The elevation or depth values can be toggled in the map display options window
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 displays 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.

Please 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 values can be toggled in the map display options window
The elevation or depth labels can be toggled
in the "Map Display Options" window.

Managing contours

Show / Hide contours

To temporary hide or show a collection of contour lines, just 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 fopm 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 popup menu, and confirm the action.

Remove the generated contours from the project
use the "Project Manager" to remove contours from your project.

Export contours to Google Earth

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.

Export contours to Google Earth
Select the contour vector files by setting checks.

Video tutorial

This video tutorial shows how to generate contours from a matrix or DEM.