QGIS/python/plugins/processing/tests/testdata/qgis_algorithm_tests5.yaml
Nyall Dawson 8ea8798c52 Add "concave hull by feature" algorithm
The existing concave hull algorithm is quite restrictive as it
forces operation on an entire layer, which makes it useless eg
to create concave hulls from service area outputs.

Rename the existing one to "concave hull (by layer)", and make
sure all the documentation explains this so its more predictable
for users.
2025-06-02 07:17:39 +10:00

376 lines
9.0 KiB
YAML

tests:
- name: Difference (multiple overlays)
algorithm: native:multidifference
params:
INPUT:
name: custom/multi_overlay_A.shp
type: vector
OVERLAYS:
params:
- name: custom/multi_overlay_B.shp
type: vector
- name: custom/multi_overlay_C.shp
type: vector
type: multi
results:
OUTPUT:
name: expected/multi_difference.gml
type: vector
compare:
fields:
gml_id: skip
geometry:
normalize: True
- name: Intersection (multiple overlays)
algorithm: native:multiintersection
params:
INPUT:
name: custom/multi_overlay_A.shp
type: vector
OVERLAYS:
params:
- name: custom/multi_overlay_B.shp
type: vector
- name: custom/multi_overlay_C.shp
type: vector
type: multi
OVERLAY_FIELDS_PREFIX: ''
results:
OUTPUT:
name: expected/multi_intersection.gml
type: vector
compare:
fields:
gml_id: skip
geometry:
normalize: True
- name: Union (multiple overlays)
algorithm: native:multiunion
params:
INPUT:
name: custom/multi_overlay_A.shp
type: vector
OVERLAYS:
params:
- name: custom/multi_overlay_B.shp
type: vector
- name: custom/multi_overlay_C.shp
type: vector
type: multi
OVERLAY_FIELDS_PREFIX: ''
results:
OUTPUT:
name: expected/multi_union.gml
type: vector
compare:
fields:
gml_id: skip
geometry:
normalize: True
- algorithm: native:buffer
name: Buffer, dissolve with separate disjoint
params:
DISSOLVE: true
DISTANCE: 0.6
END_CAP_STYLE: 0
INPUT:
name: multipolys.gml
type: vector
JOIN_STYLE: 0
MITER_LIMIT: 2.0
SEGMENTS: 5
SEPARATE_DISJOINT: true
results:
OUTPUT:
name: expected/buffer_dissolve_keep_disjoint.gml
type: vector
- algorithm: native:buffer
name: Buffer, separate disjoint with disjoint results
params:
DISSOLVE: false
DISTANCE: 0.3
END_CAP_STYLE: 1
INPUT:
name: multilines.gml
type: vector
JOIN_STYLE: 1
MITER_LIMIT: 2.0
SEGMENTS: 5
SEPARATE_DISJOINT: true
results:
OUTPUT:
name: expected/buffer_keep_disjoint_features_disjoint.gml
type: vector
- algorithm: native:buffer
name: Buffer, separate disjoint with non-disjoint results
params:
DISSOLVE: false
DISTANCE: 1.0
END_CAP_STYLE: 1
INPUT:
name: multilines.gml
type: vector
JOIN_STYLE: 1
MITER_LIMIT: 2.0
SEGMENTS: 5
SEPARATE_DISJOINT: true
results:
OUTPUT:
name: expected/buffer_keep_disjoint.gml
type: vector
- algorithm: native:dtmslopebasedfilter
name: DTM slope based filter (1)
params:
BAND: 1
FILTER_MODIFICATION: 0
INPUT:
name: dem.tif
type: raster
RADIUS: 10
STANDARD_DEVIATION: 0.1
TERRAIN_SLOPE: 500.0
results:
OUTPUT_GROUND:
hash: 1d1c403ff54f95a291a3a979220fb60a69ae117df1023671759656a8
type: rasterhash
OUTPUT_NONGROUND:
hash: 450da40150fa94eca7d8b681c21ef62d41e746acbe0886797c6b9b2d
type: rasterhash
- algorithm: native:dtmslopebasedfilter
name: DTM slope based filter (2)
params:
BAND: 1
FILTER_MODIFICATION: 0
INPUT:
name: dem.tif
type: raster
RADIUS: 3
STANDARD_DEVIATION: 0.1
TERRAIN_SLOPE: 300.0
results:
OUTPUT_GROUND:
hash: 28051cc571bcad29de3c43b7495f7f035a6cf9bae31c9b3dff39a51d
type: rasterhash
OUTPUT_NONGROUND:
hash: cce2498eb5694accc3720089b1660f5db9a9146129120c0219fbbe3a
type: rasterhash
- algorithm: native:dtmslopebasedfilter
name: DTM slope based filter (relaxed)
params:
BAND: 1
FILTER_MODIFICATION: 1
INPUT:
name: dem.tif
type: raster
RADIUS: 10
STANDARD_DEVIATION: 0.1
TERRAIN_SLOPE: 500.0
results:
OUTPUT_GROUND:
hash: 3a2c92296870ce44d990ba2d19765327b2f48873d2a37d9f858bbb1b
type: rasterhash
OUTPUT_NONGROUND:
hash: f7593955a08c7f321f3cabed37e5acf586061b7deb9022ee32b22aae
type: rasterhash
- algorithm: native:dtmslopebasedfilter
name: DTM slope based filter (amplified)
params:
BAND: 1
FILTER_MODIFICATION: 2
INPUT:
name: dem.tif
type: raster
RADIUS: 10
STANDARD_DEVIATION: 0.1
TERRAIN_SLOPE: 500.0
results:
OUTPUT_GROUND:
hash: 8844e5fd0c8c26f815612fd1b6768799deee6b16bccb961ef03b05a0
type: rasterhash
OUTPUT_NONGROUND:
hash: cec23a44e0a5da2c9d0be68a13cdb1e851492061e64d81b564e5a269
type: rasterhash
- algorithm: native:coverageunion
name: Coverage union
condition:
geos:
at_least: 31200
params:
INPUT:
name: polys.gml|layername=polys2
type: vector
results:
OUTPUT:
name: expected/coverage_dissolve.gml
type: vector
- algorithm: native:coveragesimplify
name: Simplify coverage
condition:
geos:
at_least: 31200
params:
INPUT:
name: polys.gml|layername=polys2
type: vector
PRESERVE_BOUNDARY: false
TOLERANCE: 3.0
results:
OUTPUT:
name: expected/simplify_coverage.gml
type: vector
- algorithm: native:creategrid
name: Create rectangle grid with negative overlay
params:
CRS: EPSG:3857
EXTENT: 738054.729300000,738373.195700000,5770010.104900000,5770208.287300000
[EPSG:3857]
HOVERLAY: 0.0
HSPACING: 10.0
TYPE: 2
VOVERLAY: -10.0
VSPACING: 10.0
results:
OUTPUT:
name: expected/create_grid_negative_overlay.gml
type: vector
- algorithm: native:surfacetopolygon
name: Create polygon from surface of Mesh layer
params:
INPUT:
name: quad_and_triangle.2dm
type: mesh
results:
OUTPUT:
name: expected/mesh_surface_to_polygon.gml
type: vector
- algorithm: native:surfacetopolygon
name: Create polygon from surface of Mesh layer - multiple parts with hole
params:
INPUT:
name: mesh_two_part_with_hole.2dm
type: mesh
results:
OUTPUT:
name: expected/mesh_surface_to_polygon_complex_mesh_hole.gml
type: vector
- algorithm: native:rasterminmax
name: Raster min max
params:
BAND: 1
EXTRACT: 0
INPUT:
name: dem.tif
type: raster
results:
OUTPUT:
name: expected/raster_min_max.gml
type: vector
- algorithm: native:rasterminmax
name: Raster min
params:
BAND: 1
EXTRACT: 1
INPUT:
name: dem.tif
type: raster
results:
OUTPUT:
name: expected/raster_min.gml
type: vector
- algorithm: native:rasterminmax
name: Raster max
params:
BAND: 1
EXTRACT: 2
INPUT:
name: dem.tif
type: raster
results:
OUTPUT:
name: expected/raster_max.gml
type: vector
- algorithm: native:zonalminmaxpoint
name: Raster zonal min max
params:
INPUT:
name: custom/dem_zones.geojson
type: vector
INPUT_RASTER:
name: custom/dem_crs.tif
type: raster
RASTER_BAND: 1
results:
OUTPUT:
name: expected/raster_zonal_extremum.gml
type: vector
- algorithm: native:fillsinkswangliu
name: Fill sinks W&L
params:
BAND: 1
INPUT:
name: dem.tif
type: raster
MIN_SLOPE: 0.1
results:
OUTPUT_FILLED_DEM:
hash: 2a436a9a5f2b0c4e5369868649ff2bf7d9e69d9fa71e21beb6ebd34c
type: rasterhash
OUTPUT_FLOW_DIRECTIONS:
hash: 47e3bd73b8aa8e64f726515a650fa1dfb4d14581e1b3a949182bd28b
type: rasterhash
OUTPUT_WATERSHED_BASINS:
hash: 38169bd8e8ff1400109936c8de70e429ab319926a053ab5142791010
type: rasterhash
- algorithm: native:fillsinkswangliu
name: Fill sinks W&L no min slope
params:
BAND: 1
INPUT:
name: dem.tif
type: raster
MIN_SLOPE: 0.0
results:
OUTPUT_FILLED_DEM:
hash: 10aa3f7961764f420a6eaf19718faef69a943364d171e1242f415945
type: rasterhash
OUTPUT_FLOW_DIRECTIONS:
hash: 8a5f49fbcb14f7a84c59ee9952173600c6b2bd675ed59bef5c7260f0
type: rasterhash
OUTPUT_WATERSHED_BASINS:
hash: 38169bd8e8ff1400109936c8de70e429ab319926a053ab5142791010
type: rasterhash
- algorithm: native:concavehullbyfeature
name: Concave hull by feature
params:
ALPHA: 0.3
HOLES: true
INPUT:
name: custom/concave_hull_points.gml|layername=concave_hull_points
type: vector
results:
OUTPUT:
name: expected/concave_hull_by_feature.gml
type: vector