diff --git a/debian/qgis.install b/debian/qgis.install
index d17e9b75dec3..3ee989b73420 100644
--- a/debian/qgis.install
+++ b/debian/qgis.install
@@ -1,6 +1,5 @@
usr/lib/qgis/plugins/libgeorefplugin.so
usr/lib/qgis/plugins/libgpsimporterplugin.so
-usr/lib/qgis/plugins/libinterpolationplugin.so
usr/lib/qgis/plugins/libcoordinatecaptureplugin.so
usr/lib/qgis/plugins/liboracleplugin.so
usr/lib/qgis/plugins/libevis.so
diff --git a/ms-windows/osgeo4w/package.cmd b/ms-windows/osgeo4w/package.cmd
index af4a81220b27..6c28b6ecfee6 100644
--- a/ms-windows/osgeo4w/package.cmd
+++ b/ms-windows/osgeo4w/package.cmd
@@ -385,7 +385,6 @@ tar -C %OSGEO4W_ROOT% -cjf %ARCH%/release/qgis/%PACKAGENAME%/%PACKAGENAME%-%VERS
"apps/%PACKAGENAME%/plugins/evis.dll" ^
"apps/%PACKAGENAME%/plugins/georefplugin.dll" ^
"apps/%PACKAGENAME%/plugins/gpsimporterplugin.dll" ^
- "apps/%PACKAGENAME%/plugins/interpolationplugin.dll" ^
"apps/%PACKAGENAME%/plugins/offlineeditingplugin.dll" ^
"apps/%PACKAGENAME%/plugins/oracleplugin.dll" ^
"apps/%PACKAGENAME%/plugins/spatialqueryplugin.dll" ^
diff --git a/ms-windows/plugins.nsh b/ms-windows/plugins.nsh
index 9f49e9c9eb15..987f02f225a0 100644
--- a/ms-windows/plugins.nsh
+++ b/ms-windows/plugins.nsh
@@ -14,7 +14,6 @@ WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "georefplugin" "true
WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "globeplugin" "false"
WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "gpsimporterplugin" "true"
WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "grassplugin" "true"
-WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "interpolationplugin" "true"
WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "offlineeditingplugin" "true"
WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "oracleplugin" "true"
WriteRegStr HKEY_CURRENT_USER "Software\QGIS\QGIS3\Plugins" "spatialqueryplugin" "true"
diff --git a/src/plugins/CMakeLists.txt b/src/plugins/CMakeLists.txt
index a699bda1f208..115ba52c4141 100644
--- a/src/plugins/CMakeLists.txt
+++ b/src/plugins/CMakeLists.txt
@@ -6,7 +6,6 @@ ENDIF()
SET (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR})
SET (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${QGIS_OUTPUT_DIRECTORY}/${QGIS_PLUGIN_SUBDIR})
-ADD_SUBDIRECTORY(interpolation)
ADD_SUBDIRECTORY(oracle_raster)
ADD_SUBDIRECTORY(coordinate_capture)
ADD_SUBDIRECTORY(evis)
diff --git a/src/plugins/interpolation/CMakeLists.txt b/src/plugins/interpolation/CMakeLists.txt
deleted file mode 100644
index 639f8eea0fe6..000000000000
--- a/src/plugins/interpolation/CMakeLists.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-########################################################
-# Files
-
-SET (INTERPOLATION_SRCS
- qgsinterpolationplugin.cpp
- qgsidwinterpolatordialog.cpp
- qgsinterpolationdialog.cpp
- qgsinterpolatordialog.cpp
- qgstininterpolatordialog.cpp
-)
-
-SET (INTERPOLATION_UIS
- qgsidwinterpolatordialogbase.ui
- qgsinterpolationdialogbase.ui
- qgstininterpolatordialogbase.ui
- )
-
-SET (INTERPOLATION_MOC_HDRS
- qgsinterpolationplugin.h
- qgstininterpolatordialog.h
- qgsidwinterpolatordialog.h
- qgsinterpolationdialog.h
- qgsinterpolatordialog.h
-)
-
-SET (INTERPOLATION_RCCS interpolator.qrc)
-########################################################
-# Build
-
-QT5_WRAP_UI (INTERPOLATION_UIS_H ${INTERPOLATION_UIS})
-
-QT5_WRAP_CPP (INTERPOLATION_MOC_SRCS ${INTERPOLATION_MOC_HDRS})
-
-QT5_ADD_RESOURCES(INTERPOLATION_RCC_SRCS ${INTERPOLATION_RCCS})
-
-ADD_LIBRARY (interpolationplugin MODULE
- ${INTERPOLATION_SRCS}
- ${INTERPOLATION_MOC_SRCS}
- ${INTERPOLATION_RCC_SRCS}
- ${INTERPOLATION_UIS_H})
-
-INCLUDE_DIRECTORIES(SYSTEM
- ${GEOS_INCLUDE_DIR}
-)
-
-INCLUDE_DIRECTORIES(
- ${CMAKE_CURRENT_BINARY_DIR}
- ../../analysis/interpolation
- ../../core
- ../../core/geometry
- ../../core/raster
- ../../gui
- ..
- .
-)
-
-TARGET_LINK_LIBRARIES(interpolationplugin
- qgis_analysis
- qgis_core
- qgis_gui
-)
-
-
-########################################################
-# Install
-
-INSTALL(TARGETS interpolationplugin
- RUNTIME DESTINATION ${QGIS_PLUGIN_DIR}
- LIBRARY DESTINATION ${QGIS_PLUGIN_DIR}
- )
diff --git a/src/plugins/interpolation/interpolator.qrc b/src/plugins/interpolation/interpolator.qrc
deleted file mode 100644
index 4bbd237598e2..000000000000
--- a/src/plugins/interpolation/interpolator.qrc
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
- raster-interpolate.png
-
-
diff --git a/src/plugins/interpolation/qgsidwinterpolatordialog.cpp b/src/plugins/interpolation/qgsidwinterpolatordialog.cpp
deleted file mode 100644
index e451f91ee038..000000000000
--- a/src/plugins/interpolation/qgsidwinterpolatordialog.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/***************************************************************************
- qgsidwinterpolatordialog.cpp
- ---------------------
- begin : August 2008
- copyright : (C) 2008 by Marco Hugentobler
- email : marco dot hugentobler at sourcepole dot ch
- ***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-#include "qgsidwinterpolatordialog.h"
-#include "qgsidwinterpolator.h"
-
-QgsIDWInterpolatorDialog::QgsIDWInterpolatorDialog( QWidget* parent, QgisInterface* iface ): QgsInterpolatorDialog( parent, iface )
-{
- setupUi( this );
-}
-
-QgsIDWInterpolatorDialog::~QgsIDWInterpolatorDialog()
-{
-
-}
-
-QgsInterpolator* QgsIDWInterpolatorDialog::createInterpolator() const
-{
- QgsIDWInterpolator* theInterpolator = new QgsIDWInterpolator( mInputData );
- theInterpolator->setDistanceCoefficient( mPSpinBox->value() );
- return theInterpolator;
-}
diff --git a/src/plugins/interpolation/qgsidwinterpolatordialog.h b/src/plugins/interpolation/qgsidwinterpolatordialog.h
deleted file mode 100644
index 6866bac1912c..000000000000
--- a/src/plugins/interpolation/qgsidwinterpolatordialog.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/***************************************************************************
- qgsidwinterpolatordialog.h
- --------------------------
- begin : March 25, 2008
- copyright : (C) 2008 by Marco Hugentobler
- email : marco dot hugentobler at karto dot baug dot ethz dot ch
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef QGSIDWINTERPOLATORDIALOG_H
-#define QGSIDWINTERPOLATORDIALOG_H
-
-#include "ui_qgsidwinterpolatordialogbase.h"
-#include "qgsinterpolatordialog.h"
-
-//! A class that takes the input parameter for inverse distance weighting
-class QgsIDWInterpolatorDialog: public QgsInterpolatorDialog, private Ui::QgsIDWInterpolatorDialogBase
-{
- Q_OBJECT
- public:
- QgsIDWInterpolatorDialog( QWidget* parent, QgisInterface* iface );
-
- ~QgsIDWInterpolatorDialog();
-
- /** Creates an IDW interpolator with the specified distance coefficient
- @return 0 in case of error*/
- QgsInterpolator* createInterpolator() const override;
-};
-
-#endif
diff --git a/src/plugins/interpolation/qgsidwinterpolatordialogbase.ui b/src/plugins/interpolation/qgsidwinterpolatordialogbase.ui
deleted file mode 100644
index b64f823675b1..000000000000
--- a/src/plugins/interpolation/qgsidwinterpolatordialogbase.ui
+++ /dev/null
@@ -1,94 +0,0 @@
-
-
- QgsIDWInterpolatorDialogBase
-
-
-
- 0
- 0
- 365
- 80
-
-
-
- Dialog
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
- Distance coefficient P
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- 2.000000000000000
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok
-
-
-
-
-
-
-
-
- buttonBox
- accepted()
- QgsIDWInterpolatorDialogBase
- accept()
-
-
- 248
- 254
-
-
- 157
- 274
-
-
-
-
- buttonBox
- rejected()
- QgsIDWInterpolatorDialogBase
- reject()
-
-
- 316
- 260
-
-
- 286
- 274
-
-
-
-
-
diff --git a/src/plugins/interpolation/qgsinterpolationdialog.cpp b/src/plugins/interpolation/qgsinterpolationdialog.cpp
deleted file mode 100644
index 82e8aa9ce2fa..000000000000
--- a/src/plugins/interpolation/qgsinterpolationdialog.cpp
+++ /dev/null
@@ -1,589 +0,0 @@
-
-/***************************************************************************
- qgsinterpolationdialog.cpp
- --------------------------
- begin : Marco 10, 2008
- copyright : (C) 2008 by Marco Hugentobler
- email : marco dot hugentobler at karto dot baug dot ethz dot ch
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "qgsinterpolationdialog.h"
-#include "qgsinterpolatordialog.h"
-#include "qgsfields.h"
-#include "qgsgridfilewriter.h"
-#include "qgsidwinterpolatordialog.h"
-#include "qgstininterpolatordialog.h"
-#include "qgsmapcanvas.h"
-#include "qgsproject.h"
-#include "qgsvectordataprovider.h"
-#include "qgsvectorlayer.h"
-#include
-#include
-#include
-#include
-
-
-QgsInterpolationDialog::QgsInterpolationDialog( QWidget* parent, QgisInterface* iface ): QDialog( parent ), mIface( iface ), mInterpolatorDialog( nullptr )
-{
- setupUi( this );
-
- QSettings settings;
- restoreGeometry( settings.value( QStringLiteral( "/Interpolation/geometry" ) ).toByteArray() );
-
- //enter available layers into the combo box
- QMap mapLayers = QgsProject::instance()->mapLayers();
- QMap::iterator layer_it = mapLayers.begin();
-
- for ( ; layer_it != mapLayers.end(); ++layer_it )
- {
- QgsVectorLayer* vl = qobject_cast( layer_it.value() );
- if ( vl )
- {
- mInputLayerComboBox->insertItem( 0, vl->name() );
- }
- }
-
- //default resolution 300 * 300
- mNumberOfColumnsSpinBox->setValue( 300 );
- mNumberOfRowsSpinBox->setValue( 300 );
-
- //only inverse distance weighting available for now
- mInterpolationMethodComboBox->insertItem( 0, tr( "Triangular interpolation (TIN)" ) );
- mInterpolationMethodComboBox->insertItem( 1, tr( "Inverse Distance Weighting (IDW)" ) );
- mInterpolationMethodComboBox->setCurrentIndex( settings.value( QStringLiteral( "/Interpolation/lastMethod" ), 0 ).toInt() );
-
- enableOrDisableOkButton();
-}
-
-QgsInterpolationDialog::~QgsInterpolationDialog()
-{
- QSettings settings;
- settings.setValue( QStringLiteral( "/Interpolation/geometry" ), saveGeometry() );
- settings.setValue( QStringLiteral( "/Interpolation/lastMethod" ), mInterpolationMethodComboBox->currentIndex() );
-}
-
-void QgsInterpolationDialog::enableOrDisableOkButton()
-{
- bool enabled = true;
-
- //no input data
- if ( mLayersTreeWidget->topLevelItemCount() < 1 )
- {
- enabled = false;
- }
- else
- {
- QString fileName = mOutputFileLineEdit->text();
- QFileInfo theFileInfo( fileName );
- if ( fileName.isEmpty() || !theFileInfo.dir().exists() )
- {
- enabled = false;
- }
- }
-
- buttonBox->button( QDialogButtonBox::Ok )->setEnabled( enabled );
-}
-
-void QgsInterpolationDialog::on_buttonBox_accepted()
-{
- if ( !mInterpolatorDialog )
- {
- return;
- }
-
- QgsRectangle outputBBox = currentBoundingBox();
- if ( outputBBox.isEmpty() )
- {
- return;
- }
-
- //warn the user if there isn't any input layer
- if ( mLayersTreeWidget->topLevelItemCount() < 1 )
- {
- QMessageBox::information( nullptr, tr( "No input data for interpolation" ), tr( "Please add one or more input layers" ) );
- return;
- }
-
- //read file name
- QString fileName = mOutputFileLineEdit->text();
- QFileInfo theFileInfo( fileName );
- if ( fileName.isEmpty() || !theFileInfo.dir().exists() )
- {
- QMessageBox::information( nullptr, tr( "Output file name invalid" ), tr( "Please enter a valid output file name" ) );
- return;
- }
-
- //add .asc suffix if the user did not provider it already
- QString suffix = theFileInfo.suffix();
- if ( suffix.isEmpty() )
- {
- fileName.append( ".asc" );
- }
-
- int nLayers = mLayersTreeWidget->topLevelItemCount();
- QList< QgsInterpolator::LayerData > inputLayerList;
-
- for ( int i = 0; i < nLayers; ++i )
- {
- QString layerName = mLayersTreeWidget->topLevelItem( i )->text( 0 );
- QgsVectorLayer* theVectorLayer = vectorLayerFromName( layerName );
- if ( !theVectorLayer )
- {
- continue;
- }
-
- QgsVectorDataProvider* theProvider = theVectorLayer->dataProvider();
- if ( !theProvider )
- {
- continue;
- }
-
- QgsInterpolator::LayerData currentLayerData;
- currentLayerData.vectorLayer = theVectorLayer;
-
- QString interpolationAttString = mLayersTreeWidget->topLevelItem( i )->text( 1 );
- if ( interpolationAttString == QLatin1String( "Z_COORD" ) )
- {
- currentLayerData.zCoordInterpolation = true;
- currentLayerData.interpolationAttribute = -1;
- }
- else
- {
- currentLayerData.zCoordInterpolation = false;
- int attributeIndex = theProvider->fieldNameIndex( interpolationAttString );
- currentLayerData.interpolationAttribute = attributeIndex;
- }
-
- //type (point/structure line/ breakline)
- QComboBox* itemCombo = qobject_cast( mLayersTreeWidget->itemWidget( mLayersTreeWidget->topLevelItem( i ), 2 ) );
- if ( itemCombo )
- {
- QString typeString = itemCombo->currentText();
- if ( typeString == tr( "Break lines" ) )
- {
- currentLayerData.mInputType = QgsInterpolator::BREAK_LINES;
- }
- else if ( typeString == tr( "Structure lines" ) )
- {
- currentLayerData.mInputType = QgsInterpolator::STRUCTURE_LINES;
- }
- else //Points
- {
- currentLayerData.mInputType = QgsInterpolator::POINTS;
- }
- }
- else
- {
- currentLayerData.mInputType = QgsInterpolator::POINTS;
- }
- inputLayerList.push_back( currentLayerData );
- }
-
- mInterpolatorDialog->setInputData( inputLayerList );
- QgsInterpolator* theInterpolator = mInterpolatorDialog->createInterpolator();
-
- if ( !theInterpolator )
- {
- return;
- }
-
- //create grid file writer
- QgsGridFileWriter theWriter( theInterpolator, fileName, outputBBox, mNumberOfColumnsSpinBox->value(),
- mNumberOfRowsSpinBox->value(), mCellsizeXSpinBox->value(), mCellSizeYSpinBox->value() );
- if ( theWriter.writeFile( true ) == 0 )
- {
- if ( mAddResultToProjectCheckBox->isChecked() )
- {
- mIface->addRasterLayer( fileName, QFileInfo( fileName ).baseName() );
- }
- accept();
- }
-
- delete theInterpolator;
-}
-
-void QgsInterpolationDialog::on_mInputLayerComboBox_currentIndexChanged( const QString& text )
-{
- Q_UNUSED( text );
- mInterpolationAttributeComboBox->clear();
- mUseZCoordCheckBox->setEnabled( false );
-
- //get current vector layer
- QString currentComboText = mInputLayerComboBox->currentText();
- QgsVectorLayer* theVectorLayer = vectorLayerFromName( currentComboText );
-
- if ( !theVectorLayer )
- {
- return;
- }
-
- QgsVectorDataProvider* provider = theVectorLayer->dataProvider();
- if ( !provider )
- {
- return;
- }
-
- //find out if the layer has 25D type
- QgsWkbTypes::Type geomType = provider->wkbType();
- if ( geomType == QgsWkbTypes::Point25D ||
- geomType == QgsWkbTypes::LineString25D ||
- geomType == QgsWkbTypes::Polygon25D ||
- geomType == QgsWkbTypes::MultiPoint25D ||
- geomType == QgsWkbTypes::MultiLineString25D ||
- geomType == QgsWkbTypes::MultiPolygon25D )
- {
- mUseZCoordCheckBox->setEnabled( true );
- }
-
- //insert numeric attributes of layer into mInterpolationAttributesComboBox
- Q_FOREACH ( const QgsField& currentField, provider->fields() )
- {
- QVariant::Type currentType = currentField.type();
- if ( currentType == QVariant::Int || currentType == QVariant::Double )
- {
- mInterpolationAttributeComboBox->insertItem( 0, currentField.name() );
- }
- }
-}
-
-void QgsInterpolationDialog::on_mAddPushButton_clicked()
-{
- //read active layer in mInputLayerComboBox
- QString inputLayer = mInputLayerComboBox->currentText();
-
- //read attribute / z-coordinate interpolation
- QString interpolationAttribute;
- if ( mUseZCoordCheckBox->checkState() == Qt::Checked )
- {
- interpolationAttribute = QStringLiteral( "Z_COORD" );
- }
- else
- {
- interpolationAttribute = mInterpolationAttributeComboBox->currentText();
- }
-
- QTreeWidgetItem* newLayerItem = new QTreeWidgetItem();
- newLayerItem->setText( 0, inputLayer );
- newLayerItem->setText( 1, interpolationAttribute );
-
- mLayersTreeWidget->addTopLevelItem( newLayerItem );
- QComboBox* typeComboBox = new QComboBox();
- typeComboBox->addItem( tr( "Points" ) );
- typeComboBox->addItem( tr( "Structure lines" ) );
- typeComboBox->addItem( tr( "Break lines" ) );
- typeComboBox->setCurrentIndex( 0 );
- mLayersTreeWidget->setItemWidget( newLayerItem, 2, typeComboBox );
-
- //keep bounding box up to date
- setLayersBoundingBox();
-
- enableOrDisableOkButton();
-}
-
-void QgsInterpolationDialog::on_mRemovePushButton_clicked()
-{
- QTreeWidgetItem* currentItem = mLayersTreeWidget->currentItem();
- if ( !currentItem )
- {
- return;
- }
- delete currentItem;
- enableOrDisableOkButton();
-}
-
-void QgsInterpolationDialog::on_mOutputFileButton_clicked()
-{
- //get last output file dir
- QSettings s;
- QString lastOutputDir = s.value( QStringLiteral( "/Interpolation/lastOutputDir" ), QDir::homePath() ).toString();
-
- QString rasterFileName = QFileDialog::getSaveFileName( nullptr, tr( "Save interpolated raster as..." ), lastOutputDir );
- if ( !rasterFileName.isEmpty() )
- {
- mOutputFileLineEdit->setText( rasterFileName );
- QFileInfo rasterFileInfo( rasterFileName );
- QDir fileDir = rasterFileInfo.absoluteDir();
- if ( fileDir.exists() )
- {
- s.setValue( QStringLiteral( "/Interpolation/lastOutputDir" ), rasterFileInfo.absolutePath() );
- }
- }
- enableOrDisableOkButton();
-}
-
-void QgsInterpolationDialog::on_mOutputFileLineEdit_textChanged()
-{
- if ( mOutputFileLineEdit->text().endsWith( QLatin1String( ".asc" ) ) )
- {
- enableOrDisableOkButton();
- }
-}
-
-void QgsInterpolationDialog::on_mConfigureInterpolationButton_clicked()
-{
- if ( mInterpolatorDialog )
- {
- mInterpolatorDialog->exec();
- }
-}
-
-QgsVectorLayer* QgsInterpolationDialog::vectorLayerFromName( const QString& name )
-{
- QMap mapLayers = QgsProject::instance()->mapLayers();
- QMap::iterator layer_it = mapLayers.begin();
-
- for ( ; layer_it != mapLayers.end(); ++layer_it )
- {
- if ( layer_it.value()->name() == name )
- {
- return qobject_cast( layer_it.value() );
- }
- }
-
- return nullptr;
-}
-
-void QgsInterpolationDialog::on_mInterpolationMethodComboBox_currentIndexChanged( const QString &text )
-{
- delete mInterpolatorDialog;
- if ( text == tr( "Inverse Distance Weighting (IDW)" ) )
- {
- mInterpolatorDialog = new QgsIDWInterpolatorDialog( this, mIface );
- }
- else if ( text == tr( "Triangular interpolation (TIN)" ) )
- {
- mInterpolatorDialog = new QgsTINInterpolatorDialog( this, mIface );
- }
-}
-
-void QgsInterpolationDialog::on_mNumberOfColumnsSpinBox_valueChanged( int value )
-{
- Q_UNUSED( value );
- setNewCellsizeXOnNColumnsChange();
-}
-
-void QgsInterpolationDialog::on_mNumberOfRowsSpinBox_valueChanged( int value )
-{
- Q_UNUSED( value );
- setNewCellsizeYOnNRowschange();
-}
-
-void QgsInterpolationDialog::on_mCellsizeXSpinBox_valueChanged( double value )
-{
- Q_UNUSED( value );
- setNColsOnCellsizeXChange();
-}
-
-void QgsInterpolationDialog::on_mCellSizeYSpinBox_valueChanged( double value )
-{
- Q_UNUSED( value );
- setNRowsOnCellsizeYChange();
-}
-
-void QgsInterpolationDialog::on_mXMinLineEdit_textEdited( const QString& text )
-{
- Q_UNUSED( text );
- setNewCellsizeOnBoundingBoxChange();
-}
-
-void QgsInterpolationDialog::on_mXMaxLineEdit_textEdited( const QString& text )
-{
- Q_UNUSED( text );
- setNewCellsizeOnBoundingBoxChange();
-}
-
-void QgsInterpolationDialog::on_mYMinLineEdit_textEdited( const QString& text )
-{
- Q_UNUSED( text );
- setNewCellsizeOnBoundingBoxChange();
-}
-
-void QgsInterpolationDialog::on_mYMaxLineEdit_textEdited( const QString& text )
-{
- Q_UNUSED( text );
- setNewCellsizeOnBoundingBoxChange();
-}
-
-void QgsInterpolationDialog::on_mBBoxToCurrentExtent_clicked()
-{
- if ( mIface )
- {
- QgsMapCanvas* canvas = mIface->mapCanvas();
- if ( canvas )
- {
- QgsRectangle extent = canvas->extent();
- mXMinLineEdit->setText( QString::number( extent.xMinimum() ) );
- mXMaxLineEdit->setText( QString::number( extent.xMaximum() ) );
- mYMinLineEdit->setText( QString::number( extent.yMinimum() ) );
- mYMaxLineEdit->setText( QString::number( extent.yMaximum() ) );
- setNewCellsizeOnBoundingBoxChange();
- }
- }
-}
-
-QgsRectangle QgsInterpolationDialog::boundingBoxOfLayers()
-{
- int nLayers = mLayersTreeWidget->topLevelItemCount();
- QgsRectangle combinedLayerExtent;
-
- for ( int i = 0; i < nLayers; ++i )
- {
- QString layerName = mLayersTreeWidget->topLevelItem( i )->text( 0 );
- QgsVectorLayer* theVectorLayer = vectorLayerFromName( layerName );
- if ( !theVectorLayer )
- {
- continue;
- }
-
- QgsVectorDataProvider* theProvider = theVectorLayer->dataProvider();
- if ( !theProvider )
- {
- continue;
- }
-
- //update extent
- QgsRectangle currentLayerExtent = theVectorLayer->extent();
- if ( combinedLayerExtent.isEmpty() )
- {
- combinedLayerExtent = currentLayerExtent;
- }
- else
- {
- combinedLayerExtent.combineExtentWith( currentLayerExtent );
- }
- }
- return combinedLayerExtent;
-}
-
-void QgsInterpolationDialog::setLayersBoundingBox()
-{
- QgsRectangle layersBoundingBox = boundingBoxOfLayers();
- mXMinLineEdit->setText( QString::number( layersBoundingBox.xMinimum() ) );
- mXMaxLineEdit->setText( QString::number( layersBoundingBox.xMaximum() ) );
- mYMinLineEdit->setText( QString::number( layersBoundingBox.yMinimum() ) );
- mYMaxLineEdit->setText( QString::number( layersBoundingBox.yMaximum() ) );
- setNewCellsizeOnBoundingBoxChange();
-}
-
-void QgsInterpolationDialog::setNewCellsizeOnBoundingBoxChange()
-{
- QgsRectangle currentBbox = currentBoundingBox();
- if ( currentBbox.isEmpty() )
- {
- return;
- }
-
- if ( currentBbox.width() > 0 && mNumberOfColumnsSpinBox->value() > 0 )
- {
- mCellsizeXSpinBox->blockSignals( true );
- mCellsizeXSpinBox->setValue( currentBbox.width() / mNumberOfColumnsSpinBox->value() );
- mCellsizeXSpinBox->blockSignals( false );
- }
- if ( currentBbox.height() > 0 && mNumberOfRowsSpinBox->value() > 0 )
- {
- mCellSizeYSpinBox->blockSignals( true );
- mCellSizeYSpinBox->setValue( currentBbox.height() / mNumberOfRowsSpinBox->value() );
- mCellSizeYSpinBox->blockSignals( false );
- }
-}
-
-void QgsInterpolationDialog::setNewCellsizeXOnNColumnsChange()
-{
- QgsRectangle currentBBox = currentBoundingBox();
- if ( !currentBBox.isEmpty() && mNumberOfColumnsSpinBox->value() > 0 )
- {
- mCellsizeXSpinBox->blockSignals( true );
- mCellsizeXSpinBox->setValue( currentBBox.width() / mNumberOfColumnsSpinBox->value() );
- mCellsizeXSpinBox->blockSignals( false );
- }
-}
-
-void QgsInterpolationDialog::setNewCellsizeYOnNRowschange()
-{
- QgsRectangle currentBBox = currentBoundingBox();
- if ( !currentBBox.isEmpty() && mNumberOfRowsSpinBox->value() > 0 )
- {
- mCellSizeYSpinBox->blockSignals( true );
- mCellSizeYSpinBox->setValue( currentBBox.height() / mNumberOfRowsSpinBox->value() );
- mCellSizeYSpinBox->blockSignals( false );
- }
-}
-
-void QgsInterpolationDialog::setNColsOnCellsizeXChange()
-{
- QgsRectangle currentBBox = currentBoundingBox();
- int newSize;
-
- if ( mCellsizeXSpinBox->value() <= 0 )
- {
- return;
- }
-
- if ( currentBBox.width() <= 0 )
- {
- newSize = 0;
- }
- else
- {
- newSize = ( int )( currentBBox.width() / mCellsizeXSpinBox->value() );
- }
-
- mNumberOfColumnsSpinBox->blockSignals( true );
- mNumberOfColumnsSpinBox->setValue( newSize );
- mNumberOfColumnsSpinBox->blockSignals( false );
-}
-
-void QgsInterpolationDialog::setNRowsOnCellsizeYChange()
-{
- QgsRectangle currentBBox = currentBoundingBox();
- int newSize;
-
- if ( mCellSizeYSpinBox->value() <= 0 )
- {
- return;
- }
-
- if ( currentBBox.height() <= 0 )
- {
- newSize = 0;
- }
- else
- {
- newSize = ( int )( currentBBox.height() / mCellSizeYSpinBox->value() );
- }
-
- mNumberOfRowsSpinBox->blockSignals( true );
- mNumberOfRowsSpinBox->setValue( newSize );
- mNumberOfRowsSpinBox->blockSignals( false );
-}
-
-QgsRectangle QgsInterpolationDialog::currentBoundingBox()
-{
- QString xMinString = mXMinLineEdit->text();
- QString xMaxString = mXMaxLineEdit->text();
- QString yMinString = mYMinLineEdit->text();
- QString yMaxString = mYMaxLineEdit->text();
-
- bool xMinOk, xMaxOk, yMinOk, yMaxOk;
- double xMin = xMinString.toDouble( &xMinOk );
- double xMax = xMaxString.toDouble( &xMaxOk );
- double yMin = yMinString.toDouble( &yMinOk );
- double yMax = yMaxString.toDouble( &yMaxOk );
-
- if ( !xMinOk || !xMaxOk || !yMinOk || !yMaxOk )
- {
- QgsRectangle emptyBbox;
- return emptyBbox; //error, return empty bounding box
- }
-
- return QgsRectangle( xMin, yMin, xMax, yMax );
-}
diff --git a/src/plugins/interpolation/qgsinterpolationdialog.h b/src/plugins/interpolation/qgsinterpolationdialog.h
deleted file mode 100644
index 699e857cda66..000000000000
--- a/src/plugins/interpolation/qgsinterpolationdialog.h
+++ /dev/null
@@ -1,83 +0,0 @@
-/***************************************************************************
- qgsinterpolationdialog.h
- ------------------------
- begin : March 10, 2008
- copyright : (C) 2008 by Marco Hugentobler
- email : marco dot hugentobler at karto dot baug dot ethz dot ch
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef QGSINTERPOLATIONDIALOG_H
-#define QGSINTERPOLATIONDIALOG_H
-
-#include "ui_qgsinterpolationdialogbase.h"
-#include "qgsrectangle.h"
-#include "qgisinterface.h"
-#include
-
-class QgsInterpolatorDialog;
-class QgsVectorLayer;
-
-class QgsInterpolationDialog: public QDialog, private Ui::QgsInterpolationDialogBase
-{
- Q_OBJECT
- public:
- QgsInterpolationDialog( QWidget* parent, QgisInterface* iface );
- ~QgsInterpolationDialog();
-
- private slots:
- void on_buttonBox_accepted();
- void on_mInputLayerComboBox_currentIndexChanged( const QString& text );
- void on_mOutputFileButton_clicked();
- void on_mOutputFileLineEdit_textChanged();
- void on_mConfigureInterpolationButton_clicked();
- void on_mInterpolationMethodComboBox_currentIndexChanged( const QString &text );
- void on_mAddPushButton_clicked();
- void on_mRemovePushButton_clicked();
-
- void on_mNumberOfColumnsSpinBox_valueChanged( int value );
- void on_mNumberOfRowsSpinBox_valueChanged( int value );
- void on_mCellsizeXSpinBox_valueChanged( double value );
- void on_mCellSizeYSpinBox_valueChanged( double value );
- void on_mBBoxToCurrentExtent_clicked();
-
- void on_mXMinLineEdit_textEdited( const QString& text );
- void on_mXMaxLineEdit_textEdited( const QString& text );
- void on_mYMinLineEdit_textEdited( const QString& text );
- void on_mYMaxLineEdit_textEdited( const QString& text );
-
- private:
- QgisInterface* mIface;
- //! Dialog to get input for the current interpolation method
- QgsInterpolatorDialog* mInterpolatorDialog;
-
- /** Returns the vector layer object with the given name
- Returns a pointer to the vector layer or 0 in case of error.*/
- QgsVectorLayer* vectorLayerFromName( const QString& name );
- //! Enables or disables the Ok button depending on the availability of input layers and the output file
- void enableOrDisableOkButton();
-
- /** Get the current output bounding box (might be different to the compound layers bounding box because of user edits)
- @return the bounding box or an empty bounding box in case of error*/
- QgsRectangle currentBoundingBox();
- //! Returns the compound bounding box of the inserted layers
- QgsRectangle boundingBoxOfLayers();
- //! Inserts the compound bounding box of the input layers into the line edits for the output bounding box
- void setLayersBoundingBox();
- //! Set cellsizes according to nex bounding box and number of columns / rows
- void setNewCellsizeOnBoundingBoxChange();
- void setNewCellsizeXOnNColumnsChange();
- void setNewCellsizeYOnNRowschange();
- void setNColsOnCellsizeXChange();
- void setNRowsOnCellsizeYChange();
-};
-
-#endif
diff --git a/src/plugins/interpolation/qgsinterpolationdialogbase.ui b/src/plugins/interpolation/qgsinterpolationdialogbase.ui
deleted file mode 100644
index 1910d503654b..000000000000
--- a/src/plugins/interpolation/qgsinterpolationdialogbase.ui
+++ /dev/null
@@ -1,408 +0,0 @@
-
-
- QgsInterpolationDialogBase
-
-
-
- 0
- 0
- 858
- 389
-
-
-
-
- 0
- 0
-
-
-
- Interpolation plugin
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Input
-
-
-
-
-
-
- Vector layers
-
-
- mInputLayerComboBox
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
- Interpolation attribute
-
-
- mInterpolationAttributeComboBox
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
- Use z-Coordinate for interpolation
-
-
-
- -
-
-
- Add
-
-
-
- -
-
-
- Remove
-
-
-
- -
-
-
-
- Vector layer
-
-
-
-
- Attribute
-
-
-
-
- Type
-
-
-
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Output
-
-
-
-
-
-
- Interpolation method
-
-
- mInterpolationMethodComboBox
-
-
-
- -
-
-
- -
-
-
- ...
-
-
-
- :/mActionOptions.svg:/mActionOptions.svg
-
-
-
- -
-
-
- Number of columns
-
-
- mNumberOfColumnsSpinBox
-
-
-
- -
-
-
- 10000000
-
-
-
- -
-
-
- Number of rows
-
-
- mNumberOfRowsSpinBox
-
-
-
- -
-
-
- 10000000
-
-
-
- -
-
-
- Cellsize X
-
-
- mCellsizeXSpinBox
-
-
-
- -
-
-
- 5
-
-
- 999999.000000000000000
-
-
-
- -
-
-
- Cellsize Y
-
-
- mCellSizeYSpinBox
-
-
-
- -
-
-
- 5
-
-
- 999999.000000000000000
-
-
-
- -
-
-
-
-
-
- X min
-
-
- mXMinLineEdit
-
-
-
- -
-
-
- -
-
-
- X max
-
-
- mXMaxLineEdit
-
-
-
- -
-
-
- -
-
-
- Y min
-
-
- mYMinLineEdit
-
-
-
- -
-
-
- -
-
-
- Y max
-
-
- mYMaxLineEdit
-
-
-
- -
-
-
- -
-
-
- Set to current extent
-
-
-
-
-
- -
-
-
- Output file
-
-
- mOutputFileLineEdit
-
-
-
- -
-
-
- -
-
-
- ...
-
-
-
- -
-
-
- Add result to project
-
-
- true
-
-
-
- -
-
-
- Qt::Vertical
-
-
-
- 20
- 40
-
-
-
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QDialogButtonBox::Cancel|QDialogButtonBox::Ok
-
-
-
-
-
-
- mInputLayerComboBox
- mInterpolationAttributeComboBox
- mUseZCoordCheckBox
- mAddPushButton
- mRemovePushButton
- mLayersTreeWidget
- mInterpolationMethodComboBox
- mConfigureInterpolationButton
- mNumberOfColumnsSpinBox
- mNumberOfRowsSpinBox
- mCellsizeXSpinBox
- mCellSizeYSpinBox
- mXMinLineEdit
- mXMaxLineEdit
- mYMinLineEdit
- mYMaxLineEdit
- mBBoxToCurrentExtent
- mOutputFileLineEdit
- mOutputFileButton
- buttonBox
-
-
-
-
-
-
- buttonBox
- accepted()
- QgsInterpolationDialogBase
- accept()
-
-
- 266
- 723
-
-
- 157
- 274
-
-
-
-
- buttonBox
- rejected()
- QgsInterpolationDialogBase
- reject()
-
-
- 334
- 723
-
-
- 286
- 274
-
-
-
-
-
diff --git a/src/plugins/interpolation/qgsinterpolationplugin.cpp b/src/plugins/interpolation/qgsinterpolationplugin.cpp
deleted file mode 100644
index ac6d4c203a47..000000000000
--- a/src/plugins/interpolation/qgsinterpolationplugin.cpp
+++ /dev/null
@@ -1,104 +0,0 @@
-/***************************************************************************
- qgsinterpolationplugin.cpp
- --------------------------
- begin : Marco 10, 2008
- copyright : (C) 2008 by Marco Hugentobler
- email : marco dot hugentobler at karto dot baug dot ethz dot ch
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "qgsapplication.h"
-#include "qgsinterpolationplugin.h"
-#include "qgisinterface.h"
-#include "qgsinterpolationdialog.h"
-
-#include
-
-static const QString name_ = QObject::tr( "Interpolation plugin" );
-static const QString description_ = QObject::tr( "A plugin for interpolation based on vertices of a vector layer" );
-static const QString category_ = QObject::tr( "Raster" );
-static const QString version_ = QObject::tr( "Version 0.001" );
-static const QString icon_ = QStringLiteral( ":/raster-interpolate.png" );
-
-QgsInterpolationPlugin::QgsInterpolationPlugin( QgisInterface* iface ): mIface( iface ), mInterpolationAction( nullptr )
-{
-
-}
-
-QgsInterpolationPlugin::~QgsInterpolationPlugin()
-{
-
-}
-
-void QgsInterpolationPlugin::initGui()
-{
- if ( mIface )
- {
- mInterpolationAction = new QAction( QIcon( ":/raster-interpolate.png" ), tr( "&Interpolation" ), nullptr );
- mInterpolationAction->setObjectName( QStringLiteral( "mInterpolationAction" ) );
- QObject::connect( mInterpolationAction, SIGNAL( triggered() ), this, SLOT( showInterpolationDialog() ) );
- mIface->addRasterToolBarIcon( mInterpolationAction );
- mIface->addPluginToRasterMenu( tr( "&Interpolation" ), mInterpolationAction );
- }
-}
-
-void QgsInterpolationPlugin::unload()
-{
- mIface->removePluginRasterMenu( tr( "&Interpolation" ), mInterpolationAction );
- mIface->removeRasterToolBarIcon( mInterpolationAction );
- delete mInterpolationAction;
-}
-
-void QgsInterpolationPlugin::showInterpolationDialog()
-{
- QgsInterpolationDialog dialog( mIface->mainWindow(), mIface );
- dialog.exec();
-}
-
-QGISEXTERN QgisPlugin * classFactory( QgisInterface * theQgisInterfacePointer )
-{
- return new QgsInterpolationPlugin( theQgisInterfacePointer );
-}
-
-QGISEXTERN QString name()
-{
- return name_;
-}
-
-QGISEXTERN QString description()
-{
- return description_;
-}
-
-QGISEXTERN QString category()
-{
- return category_;
-}
-
-QGISEXTERN QString version()
-{
- return version_;
-}
-
-QGISEXTERN QString icon()
-{
- return icon_;
-}
-
-QGISEXTERN int type()
-{
- return QgisPlugin::UI;
-}
-
-QGISEXTERN void unload( QgisPlugin* theInterpolationPluginPointer )
-{
- delete theInterpolationPluginPointer;
-}
diff --git a/src/plugins/interpolation/qgsinterpolationplugin.h b/src/plugins/interpolation/qgsinterpolationplugin.h
deleted file mode 100644
index 47a1bea8a9c0..000000000000
--- a/src/plugins/interpolation/qgsinterpolationplugin.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/***************************************************************************
- qgsinterpolationplugin.h
- ------------------------
- begin : March 10, 2008
- copyright : (C) 2008 by Marco Hugentobler
- email : marco dot hugentobler at karto dot baug dot ethz dot ch
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef QGSINTERPOLATIONPLUGIN_H
-#define QGSINTERPOLATIONPLUGIN_H
-
-#include "qgisplugin.h"
-#include
-
-class QgisInterface;
-class QAction;
-
-/** A plugin that does interpolation on vertices of
-a vector layer*/
-class QgsInterpolationPlugin: public QObject, public QgisPlugin
-{
- Q_OBJECT
-
- public:
- explicit QgsInterpolationPlugin( QgisInterface* iface );
- ~QgsInterpolationPlugin();
- //! Initialize connection to GUI
- void initGui() override;
- //! Unload the plugin and cleanup the GUI
- void unload() override;
-
- private slots:
- void showInterpolationDialog();
-
- private:
- QgisInterface* mIface;
- QAction* mInterpolationAction;
-};
-
-#endif
diff --git a/src/plugins/interpolation/qgsinterpolatordialog.cpp b/src/plugins/interpolation/qgsinterpolatordialog.cpp
deleted file mode 100644
index 4470397915be..000000000000
--- a/src/plugins/interpolation/qgsinterpolatordialog.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/***************************************************************************
- qgsinterpolatordialog.cpp
- -------------------------
- begin : March 25, 2008
- copyright : (C) 2008 by Marco Hugentobler
- email : marco dot hugentobler at karto dot baug dot ethz dot ch
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "qgsinterpolatordialog.h"
-
-QgsInterpolatorDialog::QgsInterpolatorDialog( QWidget* parent, QgisInterface* iface ): QDialog( parent ), mInterface( iface )
-{
-
-}
-
-QgsInterpolatorDialog::~QgsInterpolatorDialog()
-{
-
-}
-
-void QgsInterpolatorDialog::setInputData( const QList< QgsInterpolator::LayerData >& inputData )
-{
- mInputData = inputData;
-}
diff --git a/src/plugins/interpolation/qgsinterpolatordialog.h b/src/plugins/interpolation/qgsinterpolatordialog.h
deleted file mode 100644
index ccec979b58b6..000000000000
--- a/src/plugins/interpolation/qgsinterpolatordialog.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/***************************************************************************
- qgsinterpolatordialog.h
- ------------------------
- begin : March 25, 2008
- copyright : (C) 2008 by Marco Hugentobler
- email : marco dot hugentobler at karto dot baug dot ethz dot ch
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef QGSINTERPOLATORDIALOG_H
-#define QGSINTERPOLATORDIALOG_H
-
-#include "qgsinterpolator.h"
-#include
-#include
-
-class QgsVectorLayer;
-class QgisInterface;
-
-//! Abstract base class for dialogs that allow entering the options for interpolators
-class QgsInterpolatorDialog: public QDialog
-{
- Q_OBJECT
-
- public:
- QgsInterpolatorDialog( QWidget* parent, QgisInterface* iface );
- virtual ~QgsInterpolatorDialog();
-
- /** Method that returns an interpolator object from the settings or 0 in case of error.
- The calling method takes ownership of the created interpolator and is responsible for its proper destruction*/
- virtual QgsInterpolator* createInterpolator() const = 0;
-
- void setInputData( const QList< QgsInterpolator::LayerData >& inputData );
-
- protected:
- //! Pointer to the running QGIS instance. This may be necessary to show interpolator properties on the map (e.g. triangulation)
- QgisInterface* mInterface;
-
- //! A list of input data layers, their interpolation attribute and their type (point, structure lines, breaklines)
- QList< QgsInterpolator::LayerData > mInputData;
-};
-
-#endif
diff --git a/src/plugins/interpolation/qgstininterpolatordialog.cpp b/src/plugins/interpolation/qgstininterpolatordialog.cpp
deleted file mode 100644
index 6eaed717075b..000000000000
--- a/src/plugins/interpolation/qgstininterpolatordialog.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-/***************************************************************************
- qgstininterpolatordialog.cpp
- ----------------------------
- begin : March 29, 2008
- copyright : (C) 2008 by Marco Hugentobler
- email : marco dot hugentobler at karto dot baug dot ethz dot ch
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#include "qgstininterpolatordialog.h"
-#include "qgstininterpolator.h"
-#include
-#include
-
-QgsTINInterpolatorDialog::QgsTINInterpolatorDialog( QWidget* parent, QgisInterface* iface ): QgsInterpolatorDialog( parent, iface )
-{
- setupUi( this );
-
- //don't export triangulation by default
- mExportTriangulationCheckBox->setCheckState( Qt::Unchecked );
- mTriangulationFileEdit->setEnabled( false );
- mTriangulationFileButton->setEnabled( false );
-
- //enter available interpolation methods
- mInterpolationComboBox->insertItem( 0, tr( "Linear" ) );
- mInterpolationComboBox->insertItem( 1, tr( "Clough-Toucher (cubic)" ) );
-}
-
-QgsTINInterpolatorDialog::~QgsTINInterpolatorDialog()
-{
-
-}
-
-QgsInterpolator* QgsTINInterpolatorDialog::createInterpolator() const
-{
- QgsTINInterpolator* theInterpolator = nullptr;
-
- if ( mInterpolationComboBox->currentText() == tr( "Clough-Toucher (cubic)" ) )
- {
- theInterpolator = new QgsTINInterpolator( mInputData, QgsTINInterpolator::CloughTocher, true );
- }
- else //linear is the default
- {
- theInterpolator = new QgsTINInterpolator( mInputData, QgsTINInterpolator::Linear, true );
- }
-
- if ( mExportTriangulationCheckBox->checkState() == Qt::Checked )
- {
- theInterpolator->setExportTriangulationToFile( true );
- theInterpolator->setTriangulationFilePath( mTriangulationFileEdit->text() );
- }
- else
- {
- theInterpolator->setExportTriangulationToFile( false );
- }
- return theInterpolator;
-}
-
-void QgsTINInterpolatorDialog::on_mExportTriangulationCheckBox_stateChanged( int state )
-{
- if ( state == Qt::Checked )
- {
- mTriangulationFileEdit->setEnabled( true );
- mTriangulationFileButton->setEnabled( true );
- }
- else
- {
- mTriangulationFileEdit->setEnabled( false );
- mTriangulationFileButton->setEnabled( false );
- }
-}
-
-void QgsTINInterpolatorDialog::on_mTriangulationFileButton_clicked()
-{
- QSettings s;
- //read last triangulation directory
- QString lastTriangulationDir = s.value( QStringLiteral( "/Interpolation/lastTriangulationDir" ), QDir::homePath() ).toString();
- QString filename = QFileDialog::getSaveFileName( nullptr, tr( "Save triangulation to file" ), lastTriangulationDir, QStringLiteral( "*shp" ) );
- if ( !filename.isEmpty() )
- {
- mTriangulationFileEdit->setText( filename );
-
- //and save triangulation directory
- QFileInfo triangulationFileInfo( filename );
- QDir fileDir = triangulationFileInfo.absoluteDir();
- if ( fileDir.exists() )
- {
- s.setValue( QStringLiteral( "/Interpolation/lastTriangulationDir" ), triangulationFileInfo.absolutePath() );
- }
- }
-}
diff --git a/src/plugins/interpolation/qgstininterpolatordialog.h b/src/plugins/interpolation/qgstininterpolatordialog.h
deleted file mode 100644
index bfd09c0a5339..000000000000
--- a/src/plugins/interpolation/qgstininterpolatordialog.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/***************************************************************************
- qgstininterpolatordialog.h
- --------------------------
- begin : March 29, 2008
- copyright : (C) 2008 by Marco Hugentobler
- email : marco dot hugentobler at karto dot baug dot ethz dot ch
- ***************************************************************************/
-
-/***************************************************************************
- * *
- * This program is free software; you can redistribute it and/or modify *
- * it under the terms of the GNU General Public License as published by *
- * the Free Software Foundation; either version 2 of the License, or *
- * (at your option) any later version. *
- * *
- ***************************************************************************/
-
-#ifndef QGSTININTERPOLATORDIALOG_H
-#define QGSTININTERPOLATORDIALOG_H
-
-#include "qgsinterpolatordialog.h"
-#include "ui_qgstininterpolatordialogbase.h"
-
-class QgsTINInterpolatorDialog: public QgsInterpolatorDialog, private Ui::QgsTINInterpolatorDialogBase
-{
- Q_OBJECT
- public:
- QgsTINInterpolatorDialog( QWidget* parent, QgisInterface* iface );
-
- ~QgsTINInterpolatorDialog();
-
- /** Method that returns an interpolator object from the settings or 0 in case of error.
- The calling method takes ownership of the created interpolator and is responsible for its proper destruction*/
- QgsInterpolator* createInterpolator() const override;
-
- private slots:
- void on_mExportTriangulationCheckBox_stateChanged( int state );
- void on_mTriangulationFileButton_clicked();
-};
-
-#endif
diff --git a/src/plugins/interpolation/qgstininterpolatordialogbase.ui b/src/plugins/interpolation/qgstininterpolatordialogbase.ui
deleted file mode 100644
index a36f06eb3a9e..000000000000
--- a/src/plugins/interpolation/qgstininterpolatordialogbase.ui
+++ /dev/null
@@ -1,136 +0,0 @@
-
-
- QgsTINInterpolatorDialogBase
-
-
-
- 0
- 0
- 394
- 124
-
-
-
- Triangle based interpolation
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Interpolation method
-
-
- mInterpolationComboBox
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
- Export triangulation to shapefile after interpolation
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
- Output file
-
-
- mTriangulationFileEdit
-
-
-
- -
-
-
- -
-
-
-
- 0
- 0
-
-
-
- ...
-
-
-
- -
-
-
- Qt::Horizontal
-
-
- QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Ok
-
-
-
-
-
-
- mInterpolationComboBox
- mExportTriangulationCheckBox
- mTriangulationFileEdit
- mTriangulationFileButton
- buttonBox
-
-
-
-
- buttonBox
- accepted()
- QgsTINInterpolatorDialogBase
- accept()
-
-
- 248
- 254
-
-
- 157
- 274
-
-
-
-
- buttonBox
- rejected()
- QgsTINInterpolatorDialogBase
- reject()
-
-
- 316
- 260
-
-
- 286
- 274
-
-
-
-
-
diff --git a/src/plugins/interpolation/raster-interpolate.png b/src/plugins/interpolation/raster-interpolate.png
deleted file mode 100644
index a12fa2dce6c0..000000000000
Binary files a/src/plugins/interpolation/raster-interpolate.png and /dev/null differ