Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SQLite layer export: do not set SRID= layer creation options that is …
…interpreted by the OGR SQLite driver as meaning SRID=0 (fixes #54560)
  • Loading branch information
rouault authored and nyalldawson committed Sep 22, 2023
1 parent 4c15213 commit f4e5534
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/core/qgsvectorfilewriter.cpp
Expand Up @@ -4452,7 +4452,7 @@ QStringList QgsVectorFileWriter::concatenateOptions( const QMap<QString, QgsVect

case QgsVectorFileWriter::Hidden:
QgsVectorFileWriter::HiddenOption *opt = dynamic_cast<QgsVectorFileWriter::HiddenOption *>( option );
if ( opt )
if ( opt && !opt->mValue.isEmpty() )
{
list.append( QStringLiteral( "%1=%2" ).arg( it.key(), opt->mValue ) );
}
Expand Down
6 changes: 4 additions & 2 deletions src/gui/ogr/qgsvectorlayersaveasdialog.cpp
Expand Up @@ -960,7 +960,8 @@ QStringList QgsVectorLayerSaveAsDialog::datasourceOptions() const
{
QgsVectorFileWriter::HiddenOption *opt =
dynamic_cast<QgsVectorFileWriter::HiddenOption *>( it.value() );
options << QStringLiteral( "%1=%2" ).arg( it.key(), opt->mValue );
if ( !opt->mValue.isEmpty() )
options << QStringLiteral( "%1=%2" ).arg( it.key(), opt->mValue );
break;
}
}
Expand Down Expand Up @@ -1019,7 +1020,8 @@ QStringList QgsVectorLayerSaveAsDialog::layerOptions() const
{
QgsVectorFileWriter::HiddenOption *opt =
dynamic_cast<QgsVectorFileWriter::HiddenOption *>( it.value() );
options << QStringLiteral( "%1=%2" ).arg( it.key(), opt->mValue );
if ( !opt->mValue.isEmpty() )
options << QStringLiteral( "%1=%2" ).arg( it.key(), opt->mValue );
break;
}
}
Expand Down

0 comments on commit f4e5534

Please sign in to comment.