Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Port Difference & Sym.Diff. to C++, cleanups and tests
  • Loading branch information
wonder-sk committed Apr 24, 2018
1 parent 120d5b1 commit d2513e0
Show file tree
Hide file tree
Showing 21 changed files with 858 additions and 296 deletions.
9 changes: 0 additions & 9 deletions python/plugins/processing/algs/help/qgis.yaml
Expand Up @@ -135,11 +135,6 @@ qgis:densifygeometriesgivenaninterval: >

The distance is expressed in the same units used by the layer CRS.

qgis:difference: >
This algorithm extracts features from the Input layer that fall outside, or partially overlap, features in the Difference layer. Input layer features that partially overlap the difference layer feature(s) are split along the boundary of the difference layer feature(s) and only the portions outside the difference layer features are retained.

Attributes are not modified.

qgis:dissolve: >
This algorithm takes a polygon or line vector layer and combines their geometries into new geometries. One or more attributes can be specified to dissolve only geometries belonging to the same class (having the same value for the specified attributes), alternatively all geometries can be dissolved.

Expand Down Expand Up @@ -511,10 +506,6 @@ qgis:sumlinelengths: >

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:symmetricaldifference: >
This algorithm creates a layer containing features from both the Input and Difference layers but with the overlapping areas between the two layers removed. The attribute table of the Symmetrical Difference layer contains attributes from both the Input and Difference layers.


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
121 changes: 0 additions & 121 deletions python/plugins/processing/algs/qgis/Difference.py

This file was deleted.

4 changes: 0 additions & 4 deletions python/plugins/processing/algs/qgis/QgisAlgorithmProvider.py
Expand Up @@ -57,7 +57,6 @@
from .DeleteDuplicateGeometries import DeleteDuplicateGeometries
from .DensifyGeometries import DensifyGeometries
from .DensifyGeometriesInterval import DensifyGeometriesInterval
from .Difference import Difference
from .EliminateSelection import EliminateSelection
from .ExecuteSQL import ExecuteSQL
from .ExportGeometryInfo import ExportGeometryInfo
Expand Down Expand Up @@ -134,7 +133,6 @@
from .SpatialJoinSummary import SpatialJoinSummary
from .StatisticsByCategories import StatisticsByCategories
from .SumLines import SumLines
from .SymmetricalDifference import SymmetricalDifference
from .TextToFloat import TextToFloat
from .TinInterpolation import TinInterpolation
from .TopoColors import TopoColor
Expand Down Expand Up @@ -175,7 +173,6 @@ def getAlgs(self):
DeleteDuplicateGeometries(),
DensifyGeometries(),
DensifyGeometriesInterval(),
Difference(),
EliminateSelection(),
ExecuteSQL(),
ExportGeometryInfo(),
Expand Down Expand Up @@ -252,7 +249,6 @@ def getAlgs(self):
SpatialJoinSummary(),
StatisticsByCategories(),
SumLines(),
SymmetricalDifference(),
TextToFloat(),
TinInterpolation(),
TopoColor(),
Expand Down
162 changes: 0 additions & 162 deletions python/plugins/processing/algs/qgis/SymmetricalDifference.py

This file was deleted.

@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ogr.maptools.org/ difference1_a_b.xsd"
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>1</gml:X><gml:Y>3</gml:Y></gml:coord>
<gml:coord><gml:X>9</gml:X><gml:Y>11</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>

<gml:featureMember>
<ogr:difference1_a_b fid="difference1_a_b.0">
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:3857"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2,5 2,3 1,3 1,5 2,5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1,6 1,11 8,11 8,10 2,10 2,6 1,6</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
<ogr:id_a>A1</ogr:id_a>
</ogr:difference1_a_b>
</gml:featureMember>
<gml:featureMember>
<ogr:difference1_a_b fid="difference1_a_b.1">
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:3857"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3,3 3,4 4,4 4,3 3,3</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
<ogr:id_a>A4</ogr:id_a>
</ogr:difference1_a_b>
</gml:featureMember>
<gml:featureMember>
<ogr:difference1_a_b fid="difference1_a_b.2">
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:3857"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4,6 6,6 6,5 4,5 4,6</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
<ogr:id_a>A2</ogr:id_a>
</ogr:difference1_a_b>
</gml:featureMember>
<gml:featureMember>
<ogr:difference1_a_b fid="difference1_a_b.3">
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:3857"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>7,7 6,7 6,8 7,8 7,7</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>8,8 9,8 9,7 8,7 8,8</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
<ogr:id_a>A3</ogr:id_a>
</ogr:difference1_a_b>
</gml:featureMember>
</ogr:FeatureCollection>

0 comments on commit d2513e0

Please sign in to comment.