Spectral analysis enhances the ability to analyze groundwater flow at a steady state by separating the top boundary condition into its periodic forms. Specifically, spectral analysis enables comparisons of the impact of individual spatial scales on the total flow field. New exact spectral solutions are presented for analyzing 3D groundwater flow with an arbitrarily shaped top boundary. These solutions account for depth-decaying, anisotropic and layered permeability while utilizing groundwater flux or the phreatic surface as a top boundary condition. Under certain conditions, groundwater flow is controlled by topography. In areas where the groundwater flow is controlled by the topography, the unknown water table is often approximated by the topography. This approximation induces a systematic error. Here, the optimal resolution of digital elevation models (DEMs) is assessed for use as a top boundary in groundwater flow models. According to the analysis, the water-table undulation is smoother than the topography; therefore, there is an upper limit to the resolution of DEMs that should be used to represent the groundwater surface. The ability to represent DEMs of various spectral solutions was compared and the results indicate that the fit is strongly dependent on the number of harmonics in the spectral solution.