16 #ifndef QGSABSTRACTGEOPDFEXPORTER_H
17 #define QGSABSTRACTGEOPDFEXPORTER_H
19 #include "qgis_core.h"
21 #include <QTemporaryDir>
33 class QgsGeoPdfRenderedFeatureHandler;
64 static bool geoPDFCreationAvailable();
72 static QString geoPDFAvailabilityExplanation();
97 , renderedBounds( renderedBounds )
132 QPainter::CompositionMode compositionMode = QPainter::CompositionMode_SourceOver;
135 double opacity = 1.0;
152 : pagePoint( pagePoint )
153 , geoPoint( geoPoint )
235 bool useIso32000ExtensionFormatGeoreferencing =
true;
244 bool useOgcBestPracticeFormatGeoreferencing =
false;
249 bool includeFeatures =
true;
302 bool finalize(
const QList< QgsAbstractGeoPdfExporter::ComponentLayerDetail > &components,
const QString &destinationFile,
const ExportDetails &details );
312 QString generateTemporaryFilepath(
const QString &filename )
const;
320 static bool compositionModeSupported( QPainter::CompositionMode mode );
352 QMap< QString, QMap< QString, QgsFeatureList > > mCollatedFeatures;
359 QList< VectorComponentDetail > mVectorComponents;
361 QString mErrorMessage;
362 QTemporaryDir mTemporaryDir;
365 bool saveTemporaryLayers();
367 QString createCompositionXml(
const QList< QgsAbstractGeoPdfExporter::ComponentLayerDetail > &components,
const ExportDetails &details );
372 static QString compositionModeToString( QPainter::CompositionMode mode );
374 friend class TestQgsLayoutGeoPdfExport;
375 friend class TestQgsGeoPdfExport;
Abstract base class for GeoPDF exporters.
virtual ~QgsAbstractGeoPdfExporter()=default
QString errorMessage()
Returns the last error message encountered during the export.
QgsAbstractGeoPdfExporter()=default
Constructor for QgsAbstractGeoPdfExporter.
This class represents a coordinate reference system (CRS).
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
A geometry is the spatial representation of a feature.
A class to represent a 2D point.
A rectangle specified with double values.
Contains details of a particular input component to be used during PDF composition.
QString sourcePdfPath
File path to the (already created) PDF to use as the source for this component layer.
QString mapLayerId
Associated map layer ID, or an empty string if this component layer is not associated with a map laye...
QString group
Optional group name, for arranging layers in top-level groups.
QString name
User-friendly name for the generated PDF layer.
Contains details of a control point used during georeferencing GeoPDF outputs.
ControlPoint(const QgsPointXY &pagePoint, const QgsPointXY &geoPoint)
Constructor for ControlPoint, at the specified pagePoint (in millimeters) and geoPoint (in CRS units)...
QgsPointXY pagePoint
Coordinate on the page of the control point, in millimeters.
QgsPointXY geoPoint
Georeferenced coordinate of the control point, in CRS units.
QgsAbstractMetadataBase::KeywordMap keywords
Metadata keyword map.
QMap< QString, QString > layerIdToPdfLayerTreeNameMap
Optional map of map layer ID to custom layer tree name to show in the created PDF file.
QDateTime creationDateTime
Metadata creation datetime.
QSizeF pageSizeMm
Page size, in millimeters.
QList< QgsAbstractGeoPdfExporter::GeoReferencedSection > georeferencedSections
List of georeferenced sections.
QString author
Metadata author tag.
QMap< QString, bool > initialLayerVisibility
Optional map of map layer ID to initial visibility state.
QString producer
Metadata producer tag.
QString creator
Metadata creator tag.
QMap< QString, QString > customLayerTreeGroups
Optional map of map layer ID to custom logical layer tree group in created PDF file.
QStringList layerOrder
Optional list of layer IDs, in the order desired to appear in the generated GeoPDF file.
QString subject
Metadata subject tag.
QString title
Metadata title tag.
QgsRectangle pageBoundsMm
Bounds of the georeferenced section on the page, in millimeters.
QgsCoordinateReferenceSystem crs
Coordinate reference system for georeferenced section.
QgsPolygon pageBoundsPolygon
Bounds of the georeferenced section on the page, in millimeters, as a free-form polygon.
QList< QgsAbstractGeoPdfExporter::ControlPoint > controlPoints
List of control points corresponding to this georeferenced section.
Contains information about a feature rendered inside the PDF.
RenderedFeature()=default
Constructor for RenderedFeature.
RenderedFeature(const QgsFeature &feature, const QgsGeometry &renderedBounds)
Constructor for RenderedFeature.
QgsFeature feature
Rendered feature.
QgsGeometry renderedBounds
Bounds, in PDF units, of rendered feature.
Contains information relating to a single PDF layer in the GeoPDF export.
QString group
Optional layer group name.
QString sourceVectorLayer
Layer name in vector dataset to use as the source.
QString mapLayerId
Associated map layer ID.
QString sourceVectorPath
File path to the (already created) vector dataset to use as the source for this component layer.
QString name
User-friendly name for the generated PDF layer.
QString displayAttribute
Field name for display.