Class: QgsMeshDataBlock¶
-
class
qgis.core.
QgsMeshDataBlock
¶ Bases:
sip.wrapper
Constructs an invalid block
QgsMeshDataBlock(type: QgsMeshDataBlock.DataType, count: int) Constructs a new block
QgsMeshDataBlock(QgsMeshDataBlock)
QgsMeshDataBlock is a block of integers/doubles that can be used to retrieve: active flags (e.g. face’s active integer flag) scalars (e.g. scalar dataset double values) vectors (e.g. vector dataset doubles x,y values)
data are implicitly shared, so the class can be quickly copied std.numeric_limits<double>.quiet_NaN() represents NODATA value
Data can be accessed all at once with buffer() (faster) or value by value (slower) with active() or value()
New in version 3.6: Enums
Methods
Returns a value for active flag by the index For scalar and vector 2d the behavior is undefined
Number of items stored in the block
Whether the block is valid
Type of data stored in the block
Returns a value represented by the index For active flag the behavior is undefined
Signals
Attributes
-
ActiveFlagInteger
= 0¶
-
class
DataType
¶ Bases:
int
-
ScalarDouble
= 1¶
-
Vector2DDouble
= 2¶
-
active
(self, index: int) → bool¶ Returns a value for active flag by the index For scalar and vector 2d the behavior is undefined
-
count
(self) → int¶ Number of items stored in the block
-
isValid
(self) → bool¶ Whether the block is valid
-
type
(self) → QgsMeshDataBlock.DataType¶ Type of data stored in the block
-
value
(self, index: int) → QgsMeshDatasetValue¶ Returns a value represented by the index For active flag the behavior is undefined
-