Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Added a test for VoronoiPolygon.py that covers some new cases
- Loading branch information
Showing
with
112 additions
and 0 deletions.
@@ -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> |
@@ -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> |