Skip to content
Permalink
Browse files

Remove QgsDatumTransformStore

and port usage over to QgsCoordinateTransformContext instead
  • Loading branch information
nyalldawson committed Nov 6, 2017
1 parent 754a6e0 commit 018bfb49f9a7339a94291860a2c813f2c9287f90
@@ -279,6 +279,7 @@ should now call QgsCoordinateReferenceSystem::invalidateCache() and QgsCoordinat
- QgsDataDefined was removed. Use the QgsProperty framework instead.
- QgsDataDefinedButton was removed. Use QgsPropertyOverrideButton instead.
- QgsDataDefinedSymbolDialog was removed. Code using this dialog should be reworked to use QgsPropertyOverrideButton
- QgsDatumTransformStore. Use QgsCoordinateTransformContext instead.
- QgsDefaultPluginLayerLegend was removed. Use QgsMapLayer::setLegend() to provide legend nodes for plugin layers.
- DualEdgeTriangulation
- QgsFileNameWidgetWrapper was removed. Use QgsExternalResourceWidgetWrapper instead.
@@ -31,7 +31,6 @@
%Include qgsdataitemproviderregistry.sip
%Include qgsdatasourceuri.sip
%Include qgsdatetimestatisticalsummary.sip
%Include qgsdatumtransformstore.sip
%Include qgsdbfilterproxymodel.sip
%Include qgsdefaultvalue.sip
%Include qgsdiagramrenderer.sip

This file was deleted.

@@ -304,12 +304,6 @@ Return the distance in geographical coordinates that equals to one pixel in the
:rtype: QgsExpressionContext
%End


QgsDatumTransformStore &datumTransformStore();
%Docstring
:rtype: QgsDatumTransformStore
%End

QgsCoordinateTransformContext transformContext() const;
%Docstring
Returns the coordinate transform context, which stores various
@@ -727,7 +727,7 @@ called to read map canvas settings from project
called to write map canvas settings to project
%End

void getDatumTransformInfo( const QgsMapLayer *ml, const QString &srcAuthId, const QString &destAuthId );
void getDatumTransformInfo( const QgsCoordinateReferenceSystem &source, const QgsCoordinateReferenceSystem &destination );
%Docstring
ask user about datum transformation
%End
@@ -7019,28 +7019,15 @@ void QgisApp::saveAsVectorFileGeneral( QgsVectorLayer *vlayer, bool symbologyOpt

if ( destCRS.isValid() && destCRS != vlayer->crs() )
{
ct = QgsCoordinateTransform( vlayer->crs(), destCRS, QgsProject::instance() );

//ask user about datum transformation
QgsSettings settings;
QList< QList< int > > dt = QgsCoordinateTransform::datumTransformations( vlayer->crs(), destCRS );
if ( dt.size() > 1 && settings.value( QStringLiteral( "Projections/showDatumTransformDialog" ), false ).toBool() )
{
QgsDatumTransformDialog d( vlayer->name(), dt );
if ( d.exec() == QDialog::Accepted )
{
QList< int > sdt = d.selectedDatumTransform();
if ( !sdt.isEmpty() )
{
ct.setSourceDatumTransform( sdt.at( 0 ) );
}
if ( sdt.size() > 1 )
{
ct.setDestinationDatumTransform( sdt.at( 1 ) );
}
ct.initialize();
}
QgsDatumTransformDialog d( dt );
d.exec();
}
ct = QgsCoordinateTransform( vlayer->crs(), destCRS, QgsProject::instance() );
}

QgsRectangle filterExtent = dialog->filterExtent();
@@ -270,17 +270,13 @@ QgsFeatureList QgsClipboard::transformedCopyOf( const QgsCoordinateReferenceSyst
{
QgsFeatureList featureList = copyOf( fields );

QgsCoordinateTransform ct;
if ( mSrcLayer )
{
QgisApp::instance()->mapCanvas()->getDatumTransformInfo( mSrcLayer, crs().authid(), destCRS.authid() );
ct = QgisApp::instance()->mapCanvas()->mapSettings().datumTransformStore().transformation( mSrcLayer, crs().authid(), destCRS.authid() );
}
else
{
ct = QgsCoordinateTransform( crs(), destCRS, QgsProject::instance() );
QgisApp::instance()->mapCanvas()->getDatumTransformInfo( crs(), destCRS );
}

QgsCoordinateTransform ct = QgsCoordinateTransform( crs(), destCRS, QgsProject::instance() );

QgsDebugMsg( "transforming clipboard." );
for ( QgsFeatureList::iterator iter = featureList.begin(); iter != featureList.end(); ++iter )
{
@@ -162,7 +162,6 @@ SET(QGIS_CORE_SRCS
qgsdatasourceuri.cpp
qgsdataprovider.cpp
qgsdatetimestatisticalsummary.cpp
qgsdatumtransformstore.cpp
qgsdbfilterproxymodel.cpp
qgsdefaultvalue.cpp
qgsdiagramrenderer.cpp
@@ -864,7 +863,6 @@ SET(QGIS_CORE_HDRS
qgsdataitemproviderregistry.h
qgsdatasourceuri.h
qgsdatetimestatisticalsummary.h
qgsdatumtransformstore.h
qgsdbfilterproxymodel.h
qgsdefaultvalue.h
qgsdiagramrenderer.h
@@ -204,9 +204,6 @@ QgsMapSettings QgsComposerMap::mapSettings( const QgsRectangle &extent, QSizeF s
jobMapSettings.setFlag( QgsMapSettings::DrawEditingInfo, false );
jobMapSettings.setFlag( QgsMapSettings::DrawSelection, false );
jobMapSettings.setFlag( QgsMapSettings::UseAdvancedEffects, mComposition->useAdvancedEffects() ); // respect the composition's useAdvancedEffects flag

jobMapSettings.datumTransformStore().setDestinationCrs( renderCrs );

jobMapSettings.setLabelingEngineSettings( mComposition->project()->labelingEngineSettings() );

return jobMapSettings;

This file was deleted.

This file was deleted.

0 comments on commit 018bfb4

Please sign in to comment.
You can’t perform that action at this time.