16#ifndef QGSABSTRACTGEOPDFEXPORTER_H
17#define QGSABSTRACTGEOPDFEXPORTER_H
21#include <QTemporaryDir>
34class QgsGeospatialPdfRenderedFeatureHandler;
65 static bool geospatialPDFCreationAvailable();
73 static QString geospatialPDFAvailabilityExplanation();
92 , renderedBounds( renderedBounds )
127 QPainter::CompositionMode compositionMode = QPainter::CompositionMode_SourceOver;
130 double opacity = 1.0;
147 : pagePoint( pagePoint )
148 , geoPoint( geoPoint )
231 bool useIso32000ExtensionFormatGeoreferencing =
true;
240 bool useOgcBestPracticeFormatGeoreferencing =
false;
245 bool includeFeatures =
true;
321 bool finalize(
const QList< QgsAbstractGeospatialPdfExporter::ComponentLayerDetail > &components,
const QString &destinationFile,
const ExportDetails &details );
331 QString generateTemporaryFilepath(
const QString &filename )
const;
339 static bool compositionModeSupported( QPainter::CompositionMode mode );
371 QMap< QString, QMap< QString, QgsFeatureList > > mCollatedFeatures;
378 QList< VectorComponentDetail > mVectorComponents;
380 QString mErrorMessage;
381 QTemporaryDir mTemporaryDir;
384 bool saveTemporaryLayers();
386 QString createCompositionXml(
const QList< QgsAbstractGeospatialPdfExporter::ComponentLayerDetail > &components,
const ExportDetails &details );
391 static QString compositionModeToString( QPainter::CompositionMode mode );
393 friend class TestQgsLayoutGeospatialPdfExport;
394 friend class TestQgsGeospatialPdfExport;
Abstract base class for Geospatial PDF exporters.
virtual ~QgsAbstractGeospatialPdfExporter()=default
QgsAbstractGeospatialPdfExporter()=default
QString errorMessage() const
Returns the last error message encountered during the export.
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 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.
QString sourcePdfPath
File path to the (already created) PDF to use as the source for this component layer.
Contains details of a control point used during georeferencing Geospatial PDF outputs.
QgsPointXY pagePoint
Coordinate on the page of the control point, in millimeters.
QgsPointXY geoPoint
Georeferenced coordinate of the control point, in CRS units.
ControlPoint(const QgsPointXY &pagePoint, const QgsPointXY &geoPoint)
Constructor for ControlPoint, at the specified pagePoint (in millimeters) and geoPoint (in CRS units)...
QMap< QString, QString > customLayerTreeGroups
Optional map of map layer ID to custom logical layer tree group in created PDF file.
QMap< QString, bool > initialLayerVisibility
Optional map of map layer ID to initial visibility state.
QList< QgsAbstractGeospatialPdfExporter::GeoReferencedSection > georeferencedSections
List of georeferenced sections.
QStringList layerOrder
Optional list of layer IDs, in the order desired to appear in the generated Geospatial PDF file.
QMap< QString, QString > layerIdToPdfLayerTreeNameMap
Optional map of map layer ID to custom layer tree name to show in the created PDF file.
QgsAbstractMetadataBase::KeywordMap keywords
Metadata keyword map.
QString creator
Metadata creator tag.
QSizeF pageSizeMm
Page size, in millimeters.
QString author
Metadata author tag.
QString subject
Metadata subject tag.
QString title
Metadata title tag.
QStringList layerTreeGroupOrder
Specifies the ordering of layer tree groups in the generated Geospatial PDF file.
QDateTime creationDateTime
Metadata creation datetime.
QString producer
Metadata producer tag.
QSet< QString > mutuallyExclusiveGroups
Contains a list of group names which should be considered as mutually exclusive.
QgsRectangle pageBoundsMm
Bounds of the georeferenced section on the page, in millimeters.
QgsCoordinateReferenceSystem crs
Coordinate reference system for georeferenced section.
QList< QgsAbstractGeospatialPdfExporter::ControlPoint > controlPoints
List of control points corresponding to this georeferenced section.
QgsPolygon pageBoundsPolygon
Bounds of the georeferenced section on the page, in millimeters, as a free-form polygon.
Contains information about a feature rendered inside the PDF.
QgsGeometry renderedBounds
Bounds, in PDF units, of rendered feature.
QgsFeature feature
Rendered feature.
RenderedFeature(const QgsFeature &feature, const QgsGeometry &renderedBounds)
Constructor for RenderedFeature.
RenderedFeature()=default
Contains information relating to a single PDF layer in the Geospatial PDF export.
QString mapLayerId
Associated map layer ID.
QString group
Optional layer group name.
QString name
User-friendly name for the generated PDF layer.
QString displayAttribute
Field name for display.
QString sourceVectorPath
File path to the (already created) vector dataset to use as the source for this component layer.
QString sourceVectorLayer
Layer name in vector dataset to use as the source.