Skip to content
Permalink
Browse files

processing test for difference algorithm (#5764)

  • Loading branch information
ghtmtt authored and m-kuhn committed Nov 29, 2017
1 parent e8213b8 commit a10e753820259361f66ac57ebbb3b2637c4d1fdc
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8" ?>
<ogr:FeatureCollection
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://ogr.maptools.org/ difference.xsd"
xmlns:ogr="http://ogr.maptools.org/"
xmlns:gml="http://www.opengis.net/gml">
<gml:boundedBy>
<gml:Box>
<gml:coord><gml:X>18.69196794111859</gml:X><gml:Y>45.7778586469115</gml:Y></gml:coord>
<gml:coord><gml:X>18.7047140186325</gml:X><gml:Y>45.8064427846727</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>

<gml:featureMember>
<ogr:difference fid="1">
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:4326"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>18.6919679411186,45.8026082758958 18.6931079302144,45.8064427846727 18.7047140186325,45.7953009397913 18.6939700967826,45.7943061322126 18.6931834255857,45.7955374436512 18.694442232425,45.7962359279339 18.6948297543933,45.8001757346123 18.6919679411186,45.8026082758958</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
</ogr:difference>
</gml:featureMember>
<gml:featureMember>
<ogr:difference fid="2">
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:4326"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>18.6977017543579,45.7883629617075 18.6989441346761,45.790923786445 18.7047140186325,45.7884699277509 18.7027907239804,45.7864139920883 18.6998063012443,45.7778586469115 18.6982809296236,45.7800472235846 18.6979288821319,45.7806159156867 18.6997383659926,45.7811225711677 18.7009009318977,45.7856436607986 18.6977017543579,45.7883629617075</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
</ogr:difference>
</gml:featureMember>
</ogr:FeatureCollection>
@@ -0,0 +1,23 @@
<?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" elementFormDefault="qualified" version="1.0">
<xs:import namespace="http://www.opengis.net/gml" schemaLocation="http://schemas.opengis.net/gml/2.1.2/feature.xsd"/>
<xs:element name="FeatureCollection" type="ogr:FeatureCollectionType" substitutionGroup="gml:_FeatureCollection"/>
<xs:complexType name="FeatureCollectionType">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureCollectionType">
<xs:attribute name="lockId" type="xs:string" use="optional"/>
<xs:attribute name="scope" type="xs:string" use="optional"/>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="difference" type="ogr:difference_Type" substitutionGroup="gml:_Feature"/>
<xs:complexType name="difference_Type">
<xs:complexContent>
<xs:extension base="gml:AbstractFeatureType">
<xs:sequence>
<xs:element name="geometryProperty" type="gml:MultiPolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
</xs:schema>
@@ -4534,3 +4534,18 @@ tests:
OUTPUT:
name: expected/union.gml
type: vector

- algorithm: qgis:difference
name: Difference test
params:
INPUT:
name: custom/for_union.gml
type: vector
OVERLAY:
name: custom/polygon_mask.gml
type: vector
results:
OUTPUT:
name: expected/difference.gml
type: vector

0 comments on commit a10e753

Please sign in to comment.
You can’t perform that action at this time.