Skip to content
Permalink
Browse files

Add new polys and multipolys test datasets

  • Loading branch information
m-kuhn committed Feb 4, 2016
1 parent c21889f commit 14d438db2655577dfa3bef601580e3baf37f9f30
@@ -0,0 +1,109 @@
# See ../README.md for a description of the file format

tests:
- name: centroid # Human readable identifier
algorithm: qgis:polygoncentroids # Algorithm name
params: # A list of parameters (only 1 here)
- type: vector # Param is a vector layer
location: proc # file is in the qgis tests/testdata directory
name: polys.geojson # file name
results: # A map of results (only one here)
OUTPUT_LAYER:
type: vector # Expected result is a vector layer
location: proc # The expected control layer is located in the processing testdata directory
name: expected/polys_centroid.geojson # The relative filepath from the processing testdata directory

- name: deleteholes
algorithm: qgis:deleteholes
params:
- type: vector
location: qgs
name: polys.shp
results:
OUTPUT:
type: vector
location: proc
name: expected/polys_deleteholes.geojson

- name: densify
algorithm: qgis:densifygeometries
params:
- type: vector
location: qgs
name: polys.shp
- 2 # Interval
results:
OUTPUT:
type: vector
location: proc
name: expected/polys_densify.geojson

- name: polygonstolines
algorithm: qgis:polygonstolines
params:
- type: vector
location: qgs
name: polys.shp
results:
OUTPUT:
type: vector
location: proc
name: expected/polys_to_lines.geojson

- name: reverselinedirection
algorithm: qgis:reverselinedirection
params:
- type: vector
location: qgs
name: lines.shp
results:
OUTPUT_LAYER:
type: vector
location: proc
name: expected/lines_reverse.geojson

# MK: 7.1.2016, Reenable once epsilon has been implemented
# - name: reproject
# algorithm: qgis:reprojectlayer
# params:
# - type: vector
# location: qgs
# name: france_parts.shp
# - 'EPSG:2192' # Quoted to make sure the colon isn't mistaken for a key/value pair
# results:
# OUTPUT:
# type: vector
# location: proc
# name: expected/reprojected_france_parts.geojson
# epsilon: 0.000001

- name: frequencyanalysis
algorithm: qgis:frequencyanalysis
params:
- type: vector
location: qgs
name: polys.shp
- Name # Field to calculate frequency on
results:
Frequency:
type: vector
location: proc
name: expected/frequency.csv

# MK: 7.1.2016, Check why this fails on travis (string vs. integer field type)
# - name: sumlinelengths
# algorithm: qgis:sumlinelengths
# params:
# - type: vector
# location: qgs
# name: lines.shp
# - type: vector
# location: qgs
# name: rectangles.shp
# - length
# - count
# results:
# OUTPUT:
# type: vector
# location: proc
# name: expected/sumlinelengths.geojson
@@ -0,0 +1,10 @@
{
"type": "FeatureCollection",

"features": [
{ "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 ] ] ] ] } },
{ "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 ] ] ] ] } },
{ "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 ] ] ] ] } },
{ "type": "Feature", "properties": { "Bname": "Test", "Bintval": 3, "Bfloatval": 0 }, "geometry": null }
]
}
@@ -0,0 +1,11 @@
{
"type": "FeatureCollection",

"features": [
{ "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 ] ] ] } },
{ "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 ] ] ] } },
{ "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 ] ] ] } },
{ "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 ] ] ] } },
{ "type": "Feature", "properties": { "name": null, "intval": 120, "floatval": -100291.43213 }, "geometry": null }
]
}

0 comments on commit 14d438d

Please sign in to comment.
You can’t perform that action at this time.