To obtain digital terrain models approximated with mathematical models is an important engineering trouble, since the availability of a surface model allows to simulate processes and to experience in the modeled surface regardless of the model itself, obviating the risks and indefinitely repeating experimentation. Since late last century, the interest on the study of digital elevation models (DEM) has been increasing largely due to the ease represent working with the surface of study in laboratory, tests can report a similar behavior to the actual surface in case of extraordinary events, or search that can predict the behavior of the same events. However, the complexity of the topography makes the models obtained based on their mathematical representation no more than a symbolic meaning, so in practice the elevations of an area are given from subregions from equations applying only for that zone. As a result historical studies had focused on searching and finding the way these models represent better the study area, rather than get those models from a single mathematical function. In this paper the DEM equations for a portion of plain surface of Mexico, through which a river, was obtained by means of the evolutionary computation algorithm of genetic programming (GP), only arithmetic operators were considered and the results between measured and calculated contour levels were compared. Additionally an estimation of areas prone to flooding caused by extraordinary events was made. Genetic programming (GP) proved to be a useful tool to estimate the topographic elevations of the analysed plain area; the representation of the actual terrain by means of several correspondence rules was the best solution obtained with this evolutionary computation algorithm. These models can be a valuable tool in numerical simulatons of two-dimensional flow performed by the hydraulic engineer.