mapteksdk.labs.cells module

Implement support for dense and sparse cell network (regular, irregular) objects. Currently only functionality to query the type of Grid and SparseIrregularCellNetwork exist.

class mapteksdk.labs.cells.CellNetworkBase(object_id=None, lock_type=<LockType.READWRITE: 2>)

Bases: mapteksdk.data.base.Topology

Cell Network Base Class.

property cell_count

Returns the number of cells within cell network.

Returns

The number of cells within the cell network.

Return type

int

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().

class mapteksdk.labs.cells.SparseIrregularCellNetwork(object_id=None, lock_type=<LockType.READWRITE: 2>, row_count=0, col_count=0, valid_cell_map=[])

Bases: mapteksdk.labs.cells.CellNetworkBase

Sparse irregular cell network.

Parameters
  • row_count (int) – Count of rows.

  • col_count (int) – Count of rows.

  • valid_cell_map (ndarray or array) – 1D array of bools representing which cells in the cell network will be considered valid (True) or as nulls (False).

Raises

Exception – On failure to create.

See also

CellNetworkBase

Base class for Cell Networks.

Notes

row_count, col_count and valid_cell_map parameters need only be specified if creating a new network.

classmethod static_type()

Return the type of sparse irregular cell network as stored in a Project.

This can be used for determining if the type of an object is a sparse irregular cell network.