From b16227a08069ffe2ec4a933807dc976dfb40e83f Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Wed, 15 Jan 2025 16:57:13 +0100 Subject: [PATCH] PDF layout export: remove limitation on non-rotated maps The limitation existed on GDAL PDF driver side, but it doesn't seem necessary after all, and will be removed in GDAL 3.11 per https://github.com/OSGeo/gdal/pull/11659 --- src/app/layout/qgslayoutdesignerdialog.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/app/layout/qgslayoutdesignerdialog.cpp b/src/app/layout/qgslayoutdesignerdialog.cpp index cbac5d665216..facbe69a70ae 100644 --- a/src/app/layout/qgslayoutdesignerdialog.cpp +++ b/src/app/layout/qgslayoutdesignerdialog.cpp @@ -108,6 +108,8 @@ #include #endif +#include + #ifdef ENABLE_MODELTEST #include "modeltest.h" #endif @@ -4373,12 +4375,15 @@ bool QgsLayoutDesignerDialog::getPdfExportSettings( QgsLayoutExporter::PdfExport break; } +#if GDAL_VERSION_NUM < GDAL_COMPUTE_VERSION( 3, 11, 0 ) + // GDAL 3.11.0 has removed that limitation that wasn't necessary if ( map->mapRotation() != 0 || map->itemRotation() != 0 || map->dataDefinedProperties().isActive( QgsLayoutObject::DataDefinedProperty::MapRotation ) ) { allowGeospatialPdfExport = false; dialogGeospatialPdfReason = tr( "One or more map items are rotated. This is not supported for geospatial PDF export." ); break; } +#endif } QgsLayoutPdfExportOptionsDialog dialog( this, allowGeospatialPdfExport, dialogGeospatialPdfReason, geospatialPdfLayerOrder );