1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/pointcloud/qgspointcloudlayerexporter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsPointCloudLayerExporter /NoDefaultCtors/
{
%Docstring(signature="appended")
Handles exporting point cloud layers to memory layers, OGR supported
files and PDAL supported files.
.. versionadded:: 3.28
%End
%TypeHeaderCode
#include "qgspointcloudlayerexporter.h"
%End
public:
enum class ExportFormat /BaseType=IntEnum/
{
Memory,
Las,
Gpkg,
Shp,
Dxf,
Csv,
};
QgsPointCloudLayerExporter( QgsPointCloudLayer *layer );
%Docstring
Constructor for QgsPointCloudLayerExporter, associated with the
specified ``layer``.
.. note::
The ``layer`` is safe to be deleted once it's used in the constructor.
%End
~QgsPointCloudLayerExporter();
void setFileName( const QString &filename );
%Docstring
Sets the ``filename`` for the new layer.
%End
QString fileName() const;
%Docstring
Gets the filename for the new layer.
%End
void setLayerName( const QString &name );
%Docstring
Sets the ``name`` for the new layer.
%End
QString layerName() const;
%Docstring
Gets the name for the new layer.
%End
void setFilterExtent( const QgsRectangle extent );
%Docstring
Sets a filter extent for points to be exported in the target CRS Points
that fall outside the extent will be skipped.
.. seealso:: :py:func:`setCrs`
%End
QgsRectangle filterExtent() const;
%Docstring
Gets the filter extent for points to be exported.
%End
void setFilterGeometry( const QgsAbstractGeometry *geometry );
%Docstring
Sets a spatial filter for points to be exported based on ``geom`` in the
point cloud's CRS. Points that do not intersect ``geometry`` will be
skipped.
%End
void setFilterGeometry( QgsMapLayer *layer, bool selectedFeaturesOnly = false );
%Docstring
Sets a spatial filter for points to be exported based on the features of
``layer``. Points that do not intersect the ``layer``'s features will be
skipped.
%End
void setZRange( const QgsDoubleRange zRange );
%Docstring
Sets an inclusive range for Z values to be exported. Points with Z
values outside the range will be skipped.
%End
QgsDoubleRange zRange() const;
%Docstring
Gets the inclusive range for Z values to be exported.
%End
void setFeedback( QgsFeedback *feedback );
%Docstring
Sets a :py:class:`QgsFeedback` object to allow cancellation / progress
reporting.
.. note::
The ``feedback`` object must exist for the lifetime of the exporter.
%End
QgsFeedback *feedback() const;
%Docstring
Gets a pointer to the :py:class:`QgsFeedback` object used for
cancellation / progress reporting, or None if not set.
%End
void setAttributes( const QStringList &attributes );
%Docstring
Sets the list of point cloud ``attributes`` that will be exported. If
never called, all attributes will be exported.
.. note::
This has no effect when exporting to LAS/LAZ format.
%End
void setNoAttributes();
%Docstring
Sets that no attributes will be exported.
.. note::
This has no effect when exporting to LAS/LAZ format.
%End
void setAllAttributes();
%Docstring
Sets that all attributes will be exported.
%End
QStringList attributes() const;
%Docstring
Gets the list of point cloud attributes that will be exported.
%End
void setCrs( const QgsCoordinateReferenceSystem &crs, const QgsCoordinateTransformContext &context = QgsCoordinateTransformContext() );
%Docstring
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.
%End
QgsCoordinateReferenceSystem crs() const;
%Docstring
Gets the ``crs`` for the exported file.
%End
bool setFormat( const ExportFormat format );
%Docstring
Sets the ``format`` for the exported file.
:return: true if the ``format`` is supported, false otherwise.
.. seealso:: ExportFormat
%End
ExportFormat format() const;
%Docstring
Returns the format for the exported file or layer.
%End
void setPointsLimit( qint64 limit );
%Docstring
Sets the maximum number of points to be exported. Default value is 0.
.. note::
Any ``limit`` value <= 0 means no limit.
%End
qint64 pointsLimit();
%Docstring
Gets the maximum number of points to be exported. 0 means no limit.
%End
void setActionOnExistingFile( const QgsVectorFileWriter::ActionOnExistingFile action );
%Docstring
Sets whether an existing output vector file should be overwritten on
appended to.
.. note::
Only applies to vector formats
%End
void prepareExport();
%Docstring
Creates the :py:class:`QgsVectorLayer` for 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 by :py:func:`~QgsPointCloudLayerExporter.doExport`.
%End
void doExport();
%Docstring
Performs the actual exporting operation.
%End
QgsMapLayer *takeExportedLayer() /Factory/;
%Docstring
Gets a pointer to the exported layer. Caller takes ownership of the
returned object.
%End
QString lastError() const;
%Docstring
Gets the last error that occurred during the exporting operation. If no
error occurred an empty string is returned.
%End
public:
protected:
public:
public:
public:
};
class QgsPointCloudLayerExporterTask : QgsTask
{
%Docstring(signature="appended")
:py:class:`QgsTask` task which performs a
:py:class:`QgsPointCloudLayerExporter` layer export operation as a
background task. This can be used to export a point cloud layer out to a
provider without blocking the QGIS interface.
.. versionadded:: 3.28
%End
%TypeHeaderCode
#include "qgspointcloudlayerexporter.h"
%End
public:
QgsPointCloudLayerExporterTask( QgsPointCloudLayerExporter *exporter );
%Docstring
Constructor for QgsPointCloudLayerExporterTask. Takes ownership of
``exporter``.
%End
virtual void cancel();
signals:
void exportComplete();
%Docstring
Emitted when exporting the layer is successfully completed.
%End
protected:
virtual bool run();
virtual void finished( bool result );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/pointcloud/qgspointcloudlayerexporter.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|