Skip to content

Commit

Permalink
[processing] port sum line length algorithm to C++
Browse files Browse the repository at this point in the history
  • Loading branch information
alexbruy committed Dec 9, 2019
1 parent eeaffb9 commit 9615306
Show file tree
Hide file tree
Showing 8 changed files with 291 additions and 176 deletions.
5 changes: 0 additions & 5 deletions python/plugins/processing/algs/help/qgis.yaml
Expand Up @@ -438,11 +438,6 @@ qgis:splitvectorlayer: >
qgis:statisticsbycategories: >
This algorithm calculates statistics of fields depending on a parent class.

qgis:sumlinelengths: >
This algorithm takes a polygon layer and a line layer and measures the total length of lines and the total number of them that cross each polygon.

The resulting layer has the same features as the input polygon layer, but with two additional attributes containing the length and count of the lines across each polygon. The names of these two fields can be configured in the algorithm parameters.

qgis:texttofloat: >
This algorithm modifies the type of a given attribute in a vector layer, converting a text attribute containing numeric strings into a numeric attribute.

Expand Down
2 changes: 0 additions & 2 deletions python/plugins/processing/algs/qgis/QgisAlgorithmProvider.py
Expand Up @@ -98,7 +98,6 @@
from .SpatialJoin import SpatialJoin
from .SpatialJoinSummary import SpatialJoinSummary
from .StatisticsByCategories import StatisticsByCategories
from .SumLines import SumLines
from .TextToFloat import TextToFloat
from .TilesXYZ import TilesXYZAlgorithmDirectory, TilesXYZAlgorithmMBTiles
from .TinInterpolation import TinInterpolation
Expand Down Expand Up @@ -193,7 +192,6 @@ def getAlgs(self):
SpatialJoin(),
SpatialJoinSummary(),
StatisticsByCategories(),
SumLines(),
TextToFloat(),
TilesXYZAlgorithmDirectory(),
TilesXYZAlgorithmMBTiles(),
Expand Down
168 changes: 0 additions & 168 deletions python/plugins/processing/algs/qgis/SumLines.py

This file was deleted.

Expand Up @@ -1794,7 +1794,7 @@ tests:
name: expected/line_intersection_collection.gml
type: vector

- algorithm: qgis:sumlinelengths
- algorithm: native:sumlinelengths
name: Sum line lengths
params:
COUNT_FIELD: line_count
Expand Down
1 change: 1 addition & 0 deletions src/analysis/CMakeLists.txt
Expand Up @@ -133,6 +133,7 @@ SET(QGIS_ANALYSIS_SRCS
processing/qgsalgorithmstringconcatenation.cpp
processing/qgsalgorithmswapxy.cpp
processing/qgsalgorithmsubdivide.cpp
processing/qgsalgorithmsumlinelength.cpp
processing/qgsalgorithmsymmetricaldifference.cpp
processing/qgsalgorithmtaperedbuffer.cpp
processing/qgsalgorithmtransect.cpp
Expand Down

0 comments on commit 9615306

Please sign in to comment.