The wContour class library was developed using Java and C# to implement the contour-related algorithms used in software development for data analysis in the geosciences using the Java or .NET environment. The comprehensive description of the algorithms for contour line tracing, filling and clipping of the complex grid data with many irregularly distributed undefined value points was given. Border lines were traced from beginning and contour polygons with holes were output finally. Inverse distance weighted (IDW) and Cressman objective analysis methods are provided for discrete data interpolation to grid data. Algorithms for contour line tracing, smoothing, filling and clipping are included to fulfil the contour functions from complex grid data. A streamline analysis method is also provided.


  • Wang, Y.Q. 2012. wContour: A .NET class library of contour-related algorithms. Computers & Geosciences, 48: 330-333.

Supported Algorithms:

  • IDW (Inverse distance weighted) interpolation

  • Cressman interpolation

  • Tracing contour lines from complex grid data

  • Tracing contour polygons

  • Streamline analysis

Source code

Screen shots:

../../_images/wcontour_1.png ../../_images/wcontour_2.png ../../_images/wcontour_3.png ../../_images/wcontour_4.png ../../_images/wcontour_5.png ../../_images/wcontour_6.png ../../_images/wcontour_7.png ../../_images/wcontour_8.png ../../_images/wcontour_9.png