Class: QgsMesh3dDataBlock

class qgis.core.QgsMesh3dDataBlock

Bases: sip.wrapper

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.

QgsMesh3dDataBlock() Constructs an invalid block

QgsMesh3dDataBlock(count: int, isVector: bool) Constructs a new block for count faces

QgsMesh3dDataBlock(QgsMesh3dDataBlock)

Methods

count

Number of 2d faces for which the volume data is stored in the block

faceToVolumeIndex

Returns the indexing between faces and volumes

firstVolumeIndex

Index of the first volume stored in the buffer (absolute)

isValid

Whether the block is valid

isVector

Whether we store vector values

lastVolumeIndex

Index of the last volume stored in the buffer (absolute)

setFaceToVolumeIndex

Sets the indexing between faces and volumes

setValid

Sets block validity

setValues

Sets the values at volume centers

setVerticalLevels

Sets the vertical levels height

setVerticalLevelsCount

Sets the vertical level counts

value

Returns the value at volume centers

values

Returns the values at volume centers

verticalLevels

Returns the vertical levels height

verticalLevelsCount

Returns number of vertical level above 2d faces

volumesCount

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:

QgsMeshDatasetValue

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