Skip to content

Commit

Permalink
Merge pull request #33794 from alexbruy/rectangles-ovals-diamonds
Browse files Browse the repository at this point in the history
[processing][needs-docs] port Rectangle,ovals,diamonds algorithm to C++
  • Loading branch information
alexbruy committed Jan 16, 2020
2 parents 10cbf59 + 2fd44b3 commit fe7085d
Show file tree
Hide file tree
Showing 8 changed files with 322 additions and 281 deletions.
3 changes: 1 addition & 2 deletions python/plugins/processing/algs/qgis/QgisAlgorithmProvider.py
Expand Up @@ -75,7 +75,6 @@
from .RasterCalculator import RasterCalculator
from .RasterLayerHistogram import RasterLayerHistogram
from .RasterSampling import RasterSampling
from .RectanglesOvalsDiamondsFixed import RectanglesOvalsDiamondsFixed
from .RectanglesOvalsDiamondsVariable import RectanglesOvalsDiamondsVariable
from .RegularPoints import RegularPoints
from .Relief import Relief
Expand Down Expand Up @@ -107,6 +106,7 @@ def __init__(self):
super().__init__()
self.algs = []
self.externalAlgs = []
QgsApplication.processingRegistry().addAlgorithmAlias('qgis:rectanglesovalsdiamondsfixed', 'native:rectanglesovalsdiamonds')

def getAlgs(self):
algs = [Aggregate(),
Expand Down Expand Up @@ -156,7 +156,6 @@ def getAlgs(self):
RasterCalculator(),
RasterLayerHistogram(),
RasterSampling(),
RectanglesOvalsDiamondsFixed(),
RectanglesOvalsDiamondsVariable(),
RegularPoints(),
Relief(),
Expand Down
262 changes: 0 additions & 262 deletions python/plugins/processing/algs/qgis/RectanglesOvalsDiamondsFixed.py

This file was deleted.

Expand Up @@ -32,6 +32,7 @@
QgsPointXY,
QgsProcessing,
QgsProcessingException,
QgsProcessingAlgorithm,
QgsProcessingParameterField,
QgsProcessingParameterFeatureSource,
QgsProcessingParameterEnum,
Expand Down Expand Up @@ -60,6 +61,9 @@ def groupId(self):
def __init__(self):
super().__init__()

def flags(self):
return super().flags() | QgsProcessingAlgorithm.FlagDeprecated

def initAlgorithm(self, config=None):
self.shapes = [self.tr('Rectangles'), self.tr('Diamonds'), self.tr('Ovals')]

Expand Down
Expand Up @@ -637,7 +637,7 @@ tests:
intval: skip
floatval: skip

- algorithm: qgis:rectanglesovalsdiamondsfixed
- algorithm: native:rectanglesovalsdiamonds
name: Create fixed distance rectangle buffers around points
params:
HEIGHT: 0.25
Expand All @@ -656,22 +656,6 @@ tests:
geometry:
precision: 7

- algorithm: qgis:rectanglesovalsdiamondsvariable
name: Rectangles ovals diamonds variable
params:
HEIGHT: id
INPUT:
name: points.gml
type: vector
ROTATION: id2
SEGMENTS: 1
SHAPE: 0
WIDTH: id
results:
OUTPUT:
name: expected/rectanglesovalsdiamondsvariable.gml
type: vector

- algorithm: native:mergelines
name: Merge lines algorithm
params:
Expand Down
1 change: 1 addition & 0 deletions src/analysis/CMakeLists.txt
Expand Up @@ -116,6 +116,7 @@ SET(QGIS_ANALYSIS_SRCS
processing/qgsalgorithmrastersurfacevolume.cpp
processing/qgsalgorithmrasterzonalstats.cpp
processing/qgsalgorithmreclassifybylayer.cpp
processing/qgsalgorithmrectanglesovalsdiamonds.cpp
processing/qgsalgorithmremoveduplicatesbyattribute.cpp
processing/qgsalgorithmremoveduplicatevertices.cpp
processing/qgsalgorithmremoveholes.cpp
Expand Down

0 comments on commit fe7085d

Please sign in to comment.