Skip to content
Permalink
Browse files

[processing] Port Refactor Fields to c++

Having this core algorithm in Python has proved just too unreliable

Refs #36706, refs #36843
  • Loading branch information
nyalldawson committed Jun 1, 2020
1 parent 191e362 commit dbe9aa0902528d938d91bd68d41caea580a16285
@@ -297,6 +297,8 @@ their acceptable ranges, defaults, etc.
sipType = sipType_QgsProcessingParameterDatabaseSchema;
else if ( sipCpp->type() == QgsProcessingParameterDatabaseTable::typeName() )
sipType = sipType_QgsProcessingParameterDatabaseTable;
else if ( sipCpp->type() == QgsProcessingParameterFieldMapping::typeName() )
sipType = sipType_QgsProcessingParameterFieldMapping;
else
sipType = nullptr;
%End
@@ -316,13 +316,6 @@ qgis:rastersampling: >

If the raster layer has more than one band, all the band values are sampled.

qgis:refactorfields: >
This algorithm allows editing the structure of the attributes table of a vector layer. Fields can be modified in their type and name, using a fields mapping.

The original layer is not modified. A new layer is generated, which contains a modified attribute table, according to the provided fields mapping.

Rows in orange have constraints in the template layer from which these fields were loaded. Treat this information as a hint during configuration. No constraints will be added on an output layer nor will they be checked or enforced by the algorithm.

qgis:regularpoints: >
This algorithm creates a point layer with a given number of regular points, all of them within a given extent.

This file was deleted.

@@ -44,7 +44,6 @@
from .ExportGeometryInfo import ExportGeometryInfo
from .FieldPyculator import FieldsPyculator
from .FieldsCalculator import FieldsCalculator
from .FieldsMapper import FieldsMapper
from .FindProjection import FindProjection
from .GeometryConvert import GeometryConvert
from .Heatmap import Heatmap
@@ -117,7 +116,6 @@ def getAlgs(self):
ExecuteSQL(),
ExportGeometryInfo(),
FieldsCalculator(),
FieldsMapper(),
FieldsPyculator(),
FindProjection(),
GeometryConvert(),
@@ -52,7 +52,6 @@

from processing.gui.wrappers import WidgetWrapper, DIALOG_STANDARD, DIALOG_MODELER
from processing.tools import dataobjects
from processing.algs.qgis.FieldsMapper import FieldsMapper


pluginPath = os.path.dirname(__file__)
@@ -192,9 +191,9 @@ def createWidget(self):
if self.dialogType == DIALOG_MODELER:
self.combobox = QComboBox()
self.combobox.addItem(QCoreApplication.translate('Processing', '[Preconfigure]'), None)
fieldsMappingInputs = self.dialog.getAvailableValuesOfType(FieldsMapper.ParameterFieldsMapping)
for input in fieldsMappingInputs:
self.combobox.addItem(self.dialog.resolveValueDescription(input), input)
#fieldsMappingInputs = self.dialog.getAvailableValuesOfType(FieldsMapper.ParameterFieldsMapping)
#for input in fieldsMappingInputs:
# self.combobox.addItem(self.dialog.resolveValueDescription(input), input)

def updatePanelEnabledState():
if self.combobox.currentData() is None:
@@ -128,6 +128,7 @@ SET(QGIS_ANALYSIS_SRCS
processing/qgsalgorithmrasterzonalstats.cpp
processing/qgsalgorithmreclassifybylayer.cpp
processing/qgsalgorithmrectanglesovalsdiamonds.cpp
processing/qgsalgorithmrefactorfields.cpp
processing/qgsalgorithmremoveduplicatesbyattribute.cpp
processing/qgsalgorithmremoveduplicatevertices.cpp
processing/qgsalgorithmremoveholes.cpp

0 comments on commit dbe9aa0

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