-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[processing] Add expected test datasets
- Loading branch information
Showing
21 changed files
with
400 additions
and
167 deletions.
There are no files selected for viewing
116 changes: 36 additions & 80 deletions
116
python/plugins/processing/tests/testdata/algorithm_tests.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 added
BIN
+2.3 KB
python/plugins/processing/tests/testdata/expected/intersection_collection_fallback.dbf
Binary file not shown.
1 change: 1 addition & 0 deletions
1
python/plugins/processing/tests/testdata/expected/intersection_collection_fallback.prj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]] |
1 change: 1 addition & 0 deletions
1
python/plugins/processing/tests/testdata/expected/intersection_collection_fallback.qpj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 added
BIN
+372 Bytes
python/plugins/processing/tests/testdata/expected/intersection_collection_fallback.shp
Binary file not shown.
Binary file added
BIN
+116 Bytes
python/plugins/processing/tests/testdata/expected/intersection_collection_fallback.shx
Binary file not shown.
13 changes: 0 additions & 13 deletions
13
python/plugins/processing/tests/testdata/expected/lines_reverse.geojson
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.