Line segment length measurement