The dynamical scattering amplitude of an imperfect crystal. III. A dynamical diffraction equation for topography in the spatial coordinate representation