Compensation for near-surface heterogeneity is an important part of the seismic reflection method. The problem is solved by continuing the observed wavefield to a horizontal datum. Traditionally, two reflection traveltime curves determined from survey and datum lines are related by static shift corrections. In this paper, we solve a continuation problem in which the relation between the traveltimes of the observed and continued wavefields is given by the root-mean-square velocity equation for a two-layer earth model. A comparative analysis of the two methods of compensation for surface heterogeneity due to the variable altitude of the ground surface is made.