During active sensation, sensors scan space in order to generate a representation of the outside world. However, since spatial coding in sensory systems is typically addressed by measuring receptive fields in a fixed, sensor-based coordinate frame, the cortical representation of scanned space is poorly understood. To address this question, we probed spatial coding in the rodent whisker system using a combination of two-photon imaging and electrophysiology during active touch. We found that surround whiskers powerfully transform the cortical representation of scanned space. On the single-neuron level, surround input profoundly alters response amplitude and modulates spatial preference in the cortex. On the population level, surround input organizes the spatial preference of neurons into a continuous map of the space swept out by the whiskers. These data demonstrate how spatial summation over a moving sensor array is critical to generating population codes of sensory space.