Class: QgsVectorLayer3DTilingSettings¶
Defines configuration of how a vector layer gets tiled for 3D rendering.
Root node has the layer’s extent and geometry error is set as a fraction
of the extent (see maximumLeafExtent()) Child nodes are
created using quadtree approach - a node gets four children, each having
their width/height (2D extent) and geometry error halved.
For example a root tile that is 1’000 meters wide will get geometry error set as 10 meters.
When loading data for each tile, we fetch up to
maximumChunkFeatures() features. If the limit is hit, we will
recursively create children, so that user gets to see more features when
zoomed in. If the geographical extent is very large (see
maximumLeafExtent()), we would still recursively create
children, even if the limit of features is not hit, to avoid jitter due
to numerical precision issues.
Added in version 3.12.
Methods
Returns the maximum number of features that will be fetched in any chunk. |
|
Reads content of the object from XML |
|
Sets the maximum number of features that will be fetched in any chunk. |
|
Sets whether to display bounding boxes of entity's tiles (for debugging) |
|
Sets number of zoom levels. |
|
Returns whether to display bounding boxes of entity's tiles (for debugging) |
|
Writes content of the object to XML |
|
Returns number of zoom levels. |
- class qgis._3d.QgsVectorLayer3DTilingSettings[source]¶
Bases:
object- maximumChunkFeatures(self) int[source]¶
Returns the maximum number of features that will be fetched in any chunk. If more features than the maximum belong to the chunk, further features will become available in child nodes. This is meant as a control for performance - fewer features mean faster load times, but user needs to zoom in more to see everything.
See also
Added in version 4.0.
- Return type:
int
- readXml(self, elem: QDomElement)[source]¶
Reads content of the object from XML
- Parameters:
elem (QDomElement)
- setMaximumChunkFeatures(self, value: int)[source]¶
Sets the maximum number of features that will be fetched in any chunk. If more features than the maximum belong to the chunk, further features will become available in child nodes. This is meant as a control for performance - fewer features mean faster load times, but user needs to zoom in more to see everything.
See also
Added in version 4.0.
- Parameters:
value (int)
- setShowBoundingBoxes(self, enabled: bool)[source]¶
Sets whether to display bounding boxes of entity’s tiles (for debugging)
- Parameters:
enabled (bool)
- setZoomLevelsCount(self, count: int)[source]¶
Sets number of zoom levels. See
zoomLevelsCount()documentation for more details.Deprecated since version 4.0: Tiling is now done based on
maximumScreenError()andmaximumChunkFeatures().- Parameters:
count (int)
- showBoundingBoxes(self) bool[source]¶
Returns whether to display bounding boxes of entity’s tiles (for debugging)
- Return type:
bool
- writeXml(self, elem: QDomElement)[source]¶
Writes content of the object to XML
- Parameters:
elem (QDomElement)
- zoomLevelsCount(self) int[source]¶
Returns number of zoom levels. One zoom level means there will be one tile. Every extra zoom level multiplies number of tiles by four. For example, three zoom levels will produce 16 tiles at the highest zoom level. It is therefore recommended to keep the number of zoom levels low to prevent excessive number of tiles.
Deprecated since version 4.0: Tiling is now done based on
maximumScreenError()andmaximumChunkFeatures().- Return type:
int