1. A computer-implemented method to generate a memory-efficient representation of a sequence of electrically connected routing shapes, the method comprising: representing the sequence of electrically connected routing shapes using a sequence of points, wherein a first routing shape is represented using two consecutive points: a first point and a second point; and generating the memory-efficient representation by: generating a full representation of the first point, which specifies the first point's location using the first point's two-dimensional coordinates; and generating a compact representation of the second point, which specifies the second point's location using one of the second point's two-dimensional coordinates and an orientation indicator which indicates the first routing shape's orientation.