Skip to content
Permalink
Browse files

Merge pull request #5131 from nyalldawson/location_algs

Rework Select by Location algorithm
  • Loading branch information
nyalldawson committed Sep 11, 2017
2 parents 7f5bd00 + 02e8f1e commit a6506810611c02eedc8e078b6ec43bb9d51fe52a
Showing with 680 additions and 417 deletions.
  1. +6 −0 python/core/qgsfeaturesource.sip
  2. +0 −6 python/core/qgsvectorlayer.sip
  3. +0 −7 python/plugins/processing/algs/help/qgis.yaml
  4. +0 −141 python/plugins/processing/algs/qgis/ExtractByLocation.py
  5. +0 −4 python/plugins/processing/algs/qgis/QGISAlgorithmProvider.py
  6. +0 −156 python/plugins/processing/algs/qgis/SelectByLocation.py
  7. +1 −1 python/plugins/processing/algs/qgis/SetRasterStyle.py
  8. +1 −1 python/plugins/processing/algs/qgis/SetVectorStyle.py
  9. +2 −8 python/plugins/processing/algs/qgis/SpatialJoin.py
  10. +4 −1 python/plugins/processing/gui/TestTools.py
  11. +32 −0 python/plugins/processing/tests/testdata/expected/extract_by_location_contains.gfs
  12. +30 −0 python/plugins/processing/tests/testdata/expected/extract_by_location_contains.gml
  13. +26 −0 python/plugins/processing/tests/testdata/expected/extract_by_location_disjoint.gfs
  14. +35 −0 python/plugins/processing/tests/testdata/expected/extract_by_location_disjoint.gml
  15. +7 −7 python/plugins/processing/tests/testdata/expected/extract_by_location_intersection.gml
  16. +26 −0 python/plugins/processing/tests/testdata/expected/extract_by_location_touches.gfs
  17. +42 −0 python/plugins/processing/tests/testdata/expected/extract_by_location_touches.gml
  18. +0 −10 python/plugins/processing/tests/testdata/expected/extract_by_location_within.gfs
  19. +2 −6 python/plugins/processing/tests/testdata/expected/extract_by_location_within.gml
  20. +85 −32 python/plugins/processing/tests/testdata/qgis_algorithm_tests.yaml
  21. +0 −16 python/plugins/processing/tools/vector.py
  22. +275 −1 src/core/processing/qgsnativealgorithms.cpp
  23. +74 −0 src/core/processing/qgsnativealgorithms.h
  24. +17 −0 src/core/qgsfeaturesource.cpp
  25. +5 −0 src/core/qgsfeaturesource.h
  26. +0 −17 src/core/qgsvectorlayer.cpp
  27. +0 −3 src/core/qgsvectorlayer.h
  28. +4 −0 tests/src/python/featuresourcetestbase.py
  29. +6 −0 tests/src/python/test_qgsvectorlayercache.py
@@ -114,6 +114,12 @@ class QgsFeatureSource
:rtype: QgsRectangle
%End

virtual QgsFeatureIds allFeatureIds() const;
%Docstring
Returns a list of all feature IDs for features present in the source.
:rtype: QgsFeatureIds
%End

};


@@ -576,12 +576,6 @@ Select not selected features and deselect selected ones
Select all the features
%End

QgsFeatureIds allFeatureIds() const;
%Docstring
Get all feature Ids
:rtype: QgsFeatureIds
%End

void invertSelectionInRectangle( QgsRectangle &rect );
%Docstring
Invert selection of features found within the search rectangle (in layer's coordinates)
@@ -189,9 +189,6 @@ qgis:extractbyexpression: >

For more information about expressions see the <a href ="{qgisdocs}/user_manual/working_with_vector/expression.html">user manual</a>

qgis:extractbylocation: >
This algorithm creates a new vector layer that only contains matching features from an input layer. The criteria for adding features to the resulting layer is defined based on the spatial relationship between each feature and the features in an additional layer.

qgis:extractnodes: >
This algorithm takes a line or polygon layer and generates a point layer with points representing the nodes in the input lines or polygons. The attributes associated to each point are the same ones associated to the line or polygon that the point belongs to.

@@ -519,10 +516,6 @@ qgis:selectbyexpression: >

For more information about expressions see the <a href ="{qgisdocs}/user_manual/working_with_vector/expression.html">user manual</a>


qgis:selectbylocation: >
This algorithm creates a selection in a vector layer. The criteria for selecting features is based on the spatial relationship between each feature and the features in an additional layer.

qgis:setmvalue: >
This algorithm sets the M value for geometries in a layer.

This file was deleted.

@@ -166,8 +166,6 @@
from .VoronoiPolygons import VoronoiPolygons
from .ZonalStatistics import ZonalStatistics

# from .ExtractByLocation import ExtractByLocation
# from .SelectByLocation import SelectByLocation
# from .SpatialJoin import SpatialJoin

pluginPath = os.path.normpath(os.path.join(
@@ -183,8 +181,6 @@ def __init__(self):

def getAlgs(self):
# algs = [
# SelectByLocation(),
# ExtractByLocation(),
# SpatialJoin(),
# ]
algs = [AddTableField(),

This file was deleted.

@@ -2,7 +2,7 @@

"""
***************************************************************************
SelectByLocation.py
SetRasterStyle.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
@@ -2,7 +2,7 @@

"""
***************************************************************************
SelectByLocation.py
SetVectorStyle.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya

0 comments on commit a650681

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