Skip to content

Commit a0a699d

Browse files
author
mhugent
committed
Add transformation name in georef pdf report
git-svn-id: http://svn.osgeo.org/qgis/trunk@13523 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6b5bab0 commit a0a699d

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

src/plugins/georeferencer/qgsgeorefplugingui.cpp

+12-3
Original file line numberDiff line numberDiff line change
@@ -1237,9 +1237,18 @@ bool QgsGeorefPluginGui::writePDFReportFile( const QString& fileName, const QgsG
12371237

12381238
if ( wldTransform )
12391239
{
1240+
QString parameterTitle = tr( "Transformation parameters" );
1241+
if ( transform.transformParametrisation() == QgsGeorefTransform::Helmert )
1242+
{
1243+
parameterTitle += " (Helmert)";
1244+
}
1245+
else if ( transform.transformParametrisation() == QgsGeorefTransform::Linear )
1246+
{
1247+
parameterTitle += " (Linear)";
1248+
}
12401249
parameterLabel = new QgsComposerLabel( composition );
12411250
parameterLabel->setFont( titleFont );
1242-
parameterLabel->setText( tr( "Transformation parameters" ) );
1251+
parameterLabel->setText( parameterTitle );
12431252
parameterLabel->adjustSizeToText();
12441253
composition->addItem( parameterLabel );
12451254
parameterLabel->setSceneRect( QRectF( 2, composerMap->rect().bottom() + composerMap->transform().dy() + 5, composition->paperWidth(), 8 ) );
@@ -1366,8 +1375,8 @@ bool QgsGeorefPluginGui::writePDFReportFile( const QString& fileName, const QgsG
13661375
{
13671376
currentGCPStrings << tr( "no" );
13681377
}
1369-
currentGCPStrings << QString::number(( *gcpIt )->pixelCoords().x() ) << QString::number(( *gcpIt )->pixelCoords().y() ) << QString::number(( *gcpIt )->mapCoords().x() )\
1370-
<< QString::number(( *gcpIt )->mapCoords().y() ) << QString::number( residualX ) << QString::number( residualY ) << QString::number( residualTot );
1378+
currentGCPStrings << QString::number(( *gcpIt )->pixelCoords().x(), 'f', 2 ) << QString::number(( *gcpIt )->pixelCoords().y(), 'f', 2 ) << QString::number(( *gcpIt )->mapCoords().x(), 'f', 2 )\
1379+
<< QString::number(( *gcpIt )->mapCoords().y(), 'f', 2 ) << QString::number( residualX ) << QString::number( residualY ) << QString::number( residualTot );
13711380
gcpTable->addRow( currentGCPStrings );
13721381
}
13731382

src/plugins/georeferencer/qgstransformsettingsdialog.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ QgsTransformSettingsDialog::QgsTransformSettingsDialog( const QString &raster, c
5858
if ( !ok ) dsbHorizRes->setValue( 1.0 );
5959
dsbVerticalRes->setValue( s.value( "/Plugin-GeoReferencer/user_specified_resy", -1.0 ).toDouble( &ok ) );
6060
if ( !ok ) dsbHorizRes->setValue( -1.0 );
61+
6162
// Activate spin boxes for vertical/horizontal resolution, if the option is checked
6263
dsbHorizRes->setEnabled( cbxUserResolution->isChecked() );
6364
dsbVerticalRes->setEnabled( cbxUserResolution->isChecked() );
@@ -112,6 +113,7 @@ void QgsTransformSettingsDialog::resetSettings()
112113
s.setValue( "/Plugin-GeoReferencer/user_specified_resolution", false );
113114
s.setValue( "/Plugin-GeoReferencer/user_specified_resx", 1.0 );
114115
s.setValue( "/Plugin-GeoReferencer/user_specified_resy", -1.0 );
116+
s.setValue( "/Plugin-GeoReferencer/lastPDFReportDir", "" );
115117
}
116118

117119
void QgsTransformSettingsDialog::changeEvent( QEvent *e )

0 commit comments

Comments
 (0)