Abstract:Contour map is often used to display the spatial distribution of some hydrological elements, such as rainfall, groundwater level and etc. This paper introduces the weighted interpolation algorithm of inverse distance and the contour tracing method in triangle unit. The plotting method of contour map is encapsulated as TContour class with C++ programming language, which has the characteristics of simplification, high efficiency and good expandability. TContour can be widely used for the automatic plotting of hydrologic elements contour map, and is helpful to the software integration.