mapteksdk.labs.blocks module

Implementation for sparse block model objects.

SparseBlockModel should be moved into data/blocks.py once the implementation has been finished and appropriate tests have been written. Or deleted.

class mapteksdk.labs.blocks.SparseBlockModel(object_id=None, lock_type=<LockType.READWRITE: 2>, x_res=0, y_res=0, z_res=0, x_count=0, y_count=0, z_count=0)

Bases: mapteksdk.data.base.Topology, mapteksdk.data.primitives.block_properties.BlockProperties

Sparse Block Model Class. This is similar to a dense block model, however it allows for ‘holes’ in the model - there can be regions within the extent of the model which do not contain a block.

This allows for more compact storage for block models where a large proportion of the blocks do not contain data as blocks which do not contain data do not need to be stored. For block models in which most blocks contain data, a dense block model will provide more efficient storage.

Parameters
  • x_res (double) – The x resolution.

  • y_res (double) – The y resolution.

  • z_res (double) – The z resolution.

  • x_count (int) – The x count of blocks.

  • y_count (int) – The y count of blocks.

  • z_count (int) – The z count of blocks.

See also

DenseBlockModel

Block model which does not allow holes.

Notes

Parameters are only required for new block models.

classmethod static_type()

Return the type of sparse block model as stored in a Project.

This can be used for determining if the type of an object is a sparse block model.

property block_count

Returns the number of blocks in the block model.

save()

Save the changes made to the object.

Generally a user does not need to call this function because it is called automatically at the end of a with block using Project.new() or Project.edit().