Eight-point method-based contour-line tracing algorithm

The invention discloses an eight-point method-based contour-line tracing algorithm. Topographical feature influence factors in reality are blended; when a contour line comes across an exit selection condition, eight-point method expansion and judgment can be carried out; after current regional topographical features are judged, tracking exit acceptation or rejection is carried out, so that the contour line is prevented from tracking a wrong exit, the contour line does not cut apart a large landform, and does not generate a wrong small circle in valley and ridge areas; finally the contour line can restore the real topographical features; a drawn contour line map is relatively beneficial to simple and intuitive comprehensive analysis. The eight-point method-based contour tracing algorithm is widely applied to the geoscience fields such as building of a hydrological model, terrain simulation, surveying and planning of roads and railways, and natural resource management; a plurality of advantages are shown; the algorithm is simple and clear, and is convenient to process by virtue of a computer; the contour line, the slope and the gradient can be easily calculated; the terrain is automatically extracted.