Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a test for VoronoiPolygon.py that covers some new cases
(cherry-picked from 4b1bc82)
- Loading branch information
1 parent
acbb27c
commit 2b6ef28
Showing
3 changed files
with
112 additions
and
0 deletions.
There are no files selected for viewing
50 changes: 50 additions & 0 deletions
50
python/plugins/processing/tests/testdata/expected/pointsvoronoi1diagram.gml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,50 @@ | |||
<?xml version="1.0" encoding="utf-8" ?> | |||
<ogr:FeatureCollection | |||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xsi:schemaLocation="http://ogr.maptools.org/ pointsvoronoi1diagram.xsd" | |||
xmlns:ogr="http://ogr.maptools.org/" | |||
xmlns:gml="http://www.opengis.net/gml"> | |||
<gml:boundedBy> | |||
<gml:Box> | |||
<gml:coord><gml:X>-0.6</gml:X><gml:Y>51.4</gml:Y></gml:coord> | |||
<gml:coord><gml:X>0.2000000000000001</gml:X><gml:Y>51.6</gml:Y></gml:coord> | |||
</gml:Box> | |||
</gml:boundedBy> | |||
|
|||
<gml:featureMember> | |||
<ogr:pointsvoronoi1diagram fid="pointsvoronoi1.5"> | |||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-0.6,51.4 -0.6,51.5 -0.5,51.5 -0.5,51.4 -0.6,51.4</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | |||
<ogr:id>10</ogr:id> | |||
</ogr:pointsvoronoi1diagram> | |||
</gml:featureMember> | |||
<gml:featureMember> | |||
<ogr:pointsvoronoi1diagram fid="pointsvoronoi1.2"> | |||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-0.5,51.5 -0.5,51.6 -0.275,51.6 -0.325,51.5 -0.5,51.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | |||
<ogr:id>7</ogr:id> | |||
</ogr:pointsvoronoi1diagram> | |||
</gml:featureMember> | |||
<gml:featureMember> | |||
<ogr:pointsvoronoi1diagram fid="pointsvoronoi1.3"> | |||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-0.5,51.4 -0.5,51.5 -0.325,51.5 -0.275,51.4 -0.5,51.4</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | |||
<ogr:id>8</ogr:id> | |||
</ogr:pointsvoronoi1diagram> | |||
</gml:featureMember> | |||
<gml:featureMember> | |||
<ogr:pointsvoronoi1diagram fid="pointsvoronoi1.0"> | |||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-0.275,51.4 -0.325,51.5 -0.275,51.6 0.0,51.6 0.0,51.4 -0.275,51.4</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | |||
<ogr:id>1</ogr:id> | |||
</ogr:pointsvoronoi1diagram> | |||
</gml:featureMember> | |||
<gml:featureMember> | |||
<ogr:pointsvoronoi1diagram fid="pointsvoronoi1.1"> | |||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0.0,51.4 0.0,51.6 0.2,51.6 0.2,51.4 0.0,51.4</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | |||
<ogr:id>2</ogr:id> | |||
</ogr:pointsvoronoi1diagram> | |||
</gml:featureMember> | |||
<gml:featureMember> | |||
<ogr:pointsvoronoi1diagram fid="pointsvoronoi1.4"> | |||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-0.6,51.5 -0.6,51.6 -0.5,51.6 -0.5,51.5 -0.6,51.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | |||
<ogr:id>9</ogr:id> | |||
</ogr:pointsvoronoi1diagram> | |||
</gml:featureMember> | |||
</ogr:FeatureCollection> |
50 changes: 50 additions & 0 deletions
50
python/plugins/processing/tests/testdata/pointsvoronoi1.gml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,50 @@ | |||
<?xml version="1.0" encoding="utf-8" ?> | |||
<ogr:FeatureCollection | |||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |||
xsi:schemaLocation="http://ogr.maptools.org/ pointsvoronoi1.xsd" | |||
xmlns:ogr="http://ogr.maptools.org/" | |||
xmlns:gml="http://www.opengis.net/gml"> | |||
<gml:boundedBy> | |||
<gml:Box> | |||
<gml:coord><gml:X>-0.6</gml:X><gml:Y>51.4</gml:Y></gml:coord> | |||
<gml:coord><gml:X>0.2</gml:X><gml:Y>51.6</gml:Y></gml:coord> | |||
</gml:Box> | |||
</gml:boundedBy> | |||
|
|||
<gml:featureMember> | |||
<ogr:pointsvoronoi1 fid="pointsvoronoi1.0"> | |||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>-0.2,51.5</gml:coordinates></gml:Point></ogr:geometryProperty> | |||
<ogr:id>1</ogr:id> | |||
</ogr:pointsvoronoi1> | |||
</gml:featureMember> | |||
<gml:featureMember> | |||
<ogr:pointsvoronoi1 fid="pointsvoronoi1.1"> | |||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>0.2,51.5</gml:coordinates></gml:Point></ogr:geometryProperty> | |||
<ogr:id>2</ogr:id> | |||
</ogr:pointsvoronoi1> | |||
</gml:featureMember> | |||
<gml:featureMember> | |||
<ogr:pointsvoronoi1 fid="pointsvoronoi1.2"> | |||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>-0.4,51.6</gml:coordinates></gml:Point></ogr:geometryProperty> | |||
<ogr:id>7</ogr:id> | |||
</ogr:pointsvoronoi1> | |||
</gml:featureMember> | |||
<gml:featureMember> | |||
<ogr:pointsvoronoi1 fid="pointsvoronoi1.3"> | |||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>-0.4,51.4</gml:coordinates></gml:Point></ogr:geometryProperty> | |||
<ogr:id>8</ogr:id> | |||
</ogr:pointsvoronoi1> | |||
</gml:featureMember> | |||
<gml:featureMember> | |||
<ogr:pointsvoronoi1 fid="pointsvoronoi1.4"> | |||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>-0.6,51.6</gml:coordinates></gml:Point></ogr:geometryProperty> | |||
<ogr:id>9</ogr:id> | |||
</ogr:pointsvoronoi1> | |||
</gml:featureMember> | |||
<gml:featureMember> | |||
<ogr:pointsvoronoi1 fid="pointsvoronoi1.5"> | |||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>-0.6,51.4</gml:coordinates></gml:Point></ogr:geometryProperty> | |||
<ogr:id>10</ogr:id> | |||
</ogr:pointsvoronoi1> | |||
</gml:featureMember> | |||
</ogr:FeatureCollection> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters