The most advanced logistics solutions that are currently adopted in ports and terminals use RFID- and GPS-based technologies to identify and localize shipping containers in the yard. Nevertheless, because of the limits of these techniques, the position of containers is still affected by some errors or it cannot be determined in real-time. We propose a non-conventional approach where the position of containers can be continuously determined by means of a wireless sensor network. Each container is equipped with a number of nodes that use wireless communication to detect neighbor containers. At the base station, geometrical constraints and proximity data are combined together to determine the relative positions of containers.