Skip to content
Permalink
Browse files

[processing] Add expected test datasets

  • Loading branch information
m-kuhn committed Feb 4, 2016
1 parent ff04fd3 commit 8adc871eefeddec8d48e2edb0efb86df283b1a7f
Showing with 400 additions and 167 deletions.
  1. +36 −80 python/plugins/processing/tests/testdata/algorithm_tests.yaml
  2. BIN python/plugins/processing/tests/testdata/expected/intersection_collection_fallback.dbf
  3. +1 −0 python/plugins/processing/tests/testdata/expected/intersection_collection_fallback.prj
  4. +1 −0 python/plugins/processing/tests/testdata/expected/intersection_collection_fallback.qpj
  5. BIN python/plugins/processing/tests/testdata/expected/intersection_collection_fallback.shp
  6. BIN python/plugins/processing/tests/testdata/expected/intersection_collection_fallback.shx
  7. +0 −13 python/plugins/processing/tests/testdata/expected/lines_reverse.geojson
  8. +50 −0 python/plugins/processing/tests/testdata/expected/polys_centroid.gml
  9. +43 −0 python/plugins/processing/tests/testdata/expected/polys_centroid.xsd
  10. +0 −17 python/plugins/processing/tests/testdata/expected/polys_deleteholes.geojson
  11. +50 −0 python/plugins/processing/tests/testdata/expected/polys_deleteholes.gml
  12. +43 −0 python/plugins/processing/tests/testdata/expected/polys_deleteholes.xsd
  13. +0 −17 python/plugins/processing/tests/testdata/expected/polys_densify.geojson
  14. +50 −0 python/plugins/processing/tests/testdata/expected/polys_densify.gml
  15. +43 −0 python/plugins/processing/tests/testdata/expected/polys_densify.xsd
  16. +0 −19 python/plugins/processing/tests/testdata/expected/polys_to_lines.geojson
  17. +40 −0 python/plugins/processing/tests/testdata/expected/polys_to_lines.gml
  18. +43 −0 python/plugins/processing/tests/testdata/expected/polys_to_lines.xsd
  19. +0 −11 python/plugins/processing/tests/testdata/expected/reprojected_france_parts.geojson
  20. +0 −10 python/plugins/processing/tests/testdata/expected/sumlinelengths.geojson
  21. 0 python/plugins/processing/tests/testdata/{expected → }/polys_centroid.geojson
@@ -1,109 +1,65 @@
# See ../README.md for a description of the file format

tests:
- name: centroid # Human readable identifier
- 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: qgs # file is in the qgis tests/testdata directory
name: polys.shp # file name
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: expected/polys_centroid.gml # The relative filepath from the processing testdata directory
compare:
geometry:
precision: 7

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

- name: densify
algorithm: qgis:densifygeometries
# These datasets should produce a geometry collection and not a polygon only
# dataset. If the algorithm is fixed, a new test should be introduced to
# check this behavior.
# This test should stay in place because for shapefiles there should always
# be a polygon result created since it does not support geometry collections.
- name: Intersection (Collection Fallback)
algorithm: qgis:intersection
params:
- type: vector
location: qgs
name: polys.shp
- 2 # Interval
results:
OUTPUT:
INPUT:
name: multipolys.geojson
type: vector
INPUT2:
name: polys.geojson
type: vector
location: proc
name: expected/polys_densify.geojson

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

- name: reverselinedirection
algorithm: qgis:reverselinedirection
- name: Densify geometries
algorithm: qgis:densifygeometries
params:
- type: vector
location: qgs
name: lines.shp
- name: expected/polys_densify.gml
type: vector
- 4
results:
OUTPUT_LAYER:
OUTPUT:
name: expected/polys_densify.gml
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
- name: Polygons to Lines
algorithm: qgis:polygonstolines
params:
- type: vector
location: qgs
name: polys.shp
- Name # Field to calculate frequency on
- name: multipolys.geojson
type: vector
results:
Frequency:
OUTPUT:
name: expected/polys_to_lines.gml
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
Binary file not shown.
@@ -0,0 +1 @@
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]]
@@ -0,0 +1 @@
GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]
Binary file not shown.
Binary file not shown.

This file was deleted.

0 comments on commit 8adc871

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