In Geophysics, topographic factors are observations that can be directly measured, but they are often ignored to simplify the model. Studying the coseismic deformation caused by earthquakes is helps to accurately determining the parameterization of the epicenter and providing a reference for the reasonable layout of coseismic observation stations and GNSS observation stations. After the Mw7.8 earthquake in Nepal in 2015, GCMT, USGS, GFZ, CPPT, and other institutions released their epicenter parameter. However, according to their parameters, the coseismic displacements simulated by the spectral-element method are quite different from the GNSS observations. Firstly, this paper inverts the geometric parameters of the seismogenic fault with Nepal’s coseismic GNSS displacement. The spectral-element method determines the source's location and depth under the heterogeneous terrain and outputs the source parameters. Among the results of many studies, the surface source is more consistent with the generation mechanism of large earthquakes. Secondly, this paper calculates the fault slip distribution of this earthquake using SDM(Steepest Descent Method) based on GNSS and InSAR data, which is divided into 1500 subfaults and the moment tensor of each subfault is calculated. This paper studies the distribution characteristics of the coseismic deformation field of the Mw7.8 earthquake in Nepal in 2015 under homogeneous terrain, and heterogeneous terrain. The results show that the influence of only homogeneous terrain factors is ~ 20%. This paper believes that the influence of the undulating terrain on the calculation of coseismic deformation cannot be ignored.