Skip to content

Commit

Permalink
Fix creation of GeoPDF with non-standard CRSes
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed May 28, 2024
1 parent cc8c337 commit a6bb5bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/qgsabstractgeopdfexporter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ QString QgsAbstractGeoPdfExporter::createCompositionXml( const QList<ComponentLa
QDomElement srs = doc.createElement( QStringLiteral( "SRS" ) );
// not currently used by GDAL or the PDF spec, but exposed in the GDAL XML schema. Maybe something we'll need to consider down the track...
// srs.setAttribute( QStringLiteral( "dataAxisToSRSAxisMapping" ), QStringLiteral( "2,1" ) );
if ( !section.crs.authid().startsWith( QStringLiteral( "user" ), Qt::CaseInsensitive ) )
if ( !section.crs.authid().isEmpty() && !section.crs.authid().startsWith( QStringLiteral( "user" ), Qt::CaseInsensitive ) )
{
srs.appendChild( doc.createTextNode( section.crs.authid() ) );
}
Expand Down

0 comments on commit a6bb5bf

Please sign in to comment.