Convex Hull processing tests (#3876)

Add two tests for convex hull
This commit is contained in:
Matteo Ghetta 2016-12-19 10:51:13 +01:00 committed by Matthias Kuhn
parent 4ecad0a17f
commit 2abeea1128
12 changed files with 521 additions and 0 deletions

View File

@ -0,0 +1,20 @@
<GMLFeatureClassList>
<GMLFeatureClass>
<Name>count_unique_points</Name>
<ElementPath>count_unique_points</ElementPath>
<GeometryType>1</GeometryType>
<SRSName>EPSG:4326</SRSName>
<DatasetSpecificInfo>
<FeatureCount>26</FeatureCount>
<ExtentXMin>-0.18351</ExtentXMin>
<ExtentXMax>9.58625</ExtentXMax>
<ExtentYMin>-2.40588</ExtentYMin>
<ExtentYMax>5.73133</ExtentYMax>
</DatasetSpecificInfo>
<PropertyDefn>
<Name>unique</Name>
<ElementPath>unique</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
</GMLFeatureClass>
</GMLFeatureClassList>

View File

@ -0,0 +1,169 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=""
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>-0.1835059209628658</gml:X><gml:Y>-2.405884426380911</gml:Y></gml:coord>
<gml:coord><gml:X>9.586251045346421</gml:X><gml:Y>5.731328294905413</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>-0.183505920962866,2.287680278060103</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>10</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.1">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>1.372512812574644,1.496916659377106</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>10</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.2">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>0.607257697720131,-0.084610577988888</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>5</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.3">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>0.071579117321972,0.629627529208658</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>10</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.4">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2.41836146954248,2.542765316344942</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>6</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.5">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2.545903988684898,3.639630980969744</gml:coordinates></gml:Point></ogr:geometryProperty>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.6">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2.290818950400061,5.654802783419962</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>2</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.7">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2.698955011655801,5.731328294905413</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>2</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.8">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2.520395484856414,5.246666722164222</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>1</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.9">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>4.561075791135116,4.277343576681838</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>1</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.10">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>4.943703348562373,4.481411607309709</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>2</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.11">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2.928531546112155,1.190814613435302</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>5</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.12">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>4.050905714565441,0.910221071321979</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>5</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.13">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>4.841669333248438,0.195982964124434</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>5</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.14">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>4.892686340905406,-1.206984746442174</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>3</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.15">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>3.821329180109087,-1.155967738785206</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>5</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.16">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>3.821329180109087,-0.390712623930693</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>2</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.17">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>3.260142095882444,0.042931941153531</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>5</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.18">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2.954040049940638,-0.77334018135795</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>5</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.19">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>6.958875151012592,0.527593513894724</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>1</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.20">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>8.030232311808911,0.527593513894724</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>7</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.21">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>9.076080968776745,0.349033987095337</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>6</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.22">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>9.586251045346421,-1.58961230386943</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>5</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.23">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>8.336334357750715,-1.462069784727012</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>4</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.24">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>8.23430034243678,-2.405884426380911</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>3</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
<gml:featureMember>
<ogr:count_unique_points fid="count_unique_points.25">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>6.831332631870172,-1.997748365125171</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:unique>2</ogr:unique>
</ogr:count_unique_points>
</gml:featureMember>
</ogr:FeatureCollection>

View File

@ -0,0 +1,30 @@
<GMLFeatureClassList>
<GMLFeatureClass>
<Name>points_hull</Name>
<ElementPath>points_hull</ElementPath>
<GeometryType>1</GeometryType>
<SRSName>EPSG:4326</SRSName>
<DatasetSpecificInfo>
<FeatureCount>9</FeatureCount>
<ExtentXMin>0.00000</ExtentXMin>
<ExtentXMax>8.00000</ExtentXMax>
<ExtentYMin>-5.00000</ExtentYMin>
<ExtentYMax>3.00000</ExtentYMax>
</DatasetSpecificInfo>
<PropertyDefn>
<Name>id</Name>
<ElementPath>id</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
<PropertyDefn>
<Name>id2</Name>
<ElementPath>id2</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
<PropertyDefn>
<Name>hull</Name>
<ElementPath>hull</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
</GMLFeatureClass>
</GMLFeatureClassList>

View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=""
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>0</gml:X><gml:Y>-5</gml:Y></gml:coord>
<gml:coord><gml:X>8</gml:X><gml:Y>3</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ogr:points_hull fid="points.0">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>1,1</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>1</ogr:id>
<ogr:id2>2</ogr:id2>
<ogr:hull>2</ogr:hull>
</ogr:points_hull>
</gml:featureMember>
<gml:featureMember>
<ogr:points_hull fid="points.1">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>3,3</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>2</ogr:id>
<ogr:id2>1</ogr:id2>
<ogr:hull>3</ogr:hull>
</ogr:points_hull>
</gml:featureMember>
<gml:featureMember>
<ogr:points_hull fid="points.2">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2,2</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>3</ogr:id>
<ogr:id2>0</ogr:id2>
<ogr:hull>3</ogr:hull>
</ogr:points_hull>
</gml:featureMember>
<gml:featureMember>
<ogr:points_hull fid="points.3">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>5,2</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>4</ogr:id>
<ogr:id2>2</ogr:id2>
<ogr:hull>3</ogr:hull>
</ogr:points_hull>
</gml:featureMember>
<gml:featureMember>
<ogr:points_hull fid="points.4">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>4,1</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>5</ogr:id>
<ogr:id2>1</ogr:id2>
<ogr:hull>2</ogr:hull>
</ogr:points_hull>
</gml:featureMember>
<gml:featureMember>
<ogr:points_hull fid="points.5">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>0,-5</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>6</ogr:id>
<ogr:id2>0</ogr:id2>
<ogr:hull>1</ogr:hull>
</ogr:points_hull>
</gml:featureMember>
<gml:featureMember>
<ogr:points_hull fid="points.6">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>8,-1</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>7</ogr:id>
<ogr:id2>0</ogr:id2>
<ogr:hull>2</ogr:hull>
</ogr:points_hull>
</gml:featureMember>
<gml:featureMember>
<ogr:points_hull fid="points.7">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>7,-1</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>8</ogr:id>
<ogr:id2>0</ogr:id2>
<ogr:hull>1</ogr:hull>
</ogr:points_hull>
</gml:featureMember>
<gml:featureMember>
<ogr:points_hull fid="points.8">
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>0,-1</gml:coordinates></gml:Point></ogr:geometryProperty>
<ogr:id>9</ogr:id>
<ogr:id2>0</ogr:id2>
<ogr:hull>1</ogr:hull>
</ogr:points_hull>
</gml:featureMember>
</ogr:FeatureCollection>

View File

@ -0,0 +1,21 @@
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body>
<p>Analyzed layer: polys</p>
<p>Analyzed field: floatval</p>
<p>Count: 5</p>
<p>Unique values: 5</p>
<p>NULL (missing) values: 1</p>
<p>Minimum value: -100291.43213</p>
<p>Maximum value: 44.123456</p>
<p>Range: 100335.555586</p>
<p>Sum: -100243.855674</p>
<p>Mean value: -20048.7711348</p>
<p>Median value: 0.123</p>
<p>Standard deviation: 40121.333967334256</p>
<p>Coefficient of Variation: -2.001186691073198</p>
<p>Minority (rarest occurring value): -100291.43213</p>
<p>Majority (most frequently occurring value): -100291.43213</p>
<p>First quartile: 0.0</p>
<p>Third quartile: 3.33</p>
<p>Interquartile Range (IQR): 3.33</p>
</body></html>

View File

@ -0,0 +1,21 @@
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /></head><body>
<p>Analyzed layer: polys</p>
<p>Analyzed field: intval</p>
<p>Count: 5</p>
<p>Unique values: 5</p>
<p>NULL (missing) values: 1</p>
<p>Minimum value: -33.0</p>
<p>Maximum value: 120.0</p>
<p>Range: 153.0</p>
<p>Sum: 122.0</p>
<p>Mean value: 24.4</p>
<p>Median value: 2.0</p>
<p>Standard deviation: 52.163588833591575</p>
<p>Coefficient of Variation: 2.137852001376704</p>
<p>Minority (rarest occurring value): -33.0</p>
<p>Majority (most frequently occurring value): -33.0</p>
<p>First quartile: 0.0</p>
<p>Third quartile: 33.0</p>
<p>Interquartile Range (IQR): 33.0</p>
</body></html>

View File

@ -0,0 +1,36 @@
<GMLFeatureClassList>
<GMLFeatureClass>
<Name>convex_hull</Name>
<ElementPath>convex_hull</ElementPath>
<GeometryType>3</GeometryType>
<SRSName>EPSG:4326</SRSName>
<DatasetSpecificInfo>
<FeatureCount>1</FeatureCount>
<ExtentXMin>0.00000</ExtentXMin>
<ExtentXMax>8.00000</ExtentXMax>
<ExtentYMin>-5.00000</ExtentYMin>
<ExtentYMax>3.00000</ExtentYMax>
</DatasetSpecificInfo>
<PropertyDefn>
<Name>id</Name>
<ElementPath>id</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
<PropertyDefn>
<Name>value</Name>
<ElementPath>value</ElementPath>
<Type>String</Type>
<Width>3</Width>
</PropertyDefn>
<PropertyDefn>
<Name>area</Name>
<ElementPath>area</ElementPath>
<Type>Real</Type>
</PropertyDefn>
<PropertyDefn>
<Name>perim</Name>
<ElementPath>perim</ElementPath>
<Type>Real</Type>
</PropertyDefn>
</GMLFeatureClass>
</GMLFeatureClassList>

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=""
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>0</gml:X><gml:Y>-5</gml:Y></gml:coord>
<gml:coord><gml:X>8</gml:X><gml:Y>3</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ogr:convex_hull fid="convex_hull.0">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,-5 0,-1 1,1 3,3 5,2 8,-1 0,-5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:id>0</ogr:id>
<ogr:value>all</ogr:value>
<ogr:area>34.500000</ogr:area>
<ogr:perim>24.487476</ogr:perim>
</ogr:convex_hull>
</gml:featureMember>
</ogr:FeatureCollection>

View File

@ -0,0 +1,35 @@
<GMLFeatureClassList>
<GMLFeatureClass>
<Name>convex_hull_fields</Name>
<ElementPath>convex_hull_fields</ElementPath>
<GeometryType>3</GeometryType>
<SRSName>EPSG:4326</SRSName>
<DatasetSpecificInfo>
<FeatureCount>3</FeatureCount>
<ExtentXMin>0.00000</ExtentXMin>
<ExtentXMax>8.00000</ExtentXMax>
<ExtentYMin>-5.00000</ExtentYMin>
<ExtentYMax>3.00000</ExtentYMax>
</DatasetSpecificInfo>
<PropertyDefn>
<Name>id</Name>
<ElementPath>id</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
<PropertyDefn>
<Name>value</Name>
<ElementPath>value</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
<PropertyDefn>
<Name>area</Name>
<ElementPath>area</ElementPath>
<Type>Real</Type>
</PropertyDefn>
<PropertyDefn>
<Name>perim</Name>
<ElementPath>perim</ElementPath>
<Type>Real</Type>
</PropertyDefn>
</GMLFeatureClass>
</GMLFeatureClassList>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=""
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>0</gml:X><gml:Y>-5</gml:Y></gml:coord>
<gml:coord><gml:X>8</gml:X><gml:Y>3</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ogr:convex_hull_fields fid="convex_hull_fields.0">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,-5 0,-1 7,-1 0,-5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:id>0</ogr:id>
<ogr:value>1</ogr:value>
<ogr:area>14.000000</ogr:area>
<ogr:perim>19.062258</ogr:perim>
</ogr:convex_hull_fields>
</gml:featureMember>
<gml:featureMember>
<ogr:convex_hull_fields fid="convex_hull_fields.1">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>8,-1 1,1 4,1 8,-1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:id>1</ogr:id>
<ogr:value>2</ogr:value>
<ogr:area>3.000000</ogr:area>
<ogr:perim>14.752246</ogr:perim>
</ogr:convex_hull_fields>
</gml:featureMember>
<gml:featureMember>
<ogr:convex_hull_fields fid="convex_hull_fields.2">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2,2 3,3 5,2 2,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:id>2</ogr:id>
<ogr:value>3</ogr:value>
<ogr:area>1.500000</ogr:area>
<ogr:perim>6.650282</ogr:perim>
</ogr:convex_hull_fields>
</gml:featureMember>
</ogr:FeatureCollection>

View File

@ -0,0 +1,13 @@
{
"type": "FeatureCollection",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { "fid": "polys.0", "name": "aaaaa", "intval": 33, "floatval": 44.123456, "COUNT": 41 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -1.0, -1.0 ], [ -1.0, 3.0 ], [ 3.0, 3.0 ], [ 3.0, 2.0 ], [ 2.0, 2.0 ], [ 2.0, -1.0 ], [ -1.0, -1.0 ] ] ] } },
{ "type": "Feature", "properties": { "fid": "polys.1", "name": "Aaaaa", "intval": -33, "floatval": 0.000000, "COUNT": 3 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 5.0, 5.0 ], [ 6.0, 4.0 ], [ 4.0, 4.0 ], [ 5.0, 5.0 ] ] ] } },
{ "type": "Feature", "properties": { "fid": "polys.2", "name": "bbaaa", "intval": null, "floatval": 0.123000, "COUNT": 5 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 2.0, 5.0 ], [ 2.0, 6.0 ], [ 3.0, 6.0 ], [ 3.0, 5.0 ], [ 2.0, 5.0 ] ] ] } },
{ "type": "Feature", "properties": { "fid": "polys.3", "name": "ASDF", "intval": 0, "floatval": null, "COUNT": 24 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 6.0, 1.0 ], [ 10.0, 1.0 ], [ 10.0, -3.0 ], [ 6.0, -3.0 ], [ 6.0, 1.0 ] ], [ [ 7.0, 0.0 ], [ 7.0, -2.0 ], [ 9.0, -2.0 ], [ 9.0, 0.0 ], [ 7.0, 0.0 ] ] ] } },
{ "type": "Feature", "properties": { "fid": "polys.4", "name": null, "intval": 120, "floatval": -100291.432130, "COUNT": 0 }, "geometry": { "type": "Polygon", "coordinates": [ ] } },
{ "type": "Feature", "properties": { "fid": "polys.5", "name": "elim", "intval": 2, "floatval": 3.330000, "COUNT": 35 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.0, 2.0 ], [ 6.0, 1.0 ], [ 6.0, -3.0 ], [ 2.0, -1.0 ], [ 2.0, 2.0 ], [ 3.0, 2.0 ] ] ] } }
]
}

View File

@ -2015,6 +2015,32 @@ tests:
name: expected/join_attribute_table.gml
type: vector
- algorithm: qgis:convexhull
name: Simple convex hull
params:
INPUT:
name: custom/points_hull.gml
type: vector
METHOD: '0'
results:
OUTPUT:
name: expected/convex_hull.gml
type: vector
- algorithm: qgis:convexhull
name: Convex hull based on field attribute
params:
FIELD: hull
INPUT:
name: custom/points_hull.gml
type: vector
METHOD: '1'
results:
OUTPUT:
name: expected/convex_hull_fields.gml
type: vector
# These tests dissabled because algs require access to iface which
# is not available in the test suite.
#- algorithm: qgis:shortestpathpointtopoint