Generalization of DEM for terrain analysis using a compound method