Skip to content

Commit 14d438d

Browse files
committedFeb 4, 2016
Add new polys and multipolys test datasets
1 parent c21889f commit 14d438d

File tree

3 files changed

+130
-0
lines changed

3 files changed

+130
-0
lines changed
 
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# See ../README.md for a description of the file format
2+
3+
tests:
4+
- name: centroid # Human readable identifier
5+
algorithm: qgis:polygoncentroids # Algorithm name
6+
params: # A list of parameters (only 1 here)
7+
- type: vector # Param is a vector layer
8+
location: proc # file is in the qgis tests/testdata directory
9+
name: polys.geojson # file name
10+
results: # A map of results (only one here)
11+
OUTPUT_LAYER:
12+
type: vector # Expected result is a vector layer
13+
location: proc # The expected control layer is located in the processing testdata directory
14+
name: expected/polys_centroid.geojson # The relative filepath from the processing testdata directory
15+
16+
- name: deleteholes
17+
algorithm: qgis:deleteholes
18+
params:
19+
- type: vector
20+
location: qgs
21+
name: polys.shp
22+
results:
23+
OUTPUT:
24+
type: vector
25+
location: proc
26+
name: expected/polys_deleteholes.geojson
27+
28+
- name: densify
29+
algorithm: qgis:densifygeometries
30+
params:
31+
- type: vector
32+
location: qgs
33+
name: polys.shp
34+
- 2 # Interval
35+
results:
36+
OUTPUT:
37+
type: vector
38+
location: proc
39+
name: expected/polys_densify.geojson
40+
41+
- name: polygonstolines
42+
algorithm: qgis:polygonstolines
43+
params:
44+
- type: vector
45+
location: qgs
46+
name: polys.shp
47+
results:
48+
OUTPUT:
49+
type: vector
50+
location: proc
51+
name: expected/polys_to_lines.geojson
52+
53+
- name: reverselinedirection
54+
algorithm: qgis:reverselinedirection
55+
params:
56+
- type: vector
57+
location: qgs
58+
name: lines.shp
59+
results:
60+
OUTPUT_LAYER:
61+
type: vector
62+
location: proc
63+
name: expected/lines_reverse.geojson
64+
65+
# MK: 7.1.2016, Reenable once epsilon has been implemented
66+
# - name: reproject
67+
# algorithm: qgis:reprojectlayer
68+
# params:
69+
# - type: vector
70+
# location: qgs
71+
# name: france_parts.shp
72+
# - 'EPSG:2192' # Quoted to make sure the colon isn't mistaken for a key/value pair
73+
# results:
74+
# OUTPUT:
75+
# type: vector
76+
# location: proc
77+
# name: expected/reprojected_france_parts.geojson
78+
# epsilon: 0.000001
79+
80+
- name: frequencyanalysis
81+
algorithm: qgis:frequencyanalysis
82+
params:
83+
- type: vector
84+
location: qgs
85+
name: polys.shp
86+
- Name # Field to calculate frequency on
87+
results:
88+
Frequency:
89+
type: vector
90+
location: proc
91+
name: expected/frequency.csv
92+
93+
# MK: 7.1.2016, Check why this fails on travis (string vs. integer field type)
94+
# - name: sumlinelengths
95+
# algorithm: qgis:sumlinelengths
96+
# params:
97+
# - type: vector
98+
# location: qgs
99+
# name: lines.shp
100+
# - type: vector
101+
# location: qgs
102+
# name: rectangles.shp
103+
# - length
104+
# - count
105+
# results:
106+
# OUTPUT:
107+
# type: vector
108+
# location: proc
109+
# name: expected/sumlinelengths.geojson
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"type": "FeatureCollection",
3+
4+
"features": [
5+
{ "type": "Feature", "properties": { "Bname": "Test", "Bintval": 1, "Bfloatval": 0.123 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 2.0, 1.0 ], [ 2.0, 2.0 ], [ 3.0, 2.0 ], [ 3.0, 3.0 ], [ 4.0, 3.0 ], [ 4.0, 1.0 ], [ 2.0, 1.0 ] ] ] ] } },
6+
{ "type": "Feature", "properties": { "Bname": null, "Bintval": null, "Bfloatval": null }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 7.0, -1.0 ], [ 8.0, -1.0 ], [ 8.0, 3.0 ], [ 7.0, 3.0 ], [ 7.0, -1.0 ] ] ], [ [ [ 7.0, 6.0 ], [ 7.0, 5.0 ], [ 7.0, 4.0 ], [ 8.0, 4.0 ], [ 9.0, 5.0 ], [ 9.0, 6.0 ], [ 7.0, 6.0 ] ] ] ] } },
7+
{ "type": "Feature", "properties": { "Bname": "Test", "Bintval": 2, "Bfloatval": -0.123 }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 0.0, 0.0 ], [ 0.0, 1.0 ], [ 1.0, 1.0 ], [ 1.0, 0.0 ], [ 0.0, 0.0 ] ] ] ] } },
8+
{ "type": "Feature", "properties": { "Bname": "Test", "Bintval": 3, "Bfloatval": 0 }, "geometry": null }
9+
]
10+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"type": "FeatureCollection",
3+
4+
"features": [
5+
{ "type": "Feature", "properties": { "name": "aaaaa", "intval": 33, "floatval": 44.123456 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -1.0, -1.0 ], [ 2.0, -1.0 ], [ 2.0, 2.0 ], [ 3.0, 2.0 ], [ 3.0, 3.0 ], [ -1.0, 3.0 ], [ -1.0, -1.0 ] ] ] } },
6+
{ "type": "Feature", "properties": { "name": "Aaaaa", "intval": -33, "floatval": 0}, "geometry": { "type": "Polygon", "coordinates": [ [ [ 5.0, 5.0 ], [ 4.0, 4.0 ], [ 6.0, 4.0 ], [ 5.0, 5.0 ] ] ] } },
7+
{ "type": "Feature", "properties": { "name": "bbaaa", "intval": null, "floatval": 0.123 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 2.0, 5.0 ], [ 2.0, 6.0 ], [ 3.0, 6.0 ], [ 3.0, 5.0 ], [ 2.0, 5.0 ] ] ] } },
8+
{ "type": "Feature", "properties": { "name": "ASDF", "intval": 0, "floatval": null }, "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 ], [ 9.0, 0.0 ], [ 9.0, -2.0 ], [ 7.0, -2.0 ], [ 7.0, 0.0 ] ] ] } },
9+
{ "type": "Feature", "properties": { "name": null, "intval": 120, "floatval": -100291.43213 }, "geometry": null }
10+
]
11+
}

0 commit comments

Comments
 (0)
Please sign in to comment.