We consider the acceleration of charged particles and anomalous cosmic rays (ACR) at propagating shocks and especially at the heliospheric termination shock, when upstream variations cause spatial variations along the shock face, or, alternatively, if the global spatial geometry causes the shock to vary. Here we present the results a new analytic solution for the case of a shock in which the injection low-energy particles varies with position along the shock face. We find that, downstream of the shock, positive spatial gradients together with modulation-like and multiple-power-law spectral features are naturally produced by plausible spatial variations at the shock. Similar effects also result from large-scale or global spatial structure. These various effects show promising qualitative agreement with observations at and near the heliospheric termination shock, suggesting that they may play an important role.