Data and Objects
The basic purpose of most scripts is to interact with data in some way, usually to transform it to achieve some outcome. Here we present an overview of how different types of data are represented in Maptek applications and how they can be accessed via the Maptek Python SDK.
Primitive types
Spatial objects are composed of lower-order geometrical 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. Blocks are the structures that form the basis of block models. |
See Working with Object Primitives for details on how primitives are stored within objects and how to access them.
Spatial object types
Primitive types as described above form the basis for all higher-order spatial objects, that is, objects that have geometry and can be visualised in a 3D space. Entities such as surfaces, polygons, and point sets are encapsulated in Maptek applications as named objects located in the project at a specific path. These objects can be accessed and manipulated through the SDK by using the appropriate SDK abstraction. For example, to access and manipulate a surface object in your project, you would use the Surface class.
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:
Object type | Primitive | Definition | Visual example | SDK data type |
---|---|---|---|---|
Point set | Point |
Representation of a “point cloud” — an arbitrary set of points in space, with no topological links between points. |
||
Polyline | Edge |
A sequence of edges defined by a sequence of points forming an open chain. |
||
Polygon |
Edge |
A sequence of edges defined by a sequence of points forming a closed chain. |
||
Edge network | Edge |
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. |
||
Surface | Facet |
A set of facets typically used to represent a objects with a surface area. Surfaces are also called triangulations, since they are made up of triangular facets. |
||
Grid surface | Cell |
A representation of a surface area using a grid of cells rather than facets. |
||
Scan | Cell |
Similar to a point set, but specialised to store point cloud data acquired from a laser scanner. Topological connections exist between points, forming a spherical grid structure. Although visualised as a point cloud, scans store each point internally using spherical coordinates relative to the acquisition origin rather than Cartesian coordinates. |
||
Dense block model | Block |
A block model constructed from a three dimensional grid of rectangular prism blocks all of which are the same size and shape. A Dense block model’s extents are always completely filled with blocks. |
||
Sparse block model | Block |
A block model that accommodates voids or holes in the model for more efficient storage. |
||
Subblocked block model | Block |
A dense block model that allows blocks to contain smaller blocks, known as subblocks. Learn more about how to interact with subblocked block models. |
||
2D text | Point (single) |
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. |
||
3D text | Point (single) |
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 |
Point (single) |
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. |
||
Drillhole | Point (single) |
A representation of a drillhole. A drillhole’s spatial representation is defined in terms of its collar location. Multiple drillholes are collected together in a drillhole database. Learn about how to interact with drillholes and drillhole databases. |
Non-spatial object types
Some objects are non-spatial in that they do not have any geometry associated with them. Some common non-spatial object types are listed in the table below:
Object type | Definition | Visual example | SDK data type |
---|---|---|---|
Numeric colour map |
An object that assigns colours to numeric ranges. These maps can be used to colour objects via user-defined properties, which are defined on each primitive in an object. |
||
String colour map |
An object that assigns colours to textual string values. These maps can be used to colour objects via user-defined properties, which are defined for each primitive in an object. |