QGIS/python/plugins/processing/tests/testdata/qgis_algorithm_tests5.yaml
Jan Caha f593da593a
New Algorithm - Mesh Surface to Polygon (#58941)
* new algorithm

* update feedback

* allow cancel during mesh face processing

* allow cancel during mesh faces processing

* fix file names

* fix the speed of the algorithm

* drop not needed imports

* fix issues

* more readable

* add mesh layer

* test case

* simplify to avoid warning

* fix issue

* fix data call

* fix call

* fix expected data

* handle meshes with holes

* add test case

* merge from master

* Update src/analysis/processing/qgsalgorithmmeshsurfacetopolygon.cpp

fix translation

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* Update src/analysis/processing/qgsalgorithmmeshsurfacetopolygon.cpp

fix translation

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* Update src/analysis/processing/qgsalgorithmmeshsurfacetopolygon.cpp

fix translation

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* fix translation

* typo

* clone

* delete to avoid memory leak

---------

Co-authored-by: Stefanos Natsis <uclaros@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-12-11 16:04:48 +02:00

325 lines
7.6 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