Class: QgsMesh3dDataBlock¶
- class qgis.core.QgsMesh3dDataBlock¶
Bases:
sip.wrapper
Constructs an invalid block
QgsMesh3dDataBlock(count: int, isVector: bool) Constructs a new block for count faces
QgsMesh3dDataBlock(
QgsMesh3dDataBlock
)QgsMesh3dDataBlock
is a block of 3d stacked mesh data related N faces defined on base mesh frame.Data are implicitly shared, so the class can be quickly copied std.numeric_limits<double>.quiet_NaN() represents NODATA value
Note
The API is considered EXPERIMENTAL and can be changed without a notice
New in version 3.12:
Methods
Number of 2d faces for which the volume data is stored in the block
Returns the indexing between faces and volumes
Index of the first volume stored in the buffer (absolute)
Whether the block is valid
Whether we store vector values
Index of the last volume stored in the buffer (absolute)
Sets the indexing between faces and volumes
Sets block validity
Sets the values at volume centers
Sets the vertical levels height
Sets the vertical level counts
Returns the value at volume centers
Returns the values at volume centers
Returns the vertical levels height
Returns number of vertical level above 2d faces
Returns number of volumes stored in the buffer
- count(self) int ¶
Number of 2d faces for which the volume data is stored in the block
- Return type
int
- faceToVolumeIndex(self) List[int] ¶
Returns the indexing between faces and volumes
- Return type
List[int]
- firstVolumeIndex(self) int ¶
Index of the first volume stored in the buffer (absolute)
- Return type
int
- isValid(self) bool ¶
Whether the block is valid
- Return type
bool
- isVector(self) bool ¶
Whether we store vector values
- Return type
bool
- lastVolumeIndex(self) int ¶
Index of the last volume stored in the buffer (absolute)
- Return type
int
- setFaceToVolumeIndex(self, faceToVolumeIndex: Iterable[int])¶
Sets the indexing between faces and volumes
- Parameters
faceToVolumeIndex (Iterable[int]) –
- setValid(self, valid: bool)¶
Sets block validity
- Parameters
valid (bool) –
- setValues(self, doubleBuffer: Iterable[float])¶
Sets the values at volume centers
For vector datasets the number of values is doubled (x1, y1, x2, y2, … )
- Parameters
doubleBuffer (Iterable[float]) –
- setVerticalLevels(self, verticalLevels: Iterable[float])¶
Sets the vertical levels height
- Parameters
verticalLevels (Iterable[float]) –
- setVerticalLevelsCount(self, verticalLevelsCount: Iterable[int])¶
Sets the vertical level counts
- Parameters
verticalLevelsCount (Iterable[int]) –
- value(self, volumeIndex: int) QgsMeshDatasetValue ¶
Returns the value at volume centers
- Parameters
volumeIndex (int) – volume index relative to
firstVolumeIndex()
- Return type
- Returns
value (scalar or vector)
- values(self) List[float] ¶
Returns the values at volume centers
For vector datasets the number of values is doubled (x1, y1, x2, y2, … )
- Return type
List[float]
- verticalLevels(self) List[float] ¶
Returns the vertical levels height
- Return type
List[float]
- verticalLevelsCount(self) List[int] ¶
Returns number of vertical level above 2d faces
- Return type
List[int]
- volumesCount(self) int ¶
Returns number of volumes stored in the buffer
- Return type
int