Transform - Tiles: Contour

The Contour template appears in the template list when a raster tile field, of type Tile, has been picked in the Transform pane.  The template creates a drawing with vector areas or vector lines representing contours for terrain heights.

 

Contour

Using values in the specified Channel of a raster image as heights of terrain, create a drawing with vector areas or vector lines representing contours for the terrain heights from the specified minimum height to maximum height, using intervals of the given Step.

 

Launch the template by choosing a Tile field and then double-clicking the Contour template.  When the template launches we can specify options.

 

 

Contour : area

Using values in the specified Channel of a raster image as heights of terrain, create a drawing with vector areas representing contours for the terrain heights from the specified minimum height to maximum height, using intervals of the given Step.   Each area record will have ValueMin and ValueMax attribute fields giving the minimum and maximum height for that contour area.  

 

Clicking Full Range will automatically load the Start and End boxes with minimum and maximum elevation values found in the channel.  Checking Round start and end to step will round the values of the start and end contours to align as round numbers with the step amount.

 

The Split into shapes option, when checked (default), will automatically split all areas for the same contour interval values into separate area objects.   Unchecking this option will result in the creation of a single, multibranched area for each contour interval.  This makes for a simpler results table and the ease of selecting all like contours with a single Ctrl-click, but when creating contours for larger raster data it can result in very large objects, consisting of millions of coordinates, to represent all of the branches.

 

Leaving the Split into shapes option checked also has the advantage that if any of the created area objects exceeds 64 million coordinates, Manifold will automatically split it into more than one area object so that each stays less than 64 million coordinates in size.

 

We will use an example image that shows terrain elevation in the vicinity of Mount Hood, in Oregon.

 

 

With the focus on the map window, in the Transform pane we choose the N45W122_dem image and the Tile field, and we double-click the Contour template to launch it.

 

 

In the Contour template, we choose channel 0 for the Channel and area as the Output type.  We press the Full Range button to load the Start and End boxes with the lowest and highest elevations in the raster.   We enter 300 as the Step.

 

We check the Round start and end to step box and the Split into shapes box.

 

For the Result destination, we choose New Table and then enter N45W122 contour areas as the name of the new drawing, with an analogous name for the new table.  We could use whatever names we want for the names of the new drawing and table, but it is wise to use names that remind us of what they are supposed to be.

 

Press Transform.  

 

A new drawing called N45W122 contour areas appears in the Project pane.   We drag and drop the new N45W122 contour areas drawing into the map as a layer.

 

Comparing the original image to the result:

 

 

In the illustration above, we have styled the N45W122 contour areas to thematically format the contour areas by ValueMin height using the CB Spectral palette, with lower areas in blue and higher areas in red.  We have also used the Layers pane to set opacity to 60% for the layer, so that the terrain from below can slightly show through.

 

See the Example: Contour Areas and Contour Lines topic for a step-by-step example.    To learn how to create contour areas on whatever intervals we want, and not just evenly-spaced intervals, see the SQL Example: Custom Contour Intervals topic for an easy method.

 

See the 5 Minute Tutorial - Fast and Easy Contours video for a quick example of contouring.

 

Contour : line

Using values in the specified Channel of a raster image as heights of terrain, create a drawing with vector lines representing contours for the terrain heights from the specified minimum height to maximum height, using intervals of the given Step.   Each line record will have a Value attribute field giving the height for that contour line.   

 

Clicking Full Range will automatically load the Start and End boxes with minimum and maximum elevation values found in the channel.  Checking Round start and end to step will round the values of the start and end contours to align as round numbers with the step amount.

 

The Split into shapes option, when checked (default), will automatically split all lines for the same contour value into separate line objects.   Unchecking this option will result in the creation of a single, multibranched line for each contour value.  This makes for a simpler results table and the ease of selecting all like contours with a single Ctrl-click, but when creating contours for larger raster data it can result in very large objects, consisting of millions of coordinates, to represent all of the branches.

 

Leaving the Split into shapes option checked also has the advantage that if any of the created line objects exceeds 64 million coordinates, Manifold will automatically split it into more than one line object so that each stays less than 64 million coordinates in size.

 

We will use an example image that shows terrain elevation in the vicinity of Mount Hood, in Oregon.

 

 

With the focus on the map window, in the Transform pane we choose the N45W122_dem image and the Tile field, and we double-click the Contour template to launch it.

 

 

In the Contour template, we choose channel 0 for the Channel and area as the Output type.  We press the Full Range button to load the Start and End boxes with the lowest and highest elevations in the raster.   We enter 300 as the Step.

 

We check the Round start and end to step box and the Split into shapes box.

 

For the Result destination, we choose New Table and then enter N45W122 contour lines as the name of the new drawing, with an analogous name for the new table.  We could use whatever names we want for the names of the new drawing and table, but it is wise to use names that remind us of what they are supposed to be.

 

Press Transform.  

 

A new drawing called N45W122 contour lines appears in the Project pane.   We drag and drop the new N45W122 contour lines drawing into the map as a layer.

 

Comparing the original image to the result:

 

 

In the illustration above, we have styled the N45W122 contour lines to thematically format the contour lines by Value height using the CB Spectral palette, with lower lines in blue and higher lines in red.

 

See the Example: Contour Areas and Contour Lines topic for a step-by-step example.    To learn how to create contour areas on whatever intervals we want, and not just evenly-spaced intervals, see the SQL Example: Custom Contour Intervals topic for an easy method.

 

See the 5 Minute Tutorial - Fast and Easy Contours video for a quick example of contouring.

 

 

Notes

Zoom in for previews: The system shows a preview for data in the current viewport if reasonable. If a preview does not appear, zoom further into the display to reduce the quantity of data in the viewport.

 

Everything Math - For a handy reference to anything in mathematics, see the Wolfram MathWorld site.   Thank you, Wolfram!

 

See Also

Transform Pane

 

Transform Reference

 

Transform - Tiles