mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
concave hull tests based on geos version
This commit is contained in:
parent
17426302ff
commit
a4e473392c
16
python/plugins/processing/tests/testdata/expected/concave_hull_points_03_geos.gml
vendored
Normal file
16
python/plugins/processing/tests/testdata/expected/concave_hull_points_03_geos.gml
vendored
Normal file
@ -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/ concave_hull_points_03_geos.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml/3.2">
|
||||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>-5 0</gml:lowerCorner><gml:upperCorner>3 8</gml:upperCorner></gml:Envelope></gml:boundedBy>
|
||||
|
||||
<ogr:featureMember>
|
||||
<ogr:concave_hull_points_03_geos gml:id="concave_hull_points_03_geos.0">
|
||||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>-5 0</gml:lowerCorner><gml:upperCorner>3 8</gml:upperCorner></gml:Envelope></gml:boundedBy>
|
||||
<ogr:geometryProperty><gml:Polygon srsName="urn:ogc:def:crs:EPSG::4326" gml:id="concave_hull_points_03_geos.geom.0"><gml:exterior><gml:LinearRing><gml:posList>-5 0 -1 0 1 1 2 2 3 3 2 5 -1 8 -1 7 1 4 -5 0</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:concave_hull_points_03_geos>
|
||||
</ogr:featureMember>
|
||||
</ogr:FeatureCollection>
|
@ -34,8 +34,8 @@
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:element name="concave_hull_points_03" type="ogr:concave_hull_points_03_Type" substitutionGroup="gml:AbstractFeature"/>
|
||||
<xs:complexType name="concave_hull_points_03_Type">
|
||||
<xs:element name="concave_hull_points_03_geos" type="ogr:concave_hull_points_03_geos_Type" substitutionGroup="gml:AbstractFeature"/>
|
||||
<xs:complexType name="concave_hull_points_03_geos_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
@ -2,15 +2,15 @@
|
||||
<ogr:FeatureCollection
|
||||
gml:id="aFeatureCollection"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ concave_hull_points_03.xsd"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ concave_hull_points_03_qgis.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml/3.2">
|
||||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>1 2</gml:lowerCorner><gml:upperCorner>3 5</gml:upperCorner></gml:Envelope></gml:boundedBy>
|
||||
|
||||
<ogr:featureMember>
|
||||
<ogr:concave_hull_points_03 gml:id="concave_hull_points_03.0">
|
||||
<ogr:concave_hull_points_03_qgis gml:id="concave_hull_points_03_qgis.0">
|
||||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>1 2</gml:lowerCorner><gml:upperCorner>3 5</gml:upperCorner></gml:Envelope></gml:boundedBy>
|
||||
<ogr:geometryProperty><gml:Polygon srsName="urn:ogc:def:crs:EPSG::4326" gml:id="concave_hull_points_03.geom.0"><gml:exterior><gml:LinearRing><gml:posList>2 2 3 3 2 5 1 4 2 2</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:concave_hull_points_03>
|
||||
<ogr:geometryProperty><gml:Polygon srsName="urn:ogc:def:crs:EPSG::4326" gml:id="concave_hull_points_03_qgis.geom.0"><gml:exterior><gml:LinearRing><gml:posList>2 2 3 3 2 5 1 4 2 2</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:concave_hull_points_03_qgis>
|
||||
</ogr:featureMember>
|
||||
</ogr:FeatureCollection>
|
@ -34,8 +34,8 @@
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:element name="concave_hull_points_07" type="ogr:concave_hull_points_07_Type" substitutionGroup="gml:AbstractFeature"/>
|
||||
<xs:complexType name="concave_hull_points_07_Type">
|
||||
<xs:element name="concave_hull_points_03_qgis" type="ogr:concave_hull_points_03_qgis_Type" substitutionGroup="gml:AbstractFeature"/>
|
||||
<xs:complexType name="concave_hull_points_03_qgis_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
16
python/plugins/processing/tests/testdata/expected/concave_hull_points_07_geos.gml
vendored
Normal file
16
python/plugins/processing/tests/testdata/expected/concave_hull_points_07_geos.gml
vendored
Normal file
@ -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/ concave_hull_points_07_geos.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml/3.2">
|
||||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>-5 0</gml:lowerCorner><gml:upperCorner>3 8</gml:upperCorner></gml:Envelope></gml:boundedBy>
|
||||
|
||||
<ogr:featureMember>
|
||||
<ogr:concave_hull_points_07_geos gml:id="concave_hull_points_07_geos.0">
|
||||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>-5 0</gml:lowerCorner><gml:upperCorner>3 8</gml:upperCorner></gml:Envelope></gml:boundedBy>
|
||||
<ogr:geometryProperty><gml:Polygon srsName="urn:ogc:def:crs:EPSG::4326" gml:id="concave_hull_points_07_geos.geom.0"><gml:exterior><gml:LinearRing><gml:posList>-5 0 -1 0 1 1 2 2 3 3 2 5 -1 8 -1 7 1 4 -5 0</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:concave_hull_points_07_geos>
|
||||
</ogr:featureMember>
|
||||
</ogr:FeatureCollection>
|
47
python/plugins/processing/tests/testdata/expected/concave_hull_points_07_geos.xsd
vendored
Normal file
47
python/plugins/processing/tests/testdata/expected/concave_hull_points_07_geos.xsd
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema
|
||||
targetNamespace="http://ogr.maptools.org/"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:gml="http://www.opengis.net/gml/3.2"
|
||||
xmlns:gmlsf="http://www.opengis.net/gmlsf/2.0"
|
||||
elementFormDefault="qualified"
|
||||
version="1.0">
|
||||
<xs:annotation>
|
||||
<xs:appinfo source="http://schemas.opengis.net/gmlsfProfile/2.0/gmlsfLevels.xsd">
|
||||
<gmlsf:ComplianceLevel>0</gmlsf:ComplianceLevel>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
|
||||
<xs:import namespace="http://www.opengis.net/gmlsf/2.0" schemaLocation="http://schemas.opengis.net/gmlsfProfile/2.0/gmlsfLevels.xsd"/>
|
||||
<xs:element name="FeatureCollection" type="ogr:FeatureCollectionType" substitutionGroup="gml:AbstractFeature"/>
|
||||
<xs:complexType name="FeatureCollectionType">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="featureMember">
|
||||
<xs:complexType>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureMemberType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="gml:AbstractFeature"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:element name="concave_hull_points_07_geos" type="ogr:concave_hull_points_07_geos_Type" substitutionGroup="gml:AbstractFeature"/>
|
||||
<xs:complexType name="concave_hull_points_07_geos_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:SurfacePropertyType" nillable="true" minOccurs="0" maxOccurs="1"/> <!-- restricted to Polygon --><!-- srsName="urn:ogc:def:crs:EPSG::4326" -->
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
@ -2,15 +2,15 @@
|
||||
<ogr:FeatureCollection
|
||||
gml:id="aFeatureCollection"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ concave_hull_points_07.xsd"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ concave_hull_points_07_qgis.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml/3.2">
|
||||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>-1 0</gml:lowerCorner><gml:upperCorner>3 8</gml:upperCorner></gml:Envelope></gml:boundedBy>
|
||||
|
||||
<ogr:featureMember>
|
||||
<ogr:concave_hull_points_07 gml:id="concave_hull_points_07.0">
|
||||
<ogr:concave_hull_points_07_qgis gml:id="concave_hull_points_07_qgis.0">
|
||||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>-1 0</gml:lowerCorner><gml:upperCorner>3 8</gml:upperCorner></gml:Envelope></gml:boundedBy>
|
||||
<ogr:geometryProperty><gml:Polygon srsName="urn:ogc:def:crs:EPSG::4326" gml:id="concave_hull_points_07.geom.0"><gml:exterior><gml:LinearRing><gml:posList>1 1 2 2 3 3 2 5 -1 8 -1 7 1 4 -1 0 1 1</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:concave_hull_points_07>
|
||||
<ogr:geometryProperty><gml:Polygon srsName="urn:ogc:def:crs:EPSG::4326" gml:id="concave_hull_points_07_qgis.geom.0"><gml:exterior><gml:LinearRing><gml:posList>1 1 2 2 3 3 2 5 -1 8 -1 7 1 4 -1 0 1 1</gml:posList></gml:LinearRing></gml:exterior></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:concave_hull_points_07_qgis>
|
||||
</ogr:featureMember>
|
||||
</ogr:FeatureCollection>
|
47
python/plugins/processing/tests/testdata/expected/concave_hull_points_07_qgis.xsd
vendored
Normal file
47
python/plugins/processing/tests/testdata/expected/concave_hull_points_07_qgis.xsd
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xs:schema
|
||||
targetNamespace="http://ogr.maptools.org/"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:gml="http://www.opengis.net/gml/3.2"
|
||||
xmlns:gmlsf="http://www.opengis.net/gmlsf/2.0"
|
||||
elementFormDefault="qualified"
|
||||
version="1.0">
|
||||
<xs:annotation>
|
||||
<xs:appinfo source="http://schemas.opengis.net/gmlsfProfile/2.0/gmlsfLevels.xsd">
|
||||
<gmlsf:ComplianceLevel>0</gmlsf:ComplianceLevel>
|
||||
</xs:appinfo>
|
||||
</xs:annotation>
|
||||
<xs:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/>
|
||||
<xs:import namespace="http://www.opengis.net/gmlsf/2.0" schemaLocation="http://schemas.opengis.net/gmlsfProfile/2.0/gmlsfLevels.xsd"/>
|
||||
<xs:element name="FeatureCollection" type="ogr:FeatureCollectionType" substitutionGroup="gml:AbstractFeature"/>
|
||||
<xs:complexType name="FeatureCollectionType">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:element name="featureMember">
|
||||
<xs:complexType>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureMemberType">
|
||||
<xs:sequence>
|
||||
<xs:element ref="gml:AbstractFeature"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
<xs:element name="concave_hull_points_07_qgis" type="ogr:concave_hull_points_07_qgis_Type" substitutionGroup="gml:AbstractFeature"/>
|
||||
<xs:complexType name="concave_hull_points_07_qgis_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:SurfacePropertyType" nillable="true" minOccurs="0" maxOccurs="1"/> <!-- restricted to Polygon --><!-- srsName="urn:ogc:def:crs:EPSG::4326" -->
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
@ -268,37 +268,73 @@ tests:
|
||||
cast: str
|
||||
fid: skip
|
||||
|
||||
# concave hull tests should be upddated when CI will be using GEOS>=3.11
|
||||
# current tests data were generated by Python implementation which produces
|
||||
# incorrect result by not including all input points in the concave hull
|
||||
# see https://github.com/qgis/QGIS/issues/54561
|
||||
#- algorithm: native:concavehull
|
||||
# name: Concave Hull - Points (0.3)
|
||||
# params:
|
||||
# ALPHA: 0.3
|
||||
# HOLES: true
|
||||
# INPUT:
|
||||
# name: points.gml
|
||||
# type: vector
|
||||
# NO_MULTIGEOMETRY: false
|
||||
# results:
|
||||
# OUTPUT:
|
||||
# name: expected/concave_hull_points_03.gml
|
||||
# type: vector
|
||||
- algorithm: native:concavehull
|
||||
name: Concave Hull - Points (0.3) (GEOS <= 3.10)
|
||||
condition:
|
||||
geos:
|
||||
less_than: 31100
|
||||
params:
|
||||
ALPHA: 0.3
|
||||
HOLES: true
|
||||
INPUT:
|
||||
name: points.gml
|
||||
type: vector
|
||||
NO_MULTIGEOMETRY: false
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/concave_hull_points_03_qgis.gml
|
||||
type: vector
|
||||
|
||||
#- algorithm: native:concavehull
|
||||
# name: Concave Hull - Points (0.7)
|
||||
# params:
|
||||
# ALPHA: 0.7
|
||||
# HOLES: true
|
||||
# INPUT:
|
||||
# name: points.gml
|
||||
# type: vector
|
||||
# NO_MULTIGEOMETRY: false
|
||||
# results:
|
||||
# OUTPUT:
|
||||
# name: expected/concave_hull_points_07.gml
|
||||
# type: vector
|
||||
- algorithm: native:concavehull
|
||||
name: Concave Hull - Points (0.7) (GEOS <= 3.10)
|
||||
condition:
|
||||
geos:
|
||||
less_than: 31100
|
||||
params:
|
||||
ALPHA: 0.7
|
||||
HOLES: true
|
||||
INPUT:
|
||||
name: points.gml
|
||||
type: vector
|
||||
NO_MULTIGEOMETRY: false
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/concave_hull_points_07_qgis.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: native:concavehull
|
||||
name: Concave Hull - Points (0.3) (GEOS > 3.11)
|
||||
condition:
|
||||
geos:
|
||||
at_least: 31100
|
||||
params:
|
||||
ALPHA: 0.3
|
||||
HOLES: true
|
||||
INPUT:
|
||||
name: points.gml
|
||||
type: vector
|
||||
NO_MULTIGEOMETRY: false
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/concave_hull_points_03_geos.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: native:concavehull
|
||||
name: Concave Hull - Points (0.7) (GEOS > 3.11)
|
||||
condition:
|
||||
geos:
|
||||
at_least: 31100
|
||||
params:
|
||||
ALPHA: 0.7
|
||||
HOLES: true
|
||||
INPUT:
|
||||
name: points.gml
|
||||
type: vector
|
||||
NO_MULTIGEOMETRY: false
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/concave_hull_points_07_geos.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:knearestconcavehull
|
||||
name: K-nearest Neighbor Concave Hull - Points (k=7)
|
||||
|
Loading…
x
Reference in New Issue
Block a user