Data Types

The Data module defines classes that you can use to interact with data within a project. Use these classes to create, read, or edit objects of the corresponding type.

Conceptual Overview

An object in a project may be a geometric object representing some entity in three dimensional space, such as a line or surface, or it may be something more abstract, such as a colour map.

Primitive Types

Spatial objects are composed of lower order structures called primitives. The fundamental primitive is the point. A point is a location in space defined by Cartesian coordinates indicating the distance from the origin along the X, Y and Z axes. All other primitives are based on points. The following table lists the five primitive types:

Primitive Definition Visual Representation
Point A single location in space.
Edge A line segment between two points.
Facet A triangle defined by three points. The line segments between each pair of points are also edges.
Cell A quadrilateral defined by four points.
Block A cuboid defined by a centroid and a size in each dimension.

Spatial Object Types

Spatial object types can be classified based on the primitive type functioning as the basic “building block” for that type. The following table summarises the main spatial object types that can be accessed via the Python SDK:

Point-based
PointSet Represents a “point cloud” — an arbitrary set of points in space, with no topological links between points.

Edge-based
Polyline A sequence of edges defined by a sequence of points forming an open chain.
Polygon A sequence of edges defined by a sequence of points forming a closed chain.
EdgeNetwork An arbitrary collection of potentially disjoint edges, which may include polylines and/or polygons. An edge network is defined by a set of points and a set of edges connecting points.

Facet-based
Surface A set of facets typically used to represent a solid object.

Cell-based
GridSurface An alternative to Surface for representing solid objects using a grid of cells rather than facets.
Scan Similar to a point set, but specialised to store point cloud data acquired from a laser scanner. Although visualised as a point cloud, scans store each point internally using spherical coordinates relative to the acquisition origin rather than Cartesian coordinates.

Block-based
DenseBlockModel A block model constructed from a three dimensional grid of rectangular prism blocks all of which are the same size and shape. A DenseBlockModel’s extents are always completely filled with blocks.
SubblockedBlockModel A dense block model that allows blocks to contain smaller blocks, known as subblocks.

Annotations
Text2D A two-dimensional object containing custom text. As the text is two dimensional, it will never appear upside down or back to front regardless of the angle it is viewed from.
Text3D A three-dimensional object containing custom text. This text can appear upside down or back to front depending on the angle from which it is viewed. The size of the text is based on the real-world size, so size is measured in metres.
Marker A three dimensional object that can be used to mark locations. You can give markers a shape from a list of predefined shapes or can use a Surface object to define their shape.

Colour Maps
NumericColourMap An object that assigns numbers to colours. These maps can be used to colour objects via user-defined properties which are defined on each primitive in an object.
StringColourMap An object that assigns strings to colours. These maps can be used to colour objects via user-defined properties which are defined for each primitive in an object.