An apparatus for converting point cloud data of a set of one or more objects into three-dimensional representations of the set of objects, the three-dimensional representations comprising line segments, the apparatus comprising: means for generating point cloud data of the set of objects, wherein the means for generating point cloud data is a light detecting and ranging -LIDAR- scanner or is a scanner comprising: a camera configured to capture one or more images of a set of objects; and a processor configured to perform photogrammetry techniques on the images; means for partitioning a space occupied by the point cloud data of the set of objects into a plurality of volumes, which are non-overlapping cubes, wherein neighbouring cubes share one or more common faces, edges or vertices; means for determining whether the points in each cube coexist on a plane, wherein such cubes are designated plane cubes and the plane on which points coexist is designated as the plane of the plane cube; characterized by means for combining a first plurality of neighbouring plane cubes whose planes are approximately coplanar into a plane cube set, wherein the approximately coplanar planes are identified as a larger common plane; means for identifying a plane edge cube set of the plane cube set, by identifying cubes in the plane cube set that neighbour empty cubes which are intersected by the common plane; means for estimating a cloud boundary point for each edge of each cube in the plane edge cube set, wherein an edge is defined by the intersection of the common plane of the plane cube set with a boundary between a cube in the plane edge cube set and an empty cube; means for identifying where cloud boundary points lie close to lines formed by the intersections of the common planes; means for moving the positions of the cloud boundary points on to the intersection lines; means for determining whether the points in each cube coexist on a line, wherein such cubes are identified as line cubes and the line on which points coexist is identified as the line of the line cube; means for combining a first plurality of neighbouring line cubes which are intersected by approximately collinear lines into a line cube set, wherein the intersecting lines are identified as a larger line; and means for identifying end points to define one or more line segments along the common line of each line cube set. a camera configured to capture one or more images of a set of objects; and a processor configured to perform photogrammetry techniques on the images; means for partitioning a space occupied by the point cloud data of the set of objects into a plurality of volumes, which are non-overlapping cubes, wherein neighbouring cubes share one or more common faces, edges or vertices; means for determining whether the points in each cube coexist on a plane, wherein such cubes are designated plane cubes and the plane on which points coexist is designated as the plane of the plane cube; characterized by means for combining a first plurality of neighbouring plane cubes whose planes are approximately coplanar into a plane cube set, wherein the approximately coplanar planes are identified as a larger common plane; means for identifying a plane edge cube set of the plane cube set, by identifying cubes in the plane cube set that neighbour empty cubes which are intersected by the common plane; means for estimating a cloud boundary point for each edge of each cube in the plane edge cube set, wherein an edge is defined by the intersection of the common plane of the plane cube set with a boundary between a cube in the plane edge cube set and an empty cube; means for identifying where cloud boundary points lie close to lines formed by the intersections of the common planes; means for moving the positions of the cloud boundary points on to the intersection lines; means for determining whether the points in each cube coexist on a line, wherein such cubes are identified as line cubes and the line on which points coexist is identified as the line of the line cube; means for combining a first plurality of neighbouring line cubes which are intersected by approximately collinear lines into a line cube set, wherein the intersecting lines are identified as a larger line; and means for identifying end points to define one or more line segments along the common line of each line cube set.