Properties of the seafloor can be determined from the horizontal wave numbers of the normal modes of sound propagation. The wave numbers can be extracted from the harmonic sound field measured in range-independent media using a single hydrophone, by applying a Hankel transform to compute the wave-number spectrum from the field when either the source or hydrophone (not both) are towed [S. D. Rajan et al., J. Acoust. Soc. Am. 82, 998--1017 (1987), for example]. In range-dependent environments, the wave numbers vary owing to changes in bathymetry and geoacoustics, and this smears the wave-number spectrum, making the extraction of individual modes uncertain, if not impossible. This is particularly true for high-order modes which, penetrating more deeply into the sediment layers, provide more information about the sediments than low-order modes. A wave-number demodulation technique is derived from an adiabatic mode model whereby range-dependent wave numbers can be extracted from a considerably smeared spectrum. This not only extends the wave-number-based measure of seafloor properties to weakly range-dependent environments, but it provides a method for localizing a moving source in range-dependent shallow waters, simply by matching wave-number tracks in time with bathymetry maps.