-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[processing] Make line intersection alg able to handle intersections …
…of type 'geometry collection'
- Loading branch information
1 parent
2d7addc
commit 49ee8bb
Showing
8 changed files
with
224 additions
and
12 deletions.
There are no files selected for viewing
20 changes: 20 additions & 0 deletions
20
python/plugins/processing/tests/testdata/custom/line_intersection_collection1.gml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ogr:FeatureCollection | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://ogr.maptools.org/ line_intersection_collection1.xsd" | ||
xmlns:ogr="http://ogr.maptools.org/" | ||
xmlns:gml="http://www.opengis.net/gml"> | ||
<gml:boundedBy> | ||
<gml:Box> | ||
<gml:coord><gml:X>963795.9543288001</gml:X><gml:Y>1077577.066142281</gml:Y></gml:coord> | ||
<gml:coord><gml:X>964309.9869270925</gml:X><gml:Y>1077925.530188314</gml:Y></gml:coord> | ||
</gml:Box> | ||
</gml:boundedBy> | ||
|
||
<gml:featureMember> | ||
<ogr:line_intersection_collection1 fid="line_intersection_collection1.0"> | ||
<ogr:geometryProperty><gml:LineString srsName="EPSG:3116"><gml:coordinates>963795.9543288,1077590.54265235 963905.691625065,1077713.75645868 963926.868998028,1077925.53018831 963980.775038299,1077802.31638198 964219.501788067,1077867.7737166 964059.761477611,1077699.94219859 964144.709036072,1077671.41702938 964211.234771022,1077618.29701916 964261.241936687,1077648.19439743 964309.986927093,1077617.49567248 964144.418374834,1077577.06614228 963905.691625065,1077713.75645868</gml:coordinates></gml:LineString></ogr:geometryProperty> | ||
<ogr:longitud>1804.4</ogr:longitud> | ||
</ogr:line_intersection_collection1> | ||
</gml:featureMember> | ||
</ogr:FeatureCollection> |
29 changes: 29 additions & 0 deletions
29
python/plugins/processing/tests/testdata/custom/line_intersection_collection1.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?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="line_intersection_collection1" type="ogr:line_intersection_collection1_Type" substitutionGroup="gml:_Feature"/> | ||
<xs:complexType name="line_intersection_collection1_Type"> | ||
<xs:complexContent> | ||
<xs:extension base="gml:AbstractFeatureType"> | ||
<xs:sequence> | ||
<xs:element name="geometryProperty" type="gml:LineStringPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/> | ||
<xs:element name="longitud" nillable="true" minOccurs="0" maxOccurs="1"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:decimal"> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:extension> | ||
</xs:complexContent> | ||
</xs:complexType> | ||
</xs:schema> |
20 changes: 20 additions & 0 deletions
20
python/plugins/processing/tests/testdata/custom/line_intersection_collection2.gml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ogr:FeatureCollection | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://ogr.maptools.org/ line_intersection_collection2.xsd" | ||
xmlns:ogr="http://ogr.maptools.org/" | ||
xmlns:gml="http://www.opengis.net/gml"> | ||
<gml:boundedBy> | ||
<gml:Box> | ||
<gml:coord><gml:X>963718.9456998424</gml:X><gml:Y>1077618.297019162</gml:Y></gml:coord> | ||
<gml:coord><gml:X>964257.4287541196</gml:X><gml:Y>1077989.062307205</gml:Y></gml:coord> | ||
</gml:Box> | ||
</gml:boundedBy> | ||
|
||
<gml:featureMember> | ||
<ogr:line_intersection_collection2 fid="line_intersection_collection2.0"> | ||
<ogr:geometryProperty><gml:LineString srsName="EPSG:3116"><gml:coordinates>964257.42875412,1077702.09075594 964211.234771022,1077618.29701916 963980.775038299,1077802.31638198 963926.868998028,1077925.53018831 963718.945699842,1077989.0623072</gml:coordinates></gml:LineString></ogr:geometryProperty> | ||
<ogr:longitud>672.7</ogr:longitud> | ||
</ogr:line_intersection_collection2> | ||
</gml:featureMember> | ||
</ogr:FeatureCollection> |
29 changes: 29 additions & 0 deletions
29
python/plugins/processing/tests/testdata/custom/line_intersection_collection2.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<?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="line_intersection_collection2" type="ogr:line_intersection_collection2_Type" substitutionGroup="gml:_Feature"/> | ||
<xs:complexType name="line_intersection_collection2_Type"> | ||
<xs:complexContent> | ||
<xs:extension base="gml:AbstractFeatureType"> | ||
<xs:sequence> | ||
<xs:element name="geometryProperty" type="gml:LineStringPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/> | ||
<xs:element name="longitud" nillable="true" minOccurs="0" maxOccurs="1"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:decimal"> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:extension> | ||
</xs:complexContent> | ||
</xs:complexType> | ||
</xs:schema> |
38 changes: 38 additions & 0 deletions
38
python/plugins/processing/tests/testdata/expected/line_intersection_collection.gml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ogr:FeatureCollection | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://ogr.maptools.org/ line_intersection_collection.xsd" | ||
xmlns:ogr="http://ogr.maptools.org/" | ||
xmlns:gml="http://www.opengis.net/gml"> | ||
<gml:boundedBy> | ||
<gml:Box> | ||
<gml:coord><gml:X>964081.0170018662</gml:X><gml:Y>1077618.29701916</gml:Y></gml:coord> | ||
<gml:coord><gml:X>964211.234771022</gml:X><gml:Y>1077722.274363162</gml:Y></gml:coord> | ||
</gml:Box> | ||
</gml:boundedBy> | ||
|
||
<gml:featureMember> | ||
<ogr:line_intersection_collection fid="line_intersection_collection1.0"> | ||
<ogr:geometryProperty><gml:Point srsName="EPSG:3116"><gml:coordinates>964081.017001866,1077722.27436316</gml:coordinates></gml:Point></ogr:geometryProperty> | ||
<ogr:longitud>1804.4</ogr:longitud> | ||
<ogr:fid_2>line_intersection_collection2.0</ogr:fid_2> | ||
<ogr:longitud_2>672.7</ogr:longitud_2> | ||
</ogr:line_intersection_collection> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:line_intersection_collection fid="line_intersection_collection1.0"> | ||
<ogr:geometryProperty><gml:Point srsName="EPSG:3116"><gml:coordinates>964144.709036063,1077671.41702938</gml:coordinates></gml:Point></ogr:geometryProperty> | ||
<ogr:longitud>1804.4</ogr:longitud> | ||
<ogr:fid_2>line_intersection_collection2.0</ogr:fid_2> | ||
<ogr:longitud_2>672.7</ogr:longitud_2> | ||
</ogr:line_intersection_collection> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:line_intersection_collection fid="line_intersection_collection1.0"> | ||
<ogr:geometryProperty><gml:Point srsName="EPSG:3116"><gml:coordinates>964211.234771022,1077618.29701916</gml:coordinates></gml:Point></ogr:geometryProperty> | ||
<ogr:longitud>1804.4</ogr:longitud> | ||
<ogr:fid_2>line_intersection_collection2.0</ogr:fid_2> | ||
<ogr:longitud_2>672.7</ogr:longitud_2> | ||
</ogr:line_intersection_collection> | ||
</gml:featureMember> | ||
</ogr:FeatureCollection> |
42 changes: 42 additions & 0 deletions
42
python/plugins/processing/tests/testdata/expected/line_intersection_collection.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?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="line_intersection_collection" type="ogr:line_intersection_collection_Type" substitutionGroup="gml:_Feature"/> | ||
<xs:complexType name="line_intersection_collection_Type"> | ||
<xs:complexContent> | ||
<xs:extension base="gml:AbstractFeatureType"> | ||
<xs:sequence> | ||
<xs:element name="geometryProperty" type="gml:PointPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/> | ||
<xs:element name="longitud" nillable="true" minOccurs="0" maxOccurs="1"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:decimal"> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
<xs:element name="fid_2" nillable="true" minOccurs="0" maxOccurs="1"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:string"> | ||
<xs:maxLength value="255"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
<xs:element name="longitud_2" nillable="true" minOccurs="0" maxOccurs="1"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:decimal"> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:extension> | ||
</xs:complexContent> | ||
</xs:complexType> | ||
</xs:schema> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters