2d Contour



2d Contours

The standard method for contouring involves the interpolation of measured values onto a rectangular mesh and contouring of the gridded data.  Inverse distance, kriging, and natural neighbor are offered as interpolation methods.  Contours are constructed using either the xfarbe routines (Algorithm 671 - FARB-E-2D: Fill Area with Bicubics on Rectangles, ACM Transactions on Mathematical Software, vol. 15, no. 1, March 1989) or a 2d version of the marching cubes algorithm.  In the case of contours generated on a vertical profile, the interpolation is performed in three dimensions to obtain the data values on a three dimesional grid.  In plan mode, the interpolation procedure does not consider the elevation or depth of a particular measurement in its interpolation onto the rectangular mesh corner points, although data queries can exclude source data measurements by depth or elevation.  If for instance, you wish to contour only the shallow measurements then set your depth or elevation query to select only those measurements.

An alternative triangulation contouring procedure is available for plan view contours.   This involves the generation of triangles, with corners at the location of the measured data points.  Then the contours are constructed within each triangle based on linear interpolation and the values of the contoured data at the corner nodes.  This method is frequently useful for data reported on a rectangular grid.

Click here to view a training video on contouring using the inverse distance interpolation method in EnviroInsite.

Click here to view a training video on contouring using the kriging interpolation method in EnviroInsite.

Contouring Tips

Confine the rectangular area where the contouring is to occur to the area where you actually have data.  To do so go to the Grid tab within the Contour dialog window and hit the draw grid button.  Then draw a rectangle that excludes areas beyond the extent of your data.

For contouring values that vary over several orders of magnitude, select the Log Transform button in the Format tab of the Contour dialog box.  This will cause it to do the interpolation on the log of the values rather than the actual values.  The effect is to reduce the spread of the contours away from the peak values.

Use the kriging interpolation option.   In many cases, the inverse distance interpolation will create a kind of bubbly effect around the data points.  Natural neighbor depends on triangulation and can be problematic if you want to contour to the edge of your data or beyond.

Adjust the kriging interpolation range values to some distance over which you want the measured values to have an impact on the contours.  If you are finding for instance that there are high values at some distance from some peak measurement you may want to reduce the range.  Reducing the search radius may have the same impact as reducing the range, although this may cause the results to be non-smooth.

If you know the direction of flow, you may want to elongate the peristence of interpolated values in the direction of flow.  You can do this by selecting the kriging interpolation option and adjusting the maximum range.  Then set the maximum range angle so that it is aligend with the direction of ground-water flow.  The angle is specified in degrees clockwise relative to due north.






Contour Setup Dialog








This tab allows the user to define the grid on which the measured values will be interpolated prior to contouring.  Increasing the number of cells may improve the faithfulness of the contoured result to the interpolated field, but increases the time to generate the contours.


This tab allows the user to select the interpolation scheme and the parameters of the interpolation method.  The correct selection of interpolation parameters is critical for generation of contours that accurately reflect the field data and our expectations of how the values vary between the measured data points.  The default parameters are frequently adequate, although some improvement can be anticipated through trial and error. 


Kriging Parameter

The kriging routines are derived from the kt3d routine of the Geostatistical Software Library (GSLIB) authored by Clayton Deutsch and Andre Journel (www.gslib.com). 

The reference, GSLIB: Geostatistical Software Library and Users' Guide is highly recommended.  Here are the spherical semivariogram models used by EnviroInsite for an isotropic system, where h is the lag, c is the sill, and a is the (practical) range.  This is from this link to an introductory text on kriging:  Click here for an introductory text on the variogram models

For anisotropic systems h/a in the previous is calculated as


Natural Neighbor Parameters

The natural neighbor interpolation makes use of an adapted version of the public domain nn code developed by Pavel Sakov of CSIRO Marine Research.


Virtual Points

Virtual points are used to control the generation of contours with sparse data.  In those cases or in cases of water bodies that are hydraulically continuous with groundwater, it may be advantageous to create virtual measurement points that will control the resulting contours.