the crane such as trolley 8 the y direction may be measured by an additional sensor means arranged at the ends of the trolley 8 or may be estimated from an ideal position in a ground slot the position of the top container comprising the stacking target is measured as shown in fig9 using 3 d scanners 10 11 measurements such as a or b together with c or d may be taken to measure the alignment and in particular to measure the skew of the long axis of a container when the horizontal position has been measured for the stacking target 15 and a horizontal position determined for the ground container 1 the two positions are compared using a control unit of the crane a relative overlap of the stacking target 15 with respect to the position of the ground container 1 is examined and compared to predetermined limits if the overlap is within limits a landing may proceed and so a desired position on the stacking target will then be determined a vertical stacking envelope for a stacking target consisting of an envelope projected up from the ground container to the top of the stack and above is generated from measurements by 3 d scanners 10 11 indicated in fig8 the dimensions of the vertical stacking envelope in a horizontal plane include the maximum horizontal displacement found for all containers in the stack the vertical envelope for the stacking target 15 is compared to the distances measured and stored to containers in adjacent stacks if the horizontal distance.