Skip to content

Commit

Permalink
test case
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCaha committed Oct 23, 2024
1 parent 5f56704 commit fcfccec
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
3 changes: 0 additions & 3 deletions python/plugins/processing/tests/AlgorithmsTestBase.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,6 @@ def check_algorithm(self, name, defs):

print('Running alg: "{}"'.format(defs['algorithm']))
alg = QgsApplication.processingRegistry().createAlgorithmById(defs['algorithm'])
if alg is None:
print('Algorithm not found: {}'.format(defs['algorithm']))
return

parameters = {}
if isinstance(params, list):
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
gml:id="aFeatureCollection"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ogr.maptools.org/ a.xsd"
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml/3.2">
<gml:boundedBy><gml:Envelope><gml:lowerCorner>1000 2000</gml:lowerCorner><gml:upperCorner>3000 3000</gml:upperCorner></gml:Envelope></gml:boundedBy>

<ogr:featureMember>
<ogr:a gml:id="a.0">
<gml:boundedBy><gml:Envelope><gml:lowerCorner>1000 2000</gml:lowerCorner><gml:upperCorner>3000 3000</gml:upperCorner></gml:Envelope></gml:boundedBy>
<ogr:geometryProperty><gml:MultiSurface gml:id="a.geom.0"><gml:surfaceMember><gml:Polygon gml:id="a.geom.0.0"><gml:exterior><gml:LinearRing><gml:posList>1000 2000 2000 2000 3000 2000 2000 3000 1000 3000 1000 2000</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></gml:surfaceMember></gml:MultiSurface></ogr:geometryProperty>
</ogr:a>
</ogr:featureMember>
</ogr:FeatureCollection>
Original file line number Diff line number Diff line change
Expand Up @@ -247,3 +247,11 @@ tests:
name: expected/create_grid_negative_overlay.gml
type: vector

- algorithm: native:surfacetopolygon
name: Create polygon from surface of Mesh layer
params:
INPUT: 2DM:"quad_and_triangle.2dm"
results:
OUTPUT:
name: expected/mesh_surface_to_polygon.gml
type: vector
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
MESH2D 1000.000 2000.000 0.000000 200 300 1.000 1.000
ND 1 1000.000 2000.000 20.000
ND 2 2000.000 2000.000 30.000
ND 3 3000.000 2000.000 40.000
ND 4 2000.000 3000.000 50.000
ND 5 1000.000 3000.000 10.000
E4Q 1 1 2 4 5 1
E3T 2 2 3 4 1

0 comments on commit fcfccec

Please sign in to comment.