Skip to content

Commit

Permalink
Merge pull request #5184 from nyalldawson/join_locate
Browse files Browse the repository at this point in the history
[FEATURE] Reworked processing 'Join by location' alg
  • Loading branch information
nyalldawson committed Sep 13, 2017
2 parents d084cc6 + be88da8 commit c371b72
Show file tree
Hide file tree
Showing 35 changed files with 2,854 additions and 191 deletions.
8 changes: 7 additions & 1 deletion python/plugins/processing/algs/help/qgis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,18 @@ qgis:joinattributesbylocation: >

The additional attributes and their values are taken from a second vector layer. A spatial criteria is applied to select the values from the second layer that are added to each feature from the first layer in the resulting one.


qgis:joinattributestable: >
This algorithm takes an input vector layer and creates a new vector layer that is an extended version of the input one, with additional attributes in its attribute table.

The additional attributes and their values are taken from a second vector layer. An attribute is selected in each of them to define the join criteria.

qgis:joinbylocationsummary: >
This algorithm takes an input vector layer and creates a new vector layer that is an extended version of the input one, with additional attributes in its attribute table.

The additional attributes and their values are taken from a second vector layer. A spatial criteria is applied to select the values from the second layer that are added to each feature from the first layer in the resulting one.

The algorithm calculates a statistical summary for the values from matching features in the second layer (e.g. maximum value, mean value, etc).

qgis:keepnbiggestparts: >
This algorithm takes a polygon layer and creates a new polygon layer in which multipart geometries have been removed, leaving only the n largest (in terms of area) parts.

Expand Down
8 changes: 4 additions & 4 deletions python/plugins/processing/algs/qgis/QGISAlgorithmProvider.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,8 @@
from .SnapGeometries import SnapGeometriesToLayer
from .SpatialiteExecuteSQL import SpatialiteExecuteSQL
from .SpatialIndex import SpatialIndex
from .SpatialJoin import SpatialJoin
from .SpatialJoinSummary import SpatialJoinSummary
from .SplitWithLines import SplitWithLines
from .StatisticsByCategories import StatisticsByCategories
from .SumLines import SumLines
Expand All @@ -166,7 +168,6 @@
from .VoronoiPolygons import VoronoiPolygons
from .ZonalStatistics import ZonalStatistics

# from .SpatialJoin import SpatialJoin

pluginPath = os.path.normpath(os.path.join(
os.path.split(os.path.dirname(__file__))[0], os.pardir))
Expand All @@ -180,9 +181,6 @@ def __init__(self):
self.externalAlgs = []

def getAlgs(self):
# algs = [
# SpatialJoin(),
# ]
algs = [AddTableField(),
Aggregate(),
Aspect(),
Expand Down Expand Up @@ -293,6 +291,8 @@ def getAlgs(self):
SnapGeometriesToLayer(),
SpatialiteExecuteSQL(),
SpatialIndex(),
SpatialJoin(),
SpatialJoinSummary(),
SplitWithLines(),
StatisticsByCategories(),
SumLines(),
Expand Down
Loading

0 comments on commit c371b72

Please sign in to comment.