A natural visual panorama is a complex stimulus formed of many component shapes. It gives an animal a sense of place and supplies guiding signals for controlling the animal’s direction of travel [1]. Insects with their economical neural processing [2] are good subjects for analyzing the encoding and memory of such scenes [3, 4, 5]. Honeybees [6] and ants [7, 8] foraging from their nest can follow habitual routes guided only by visual cues within a natural panorama. Here, we analyze the headings that ants adopt when a familiar panorama composed of two or three shapes is manipulated by removing a shape or by replacing training shapes with unfamiliar ones. We show that (1) ants recognize a component shape not only through its particular visual features, but also by its spatial relation to other shapes in the scene, and that (2) each segmented shape [9] contributes its own directional signal to generating the ant’s chosen heading. We found earlier that ants trained to a feeder placed to one side of a single shape [10] and tested with shapes of different widths learn the retinal position of the training shape’s center of mass (CoM) [11, 12] when heading toward the feeder. They then guide themselves by placing the shape’s CoM in the remembered retinal position [10]. This use of CoM in a one-shape panorama combined with the results here suggests that the ants’ memory of a multi-shape panorama comprises the retinal positions of the horizontal CoMs of each major component shape within the scene, bolstered by local descriptors of that shape.