Class: QgsPointCloudLayerExporter¶
Handles exporting point cloud layers to memory layers, OGR supported files and PDAL supported files.
Added in version 3.28.
Enums
Supported export formats for point clouds  | 
Methods
Gets the list of point cloud attributes that will be exported.  | 
|
Gets the crs for the exported file.  | 
|
Performs the actual exporting operation.  | 
|
Gets a pointer to the   | 
|
Gets the filename for the new layer.  | 
|
Gets the filter extent for points to be exported.  | 
|
Returns the format for the exported file or layer.  | 
|
Gets the last error that occurred during the exporting operation.  | 
|
Gets the name for the new layer.  | 
|
Gets the maximum number of points to be exported.  | 
|
Creates the   | 
|
Sets whether an existing output vector file should be overwritten on appended to.  | 
|
Sets that all attributes will be exported.  | 
|
Sets the list of point cloud attributes that will be exported.  | 
|
Sets the crs for the exported file, and the transform context that will be used for reprojection if different from the point cloud layer's CRS.  | 
|
Sets a   | 
|
Sets the filename for the new layer.  | 
|
Sets a filter extent for points to be exported in the target CRS Points that fall outside the extent will be skipped.  | 
|
Sets a spatial filter for points to be exported based on geom in the point cloud's CRS.  | 
|
Sets the format for the exported file.  | 
|
Sets the name for the new layer.  | 
|
Sets that no attributes will be exported.  | 
|
Sets the maximum number of points to be exported.  | 
|
Sets an inclusive range for Z values to be exported.  | 
|
Gets a pointer to the exported layer.  | 
|
Gets the inclusive range for Z values to be exported.  | 
- class qgis.core.QgsPointCloudLayerExporter[source]¶
 Bases:
object- __init__(layer: QgsPointCloudLayer | None)
 Constructor for QgsPointCloudLayerExporter, associated with the specified
layer.Note
The
layeris safe to be deleted once it’s used in the constructor.- Parameters:
 layer (Optional[QgsPointCloudLayer])
- class ExportFormat(*values)¶
 Bases:
IntEnumSupported export formats for point clouds
Memory: Memory layerLas: LAS/LAZ point cloudGpkg: GeopackageShp: ESRI ShapeFileDxf: AutoCAD dxfCsv: Comma separated values
- Csv = 5¶
 
- Dxf = 4¶
 
- Gpkg = 2¶
 
- Las = 1¶
 
- Memory = 0¶
 
- Shp = 3¶
 
- attributes(self) List[str][source]¶
 Gets the list of point cloud attributes that will be exported.
- Return type:
 List[str]
- crs(self) QgsCoordinateReferenceSystem[source]¶
 Gets the
crsfor the exported file.- Return type:
 
- feedback(self) QgsFeedback | None[source]¶
 Gets a pointer to the
QgsFeedbackobject used for cancellation / progress reporting, or None if not set.- Return type:
 Optional[QgsFeedback]
- filterExtent(self) QgsRectangle[source]¶
 Gets the filter extent for points to be exported.
- Return type:
 
- format(self) QgsPointCloudLayerExporter.ExportFormat[source]¶
 Returns the format for the exported file or layer.
- Return type:
 
- lastError(self) str[source]¶
 Gets the last error that occurred during the exporting operation. If no error occurred an empty string is returned.
- Return type:
 str
- pointsLimit(self) int[source]¶
 Gets the maximum number of points to be exported. 0 means no limit.
- Return type:
 int
- prepareExport(self)[source]¶
 Creates the
QgsVectorLayerfor exporting to a memory layer, if necessary. This method allows the exported memory layer to be created in the main thread. If not explicitly called, this method will be implicitly called bydoExport().
- setActionOnExistingFile(self, action: QgsVectorFileWriter.ActionOnExistingFile)[source]¶
 Sets whether an existing output vector file should be overwritten on appended to.
Note
Only applies to vector formats
- Parameters:
 
- setAttributes(self, attributes: Iterable[str | None])[source]¶
 Sets the list of point cloud
attributesthat will be exported. If never called, all attributes will be exported.Note
This has no effect when exporting to LAS/LAZ format.
- Parameters:
 attributes (Iterable[Optional[str]])
- setCrs(self, crs: QgsCoordinateReferenceSystem, context: QgsCoordinateTransformContext = QgsCoordinateTransformContext())[source]¶
 Sets the
crsfor the exported file, and the transformcontextthat will be used for reprojection if different from the point cloud layer’s CRS.- Parameters:
 context (
QgsCoordinateTransformContext= QgsCoordinateTransformContext())
- setFeedback(self, feedback: QgsFeedback | None)[source]¶
 Sets a
QgsFeedbackobject to allow cancellation / progress reporting.Note
The
feedbackobject must exist for the lifetime of the exporter.- Parameters:
 feedback (Optional[QgsFeedback])
- setFileName(self, filename: str | None)[source]¶
 Sets the
filenamefor the new layer.- Parameters:
 filename (Optional[str])
- setFilterExtent(self, extent: QgsRectangle)[source]¶
 Sets a filter extent for points to be exported in the target CRS Points that fall outside the extent will be skipped.
See also
- Parameters:
 extent (QgsRectangle)
- setFilterGeometry(self, geometry: QgsAbstractGeometry | None)[source]¶
 Sets a spatial filter for points to be exported based on
geomin the point cloud’s CRS. Points that do not intersectgeometrywill be skipped.- Parameters:
 geometry (Optional[QgsAbstractGeometry])
- setFilterGeometry(self, layer: QgsMapLayer | None, selectedFeaturesOnly: bool = False)[source]
 Sets a spatial filter for points to be exported based on the features of
layer. Points that do not intersect thelayer’s features will be skipped.- Parameters:
 layer (Optional[QgsMapLayer])
selectedFeaturesOnly (bool = False)
- setFormat(self, format: QgsPointCloudLayerExporter.ExportFormat) bool[source]¶
 Sets the
formatfor the exported file.- Return type:
 bool
- Returns:
 true if the
formatis supported, false otherwise.
See also
ExportFormat
- Parameters:
 
- setLayerName(self, name: str | None)[source]¶
 Sets the
namefor the new layer.- Parameters:
 name (Optional[str])
- setNoAttributes(self)[source]¶
 Sets that no attributes will be exported.
Note
This has no effect when exporting to LAS/LAZ format.
- setPointsLimit(self, limit: int)[source]¶
 Sets the maximum number of points to be exported. Default value is 0.
Note
Any
limitvalue <= 0 means no limit.- Parameters:
 limit (int)
- setZRange(self, zRange: QgsDoubleRange)[source]¶
 Sets an inclusive range for Z values to be exported. Points with Z values outside the range will be skipped.
- Parameters:
 zRange (QgsDoubleRange)
- takeExportedLayer(self) QgsMapLayer | None[source]¶
 Gets a pointer to the exported layer. Caller takes ownership of the returned object.
- Return type:
 Optional[QgsMapLayer]
- zRange(self) QgsDoubleRange[source]¶
 Gets the inclusive range for Z values to be exported.
- Return type: