mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
[FEATURE][processing]Transect processing
Adds a C++ version of the "ststion lines" plugin as a new processing algorithm for creating transect lines.
This commit is contained in:
parent
65c6974d1d
commit
977ce426db
32
python/plugins/processing/tests/testdata/custom/transect_multi.gml
vendored
Normal file
32
python/plugins/processing/tests/testdata/custom/transect_multi.gml
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ transect_multi.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>-1007699.25579326</gml:X><gml:Y>1334639.82712218</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>-1007695.88013693</gml:X><gml:Y>1334643.37803237</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi fid="transect_multi.0">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:2154"><gml:lineStringMember><gml:LineString><gml:coordinates>-1007698.95456279,1334640.65650547 -1007699.25579326,1334640.08866873</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
<ogr:id>1</ogr:id>
|
||||
</ogr:transect_multi>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:2154"><gml:lineStringMember><gml:LineString><gml:coordinates>-1007697.88013693,1334641.37803237 -1007697.88013693,1334643.37803237 -1007695.88013693,1334643.37803237 -1007695.88013693,1334641.37803237 -1007696.96824319,1334641.37457822 -1007697.88013693,1334641.37803237</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
</ogr:transect_multi>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:2154"><gml:lineStringMember><gml:LineString><gml:coordinates>-1007698.37633878,1334641.09623271 -1007698.38672604,1334640.52493354 -1007697.94699881,1334640.31718839</gml:coordinates></gml:LineString></gml:lineStringMember><gml:lineStringMember><gml:LineString><gml:coordinates>-1007696.96824319,1334641.37457822 -1007697.2100332,1334640.79082807 -1007697.28602434,1334640.6008502 -1007697.39310278,1334640.32797291 -1007697.47945635,1334640.07927462 -1007697.52090606,1334639.82712218</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
</ogr:transect_multi>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
30
python/plugins/processing/tests/testdata/custom/transect_multi.xsd
vendored
Normal file
30
python/plugins/processing/tests/testdata/custom/transect_multi.xsd
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
<?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="transect_multi" type="ogr:transect_multi_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="transect_multi_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:MultiLineStringPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="id" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
34
python/plugins/processing/tests/testdata/custom/transect_single.gml
vendored
Normal file
34
python/plugins/processing/tests/testdata/custom/transect_single.gml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ transect_single.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>-1007699.255793256</gml:X><gml:Y>1334639.827122184</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>-1007695.880136931</gml:X><gml:Y>1334643.378032367</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single fid="1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.95456279,1334640.65650547 -1007699.25579326,1334640.08866873</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
</ogr:transect_single>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single fid="2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.37633878,1334641.09623271 -1007698.38672604,1334640.52493354 -1007697.94699881,1334640.31718839</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
</ogr:transect_single>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.96824319,1334641.37457822 -1007697.2100332,1334640.79082807 -1007697.28602434,1334640.6008502 -1007697.39310278,1334640.32797291 -1007697.47945635,1334640.07927462 -1007697.52090606,1334639.82712218</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
</ogr:transect_single>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.88013693,1334641.37803237 -1007697.88013693,1334643.37803237 -1007695.88013693,1334643.37803237 -1007695.88013693,1334641.37803237 -1007696.96824319,1334641.37457822 -1007697.88013693,1334641.37803237</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
</ogr:transect_single>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
23
python/plugins/processing/tests/testdata/custom/transect_single.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/custom/transect_single.xsd
vendored
Normal file
@ -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="transect_single" type="ogr:transect_single_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="transect_single_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:LineStringPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
218
python/plugins/processing/tests/testdata/expected/transect_multi_both_2_30.gml
vendored
Normal file
218
python/plugins/processing/tests/testdata/expected/transect_multi_both_2_30.gml
vendored
Normal file
@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ transect_multi_both_2_30.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>-1007700.103336036</gml:X><gml:Y>1334639.053668993</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>-1007694.914623124</gml:X><gml:Y>1334644.343958196</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.0">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.80210557,1334640.12577838 -1007698.10702001,1334641.18723256</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>1</ogr:id>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>0</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.0">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007700.10333604,1334639.55794164 -1007698.40825048,1334640.61939582</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>1</ogr:id>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>1</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.13712611,1334642.34444665 -1007697.62314775,1334640.41161809</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>2</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.9142111,1334643.63685142 -1007698.84606276,1334643.11921332</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>3</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007695.62131788,1334642.41210654 -1007696.13895598,1334644.3439582</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>4</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.84565074,1334641.11768051 -1007694.91462312,1334641.63838423</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>5</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.8341152,1334641.87484381 -1007696.10237118,1334640.87431263</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>6</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.13712611,1334642.34444665 -1007697.62314775,1334640.41161809</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>7</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.89199947,1334640.23943982 -1007697.86067809,1334641.9530256</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>8</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.35470119,1334639.52544647 -1007698.41875089,1334641.52442061</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>9</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.37754666,1334639.49516391 -1007698.51645096,1334641.13921287</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>10</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.7615901,1334640.76580842 -1007696.17489628,1334641.98334802</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>11</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.99965735,1334640.17723724 -1007696.42040905,1334641.4044189</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>12</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.06986252,1334639.97988506 -1007696.50218616,1334641.22181534</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>13</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.16235422,1334639.68902673 -1007696.62385134,1334640.96691909</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>14</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.17714137,1334639.36286998 -1007696.78177133,1334640.79567926</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>15</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_2_30 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.15475949,1334639.05366899 -1007696.88705263,1334640.60057537</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>16</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_2_30>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
74
python/plugins/processing/tests/testdata/expected/transect_multi_both_2_30.xsd
vendored
Normal file
74
python/plugins/processing/tests/testdata/expected/transect_multi_both_2_30.xsd
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<?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="transect_multi_both_2_30" type="ogr:transect_multi_both_2_30_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="transect_multi_both_2_30_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="id" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_FID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_SEGMENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ANGLE" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="6"/>
|
||||
<xs:fractionDigits value="2"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_LENGTH" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="21"/>
|
||||
<xs:fractionDigits value="6"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ORIENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
218
python/plugins/processing/tests/testdata/expected/transect_multi_both_5.gml
vendored
Normal file
218
python/plugins/processing/tests/testdata/expected/transect_multi_both_5.gml
vendored
Normal file
@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ transect_multi_both_5.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>-1007701.464279582</gml:X><gml:Y>1334638.056757714</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>-1007694.109566362</gml:X><gml:Y>1334645.145799323</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.0">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007701.16304911,1334641.82808055 -1007696.74607647,1334639.48493039</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>1</ogr:id>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>0</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.0">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007701.46427958,1334641.26024381 -1007697.04730694,1334638.91709365</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>1</ogr:id>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>1</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.10902512,1334643.14244812 -1007699.65124874,1334639.61361662</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>2</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.11236998,1334641.61026542 -1007699.64790388,1334645.14579932</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>3</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.64790388,1334641.61026542 -1007694.11236998,1334645.14579932</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>4</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.6507075,1334643.14299125 -1007694.10956636,1334639.61307349</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>5</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.96747642,1334643.8745781 -1007696.96900996,1334638.87457834</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>6</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.10902512,1334643.14244812 -1007699.65124874,1334639.61361662</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>7</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007700.87592566,1334641.14167975 -1007695.8767519,1334641.05078567</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>8</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007700.51064797,1334639.20623887 -1007696.26280411,1334641.84362821</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>9</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.01491882,1334638.05675771 -1007696.8790788,1334642.57761907</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>10</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.27795212,1334642.33126242 -1007694.65853426,1334640.41789402</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>11</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.5255265,1334641.73342596 -1007694.8945399,1334639.84823018</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>12</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.61025103,1334641.52170322 -1007694.96179765,1334639.67999718</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>13</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.73802614,1334641.1947684 -1007695.04817942,1334639.46117742</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>14</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.90262417,1334640.69430121 -1007695.05628853,1334639.46424803</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>15</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_both_5 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.98779812,1334640.23263862 -1007695.054014,1334639.42160574</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>16</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_both_5>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
74
python/plugins/processing/tests/testdata/expected/transect_multi_both_5.xsd
vendored
Normal file
74
python/plugins/processing/tests/testdata/expected/transect_multi_both_5.xsd
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<?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="transect_multi_both_5" type="ogr:transect_multi_both_5_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="transect_multi_both_5_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="id" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_FID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_SEGMENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ANGLE" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="6"/>
|
||||
<xs:fractionDigits value="2"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_LENGTH" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="21"/>
|
||||
<xs:fractionDigits value="6"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ORIENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
218
python/plugins/processing/tests/testdata/expected/transect_multi_left_1.gml
vendored
Normal file
218
python/plugins/processing/tests/testdata/expected/transect_multi_left_1.gml
vendored
Normal file
@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ transect_multi_left_1.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>-1007699.25579326</gml:X><gml:Y>1334639.620038699</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>-1007695.171908703</gml:X><gml:Y>1334644.085139151</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.0">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.95456279,1334640.65650547 -1007698.07116826,1334640.18787544</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>1</ogr:id>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>0</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.0">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.25579326,1334640.08866873 -1007698.37239873,1334639.6200387</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>1</ogr:id>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>1</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.88013693,1334641.37803237 -1007698.58858166,1334640.67226607</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>2</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.88013693,1334643.37803237 -1007698.58724371,1334644.08513915</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>3</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007695.88013693,1334643.37803237 -1007695.17303015,1334644.08513915</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>4</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007695.88013693,1334641.37803237 -1007695.1719087,1334640.67204882</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>5</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.96824319,1334641.37457822 -1007696.9685499,1334640.37457827</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>6</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.88013693,1334641.37803237 -1007698.58858166,1334640.67226607</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>7</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.37633878,1334641.09623271 -1007697.37650403,1334641.07805389</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>8</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.38672604,1334640.52493354 -1007697.53715727,1334641.05241141</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>9</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.94699881,1334640.31718839 -1007697.5198308,1334641.22136066</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>10</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.96824319,1334641.37457822 -1007696.04435962,1334640.99190454</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>11</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.2100332,1334640.79082807 -1007696.28383588,1334640.41378891</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>12</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.28602434,1334640.6008502 -1007696.35633366,1334640.23250899</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>13</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.39310278,1334640.32797291 -1007696.45513343,1334639.98125471</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>14</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.47945635,1334640.07927462 -1007696.51018922,1334639.83326398</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>15</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_left_1 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.52090606,1334639.82712218 -1007696.53414924,1334639.6649156</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>16</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_left_1>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
74
python/plugins/processing/tests/testdata/expected/transect_multi_left_1.xsd
vendored
Normal file
74
python/plugins/processing/tests/testdata/expected/transect_multi_left_1.xsd
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<?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="transect_multi_left_1" type="ogr:transect_multi_left_1_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="transect_multi_left_1_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="id" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_FID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_SEGMENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ANGLE" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="6"/>
|
||||
<xs:fractionDigits value="2"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_LENGTH" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="21"/>
|
||||
<xs:fractionDigits value="6"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ORIENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
218
python/plugins/processing/tests/testdata/expected/transect_multi_right_05.gml
vendored
Normal file
218
python/plugins/processing/tests/testdata/expected/transect_multi_right_05.gml
vendored
Normal file
@ -0,0 +1,218 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ transect_multi_right_05.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>-1007699.697490524</gml:X><gml:Y>1334639.82712218</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>-1007695.88013693</gml:X><gml:Y>1334643.37803237</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.0">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.39626005,1334640.89082049 -1007698.95456279,1334640.65650547</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>1</ogr:id>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>0</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.0">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.69749052,1334640.32298375 -1007699.25579326,1334640.08866873</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>1</ogr:id>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>1</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.52591457,1334641.73091552 -1007697.88013693,1334641.37803237</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>2</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.52658354,1334643.02447898 -1007697.88013693,1334643.37803237</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>3</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.23369032,1334643.02447898 -1007695.88013693,1334643.37803237</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>4</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.23425104,1334641.73102415 -1007695.88013693,1334641.37803237</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>5</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.96808984,1334641.8745782 -1007696.96824319,1334641.37457822</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>6</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.52591457,1334641.73091552 -1007697.88013693,1334641.37803237</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>7</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.87625616,1334641.10532212 -1007698.37633878,1334641.09623271</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>8</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.81151043,1334640.26119461 -1007698.38672604,1334640.52493354</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>9</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.16058281,1334639.86510225 -1007697.94699881,1334640.31718839</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>10</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.43018498,1334641.56591506 -1007696.96824319,1334641.37457822</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>11</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.67313186,1334640.97934765 -1007697.2100332,1334640.79082807</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>12</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.75086968,1334640.7850208 -1007697.28602434,1334640.6008502</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>13</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.86208745,1334640.50133201 -1007697.39310278,1334640.32797291</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>14</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.96408991,1334640.20227994 -1007697.47945635,1334640.07927462</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>15</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_multi_right_05 fid="transect_multi.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.01428447,1334639.90822547 -1007697.52090606,1334639.82712218</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:id>3</ogr:id>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>16</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_multi_right_05>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
74
python/plugins/processing/tests/testdata/expected/transect_multi_right_05.xsd
vendored
Normal file
74
python/plugins/processing/tests/testdata/expected/transect_multi_right_05.xsd
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<?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="transect_multi_right_05" type="ogr:transect_multi_right_05_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="transect_multi_right_05_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="id" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_FID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_SEGMENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ANGLE" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="6"/>
|
||||
<xs:fractionDigits value="2"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_LENGTH" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="21"/>
|
||||
<xs:fractionDigits value="6"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ORIENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
201
python/plugins/processing/tests/testdata/expected/transect_single_both_2_30.gml
vendored
Normal file
201
python/plugins/processing/tests/testdata/expected/transect_single_both_2_30.gml
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ transect_single_both_2_30.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>-1007700.103336036</gml:X><gml:Y>1334639.053668993</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>-1007694.914623124</gml:X><gml:Y>1334644.343958196</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.80210557,1334640.12577838 -1007698.10702001,1334641.18723256</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>0</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007700.10333604,1334639.55794164 -1007698.40825048,1334640.61939582</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>1</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.89199947,1334640.23943982 -1007697.86067809,1334641.9530256</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>2</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.35470119,1334639.52544647 -1007698.41875089,1334641.52442061</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>3</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.37754666,1334639.49516391 -1007698.51645096,1334641.13921287</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>4</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.7615901,1334640.76580842 -1007696.17489628,1334641.98334802</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>5</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.99965735,1334640.17723724 -1007696.42040905,1334641.4044189</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>6</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.06986252,1334639.97988506 -1007696.50218616,1334641.22181534</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>7</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.16235422,1334639.68902673 -1007696.62385134,1334640.96691909</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>8</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.17714137,1334639.36286998 -1007696.78177133,1334640.79567926</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>9</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.15475949,1334639.05366899 -1007696.88705263,1334640.60057537</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>10</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.13712611,1334642.34444665 -1007697.62314775,1334640.41161809</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>11</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.9142111,1334643.63685142 -1007698.84606276,1334643.11921332</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>12</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007695.62131788,1334642.41210654 -1007696.13895598,1334644.3439582</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>13</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.84565074,1334641.11768051 -1007694.91462312,1334641.63838423</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>14</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.8341152,1334641.87484381 -1007696.10237118,1334640.87431263</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>15</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_2_30 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.13712611,1334642.34444665 -1007697.62314775,1334640.41161809</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>16</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>30.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>2.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_2_30>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
67
python/plugins/processing/tests/testdata/expected/transect_single_both_2_30.xsd
vendored
Normal file
67
python/plugins/processing/tests/testdata/expected/transect_single_both_2_30.xsd
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
<?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="transect_single_both_2_30" type="ogr:transect_single_both_2_30_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="transect_single_both_2_30_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="TR_FID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_SEGMENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ANGLE" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="6"/>
|
||||
<xs:fractionDigits value="2"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_LENGTH" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="21"/>
|
||||
<xs:fractionDigits value="6"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ORIENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
201
python/plugins/processing/tests/testdata/expected/transect_single_both_5.gml
vendored
Normal file
201
python/plugins/processing/tests/testdata/expected/transect_single_both_5.gml
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ transect_single_both_5.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>-1007701.464279582</gml:X><gml:Y>1334638.056757714</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>-1007694.109566362</gml:X><gml:Y>1334645.145799323</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007701.16304911,1334641.82808055 -1007696.74607647,1334639.48493039</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>0</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007701.46427958,1334641.26024381 -1007697.04730694,1334638.91709365</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>1</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007700.87592566,1334641.14167975 -1007695.8767519,1334641.05078567</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>2</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007700.51064797,1334639.20623887 -1007696.26280411,1334641.84362821</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>3</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.01491882,1334638.05675771 -1007696.8790788,1334642.57761907</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>4</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.27795212,1334642.33126242 -1007694.65853426,1334640.41789402</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>5</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.5255265,1334641.73342596 -1007694.8945399,1334639.84823018</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>6</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.61025103,1334641.52170322 -1007694.96179765,1334639.67999718</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>7</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.73802614,1334641.1947684 -1007695.04817942,1334639.46117742</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>8</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.90262417,1334640.69430121 -1007695.05628853,1334639.46424803</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>9</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.98779812,1334640.23263862 -1007695.054014,1334639.42160574</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>10</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.10902512,1334643.14244812 -1007699.65124874,1334639.61361662</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>11</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.11236998,1334641.61026542 -1007699.64790388,1334645.14579932</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>12</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.64790388,1334641.61026542 -1007694.11236998,1334645.14579932</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>13</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.6507075,1334643.14299125 -1007694.10956636,1334639.61307349</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>14</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.96747642,1334643.8745781 -1007696.96900996,1334638.87457834</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>15</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_both_5 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.10902512,1334643.14244812 -1007699.65124874,1334639.61361662</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>16</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>5.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>2</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_both_5>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
67
python/plugins/processing/tests/testdata/expected/transect_single_both_5.xsd
vendored
Normal file
67
python/plugins/processing/tests/testdata/expected/transect_single_both_5.xsd
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
<?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="transect_single_both_5" type="ogr:transect_single_both_5_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="transect_single_both_5_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="TR_FID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_SEGMENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ANGLE" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="6"/>
|
||||
<xs:fractionDigits value="2"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_LENGTH" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="21"/>
|
||||
<xs:fractionDigits value="6"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ORIENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
201
python/plugins/processing/tests/testdata/expected/transect_single_left_1.gml
vendored
Normal file
201
python/plugins/processing/tests/testdata/expected/transect_single_left_1.gml
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ transect_single_left_1.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>-1007699.25579326</gml:X><gml:Y>1334639.620038699</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>-1007695.171908703</gml:X><gml:Y>1334644.085139151</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.95456279,1334640.65650547 -1007698.07116826,1334640.18787544</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>0</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.25579326,1334640.08866873 -1007698.37239873,1334639.6200387</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>1</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.37633878,1334641.09623271 -1007697.37650403,1334641.07805389</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>2</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.38672604,1334640.52493354 -1007697.53715727,1334641.05241141</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>3</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.94699881,1334640.31718839 -1007697.5198308,1334641.22136066</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>4</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.96824319,1334641.37457822 -1007696.04435962,1334640.99190454</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>5</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.2100332,1334640.79082807 -1007696.28383588,1334640.41378891</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>6</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.28602434,1334640.6008502 -1007696.35633366,1334640.23250899</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>7</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.39310278,1334640.32797291 -1007696.45513343,1334639.98125471</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>8</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.47945635,1334640.07927462 -1007696.51018922,1334639.83326398</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>9</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.52090606,1334639.82712218 -1007696.53414924,1334639.6649156</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>10</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.88013693,1334641.37803237 -1007698.58858166,1334640.67226607</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>11</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.88013693,1334643.37803237 -1007698.58724371,1334644.08513915</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>12</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007695.88013693,1334643.37803237 -1007695.17303015,1334644.08513915</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>13</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007695.88013693,1334641.37803237 -1007695.1719087,1334640.67204882</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>14</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.96824319,1334641.37457822 -1007696.9685499,1334640.37457827</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>15</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_left_1 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.88013693,1334641.37803237 -1007698.58858166,1334640.67226607</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>16</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>1.000000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>0</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_left_1>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
67
python/plugins/processing/tests/testdata/expected/transect_single_left_1.xsd
vendored
Normal file
67
python/plugins/processing/tests/testdata/expected/transect_single_left_1.xsd
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
<?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="transect_single_left_1" type="ogr:transect_single_left_1_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="transect_single_left_1_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="TR_FID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_SEGMENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ANGLE" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="6"/>
|
||||
<xs:fractionDigits value="2"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_LENGTH" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="21"/>
|
||||
<xs:fractionDigits value="6"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ORIENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
201
python/plugins/processing/tests/testdata/expected/transect_single_right_05.gml
vendored
Normal file
201
python/plugins/processing/tests/testdata/expected/transect_single_right_05.gml
vendored
Normal file
@ -0,0 +1,201 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ transect_single_right_05.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>-1007699.697490524</gml:X><gml:Y>1334639.82712218</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>-1007695.88013693</gml:X><gml:Y>1334643.37803237</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.39626005,1334640.89082049 -1007698.95456279,1334640.65650547</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>0</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007699.69749052,1334640.32298375 -1007699.25579326,1334640.08866873</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>0</ogr:TR_FID>
|
||||
<ogr:TR_ID>1</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.87625616,1334641.10532212 -1007698.37633878,1334641.09623271</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>2</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.81151043,1334640.26119461 -1007698.38672604,1334640.52493354</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>3</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.16058281,1334639.86510225 -1007697.94699881,1334640.31718839</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>1</ogr:TR_FID>
|
||||
<ogr:TR_ID>4</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.43018498,1334641.56591506 -1007696.96824319,1334641.37457822</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>5</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.67313186,1334640.97934765 -1007697.2100332,1334640.79082807</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>6</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.75086968,1334640.7850208 -1007697.28602434,1334640.6008502</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>7</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.86208745,1334640.50133201 -1007697.39310278,1334640.32797291</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>8</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.96408991,1334640.20227994 -1007697.47945635,1334640.07927462</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>9</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007698.01428447,1334639.90822547 -1007697.52090606,1334639.82712218</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>2</ogr:TR_FID>
|
||||
<ogr:TR_ID>10</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.52591457,1334641.73091552 -1007697.88013693,1334641.37803237</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>11</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>1</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.52658354,1334643.02447898 -1007697.88013693,1334643.37803237</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>12</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>2</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.23369032,1334643.02447898 -1007695.88013693,1334643.37803237</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>13</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>3</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.23425104,1334641.73102415 -1007695.88013693,1334641.37803237</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>14</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>4</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007696.96808984,1334641.8745782 -1007696.96824319,1334641.37457822</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>15</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>5</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:transect_single_right_05 fid="4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:2154"><gml:coordinates>-1007697.52591457,1334641.73091552 -1007697.88013693,1334641.37803237</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:TR_FID>3</ogr:TR_FID>
|
||||
<ogr:TR_ID>16</ogr:TR_ID>
|
||||
<ogr:TR_SEGMENT>6</ogr:TR_SEGMENT>
|
||||
<ogr:TR_ANGLE>90.00</ogr:TR_ANGLE>
|
||||
<ogr:TR_LENGTH>0.500000</ogr:TR_LENGTH>
|
||||
<ogr:TR_ORIENT>1</ogr:TR_ORIENT>
|
||||
</ogr:transect_single_right_05>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
67
python/plugins/processing/tests/testdata/expected/transect_single_right_05.xsd
vendored
Normal file
67
python/plugins/processing/tests/testdata/expected/transect_single_right_05.xsd
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
<?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="transect_single_right_05" type="ogr:transect_single_right_05_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="transect_single_right_05_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="TR_FID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ID" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_SEGMENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="10"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ANGLE" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="6"/>
|
||||
<xs:fractionDigits value="2"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_LENGTH" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="21"/>
|
||||
<xs:fractionDigits value="6"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="TR_ORIENT" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="1"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
@ -4187,3 +4187,115 @@ tests:
|
||||
OUTPUT:
|
||||
name: expected/assign_projection.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: native:transect
|
||||
name: Transect single left 90.0 1m
|
||||
params:
|
||||
ANGLE: 90.0
|
||||
LENGTH: 1.0
|
||||
INPUT:
|
||||
name: custom/transect_single.gml
|
||||
type: vector
|
||||
SIDE: 0
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/transect_single_left_1.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: native:transect
|
||||
name: Transect single right 90.0 0.5m
|
||||
params:
|
||||
ANGLE: 90.0
|
||||
LENGTH: 0.5
|
||||
INPUT:
|
||||
name: custom/transect_single.gml
|
||||
type: vector
|
||||
SIDE: 1
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/transect_single_right_05.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: native:transect
|
||||
name: Transect single both 90.0 5m
|
||||
params:
|
||||
ANGLE: 90.0
|
||||
INPUT:
|
||||
name: custom/transect_single.gml
|
||||
type: vector
|
||||
LENGTH: 5
|
||||
SIDE: 2
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/transect_single_both_5.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: native:transect
|
||||
name: Transect single both 30.0 2m
|
||||
params:
|
||||
ANGLE: 30.0
|
||||
INPUT:
|
||||
name: custom/transect_single.gml
|
||||
type: vector
|
||||
LENGTH: 2.0
|
||||
SIDE: 2
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/transect_single_both_2_30.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: native:transect
|
||||
name: Transect multi left 90.0 1m
|
||||
params:
|
||||
ANGLE: 90.0
|
||||
LENGTH: 1.0
|
||||
INPUT:
|
||||
name: custom/transect_multi.gml
|
||||
type: vector
|
||||
SIDE: 0
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/transect_multi_left_1.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: native:transect
|
||||
name: Transect multi right 90.0 0.5m
|
||||
params:
|
||||
ANGLE: 90.0
|
||||
LENGTH: 0.5
|
||||
INPUT:
|
||||
name: custom/transect_multi.gml
|
||||
type: vector
|
||||
SIDE: 1
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/transect_multi_right_05.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: native:transect
|
||||
name: Transect multi both 90.0 5m
|
||||
params:
|
||||
ANGLE: 90.0
|
||||
INPUT:
|
||||
name: custom/transect_multi.gml
|
||||
type: vector
|
||||
LENGTH: 5
|
||||
SIDE: 2
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/transect_multi_both_5.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: native:transect
|
||||
name: Transect multi both 30.0 2m
|
||||
params:
|
||||
ANGLE: 30.0
|
||||
INPUT:
|
||||
name: custom/transect_multi.gml
|
||||
type: vector
|
||||
LENGTH: 2.0
|
||||
SIDE: 2
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/transect_multi_both_2_30.gml
|
||||
type: vector
|
||||
|
@ -54,6 +54,7 @@ SET(QGIS_ANALYSIS_SRCS
|
||||
processing/qgsalgorithmsmooth.cpp
|
||||
processing/qgsalgorithmsplitwithlines.cpp
|
||||
processing/qgsalgorithmsubdivide.cpp
|
||||
processing/qgsalgorithmtransect.cpp
|
||||
processing/qgsalgorithmtransform.cpp
|
||||
processing/qgsnativealgorithms.cpp
|
||||
|
||||
|
192
src/analysis/processing/qgsalgorithmtransect.cpp
Normal file
192
src/analysis/processing/qgsalgorithmtransect.cpp
Normal file
@ -0,0 +1,192 @@
|
||||
/***************************************************************************
|
||||
qgsalgorithmtransect.cpp
|
||||
-------------------------
|
||||
begin : October 2017
|
||||
copyright : (C) 2017 by Loïc Bartoletti
|
||||
email : lbartoletti at tuxfamily dot org
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "qgsalgorithmtransect.h"
|
||||
#include "qgsmultilinestring.h"
|
||||
#include "qgslinestring.h"
|
||||
|
||||
///@cond PRIVATE
|
||||
|
||||
QString QgsTransectAlgorithm::name() const
|
||||
{
|
||||
return QStringLiteral( "transect" );
|
||||
}
|
||||
|
||||
QString QgsTransectAlgorithm::displayName() const
|
||||
{
|
||||
return QObject::tr( "Transect" );
|
||||
}
|
||||
|
||||
QStringList QgsTransectAlgorithm::tags() const
|
||||
{
|
||||
return QObject::tr( "transect,station,lines,extend," ).split( ',' );
|
||||
}
|
||||
|
||||
QString QgsTransectAlgorithm::group() const
|
||||
{
|
||||
return QObject::tr( "Vector geometry" );
|
||||
}
|
||||
|
||||
void QgsTransectAlgorithm::initAlgorithm( const QVariantMap & )
|
||||
{
|
||||
addParameter( new QgsProcessingParameterFeatureSource( QStringLiteral( "INPUT" ),
|
||||
QObject::tr( "Input layer" ), QList< int >() << QgsProcessing::TypeVectorLine ) );
|
||||
addParameter( new QgsProcessingParameterNumber( QStringLiteral( "LENGTH" ), QObject::tr( "Length of the transect " ), QgsProcessingParameterNumber::Double,
|
||||
5.0, false, 0 ) );
|
||||
addParameter( new QgsProcessingParameterNumber( QStringLiteral( "ANGLE" ), QObject::tr( "Angle in degrees from the original line at the vertices" ), QgsProcessingParameterNumber::Double,
|
||||
90.0, false, 0, 360 ) );
|
||||
addParameter( new QgsProcessingParameterEnum( QStringLiteral( "SIDE" ), QObject::tr( "Side to create the transects" ), QStringList() << QObject::tr( "Left" ) << QObject::tr( "Right" ) << QObject::tr( "Both" ), false ) );
|
||||
addParameter( new QgsProcessingParameterFeatureSink( QStringLiteral( "OUTPUT" ), QObject::tr( "Transect" ), QgsProcessing::TypeVectorLine ) );
|
||||
|
||||
}
|
||||
|
||||
QString QgsTransectAlgorithm::shortHelpString() const
|
||||
{
|
||||
|
||||
return QObject::tr( "This algorithm creates transects on vertices for (multi)linestring.\n" ) +
|
||||
QObject::tr( "A transect is a line oriented from an angle (by default perpendicular) to the input polylines (at vertices)." ) +
|
||||
QStringLiteral( "\n\n" ) +
|
||||
QObject::tr( "Field(s) from feature(s) are returned in the transect with these new fields:\n" ) +
|
||||
QObject::tr( "- TR_FID: ID of the original feature\n" ) +
|
||||
QObject::tr( "- TR_ID: ID of the transect. Each transect have an unique ID\n" ) +
|
||||
QObject::tr( "- TR_SEGMENT: ID of the segment of the linestring\n" ) +
|
||||
QObject::tr( "- TR_ANGLE: Angle in degrees from the original line at the vertex\n" ) +
|
||||
QObject::tr( "- TR_LENGTH: Total length of the transect returned\n" ) +
|
||||
QObject::tr( "- TR_ORIENT: Side of the transect (only on the left or right of the line, or both side)\n" );
|
||||
|
||||
}
|
||||
|
||||
QgsTransectAlgorithm *QgsTransectAlgorithm::createInstance() const
|
||||
{
|
||||
return new QgsTransectAlgorithm();
|
||||
}
|
||||
|
||||
QVariantMap QgsTransectAlgorithm::processAlgorithm( const QVariantMap ¶meters, QgsProcessingContext &context, QgsProcessingFeedback *feedback )
|
||||
{
|
||||
Side orientation = static_cast< QgsTransectAlgorithm::Side >( parameterAsInt( parameters, QStringLiteral( "SIDE" ), context ) );
|
||||
double angle = fabs( parameterAsDouble( parameters, QStringLiteral( "ANGLE" ), context ) );
|
||||
double length = parameterAsDouble( parameters, QStringLiteral( "LENGTH" ), context );
|
||||
|
||||
if ( orientation == QgsTransectAlgorithm::Both )
|
||||
length /= 2.0;
|
||||
|
||||
std::unique_ptr< QgsFeatureSource > source( parameterAsSource( parameters, QStringLiteral( "INPUT" ), context ) );
|
||||
if ( !source )
|
||||
return QVariantMap();
|
||||
|
||||
QgsFields fields = source->fields();
|
||||
|
||||
fields.append( QgsField( QStringLiteral( "TR_FID" ), QVariant::Int, QString(), 20 ) );
|
||||
fields.append( QgsField( QStringLiteral( "TR_ID" ), QVariant::Int, QString(), 20 ) );
|
||||
fields.append( QgsField( QStringLiteral( "TR_SEGMENT" ), QVariant::Int, QString(), 20 ) );
|
||||
fields.append( QgsField( QStringLiteral( "TR_ANGLE" ), QVariant::Double, QString(), 5, 2 ) );
|
||||
fields.append( QgsField( QStringLiteral( "TR_LENGTH" ), QVariant::Double, QString(), 20, 6 ) );
|
||||
fields.append( QgsField( QStringLiteral( "TR_ORIENT" ), QVariant::Int, QString(), 1 ) );
|
||||
|
||||
QgsWkbTypes::Type outputWkb = QgsWkbTypes::LineString;
|
||||
if ( QgsWkbTypes::hasZ( source->wkbType() ) )
|
||||
outputWkb = QgsWkbTypes::addZ( outputWkb );
|
||||
if ( QgsWkbTypes::hasM( source->wkbType() ) )
|
||||
outputWkb = QgsWkbTypes::addM( outputWkb );
|
||||
|
||||
QString dest;
|
||||
std::unique_ptr< QgsFeatureSink > sink( parameterAsSink( parameters, QStringLiteral( "OUTPUT" ), context, dest, fields,
|
||||
outputWkb, source->sourceCrs() ) );
|
||||
if ( !sink )
|
||||
return QVariantMap();
|
||||
|
||||
QgsFeatureIterator features = source->getFeatures( );
|
||||
|
||||
int current = -1;
|
||||
int number = 0;
|
||||
double step = source->featureCount() > 0 ? 100.0 / source->featureCount() : 1;
|
||||
QgsFeature feat;
|
||||
|
||||
|
||||
while ( features.nextFeature( feat ) )
|
||||
{
|
||||
current++;
|
||||
if ( feedback->isCanceled() )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
feedback->setProgress( current * step );
|
||||
if ( !feat.hasGeometry() )
|
||||
continue;
|
||||
|
||||
QgsGeometry inputGeometry = feat.geometry();
|
||||
|
||||
inputGeometry.convertToMultiType();
|
||||
const QgsMultiLineString *multiLine = static_cast< QgsMultiLineString * >( inputGeometry.geometry() );
|
||||
for ( int id = 0; id < multiLine->numGeometries(); ++id )
|
||||
{
|
||||
const QgsLineString *line = static_cast< const QgsLineString * >( multiLine->geometryN( id ) );
|
||||
QgsAbstractGeometry::vertex_iterator it = line->vertices_begin();
|
||||
while ( it != line->vertices_end() )
|
||||
{
|
||||
QgsVertexId vertexId = it.vertexId();
|
||||
int i = vertexId.vertex;
|
||||
QgsFeature outFeat;
|
||||
QgsAttributes attrs = feat.attributes();
|
||||
attrs << current << number << i + 1 << angle <<
|
||||
( ( orientation == QgsTransectAlgorithm::Both ) ? length * 2 : length ) <<
|
||||
orientation;
|
||||
outFeat.setAttributes( attrs );
|
||||
double angleAtVertex = line->vertexAngle( vertexId );
|
||||
outFeat.setGeometry( calcTransect( *it, angleAtVertex, length, orientation, angle ) );
|
||||
sink->addFeature( outFeat, QgsFeatureSink::FastInsert );
|
||||
number++;
|
||||
it++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
QVariantMap outputs;
|
||||
outputs.insert( QStringLiteral( "OUTPUT" ), dest );
|
||||
return outputs;
|
||||
}
|
||||
|
||||
|
||||
QgsGeometry QgsTransectAlgorithm::calcTransect( const QgsPoint &point, const double angleAtVertex, const double length, const QgsTransectAlgorithm::Side orientation, const double angle )
|
||||
{
|
||||
QgsPoint pLeft; // left point of the line
|
||||
QgsPoint pRight; // right point of the line
|
||||
|
||||
QgsPolyline line;
|
||||
|
||||
if ( ( orientation == QgsTransectAlgorithm::Right ) || ( orientation == QgsTransectAlgorithm::Both ) )
|
||||
{
|
||||
pLeft = point.project( length, angle + 180.0 / M_PI * angleAtVertex );
|
||||
if ( orientation != QgsTransectAlgorithm::Both )
|
||||
pRight = point;
|
||||
}
|
||||
|
||||
if ( ( orientation == QgsTransectAlgorithm::Left ) || ( orientation == QgsTransectAlgorithm::Both ) )
|
||||
{
|
||||
pRight = point.project( -length, angle + 180.0 / M_PI * angleAtVertex );
|
||||
if ( orientation != QgsTransectAlgorithm::Both )
|
||||
pLeft = point;
|
||||
}
|
||||
|
||||
line.append( pLeft );
|
||||
line.append( pRight );
|
||||
|
||||
return QgsGeometry::fromPolyline( line );
|
||||
}
|
||||
|
||||
///@endcond
|
74
src/analysis/processing/qgsalgorithmtransect.h
Normal file
74
src/analysis/processing/qgsalgorithmtransect.h
Normal file
@ -0,0 +1,74 @@
|
||||
/***************************************************************************
|
||||
qgsalgorithmtransect.h
|
||||
-------------------------
|
||||
begin : October 2017
|
||||
copyright : (C) 2017 by Loïc Bartoletti
|
||||
email : lbartoletti at tuxfamily dot org
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#ifndef QGSALGORITHMTRANSECT_H
|
||||
#define QGSALGORITHMTRANSECT_H
|
||||
|
||||
#define SIP_NO_FILE
|
||||
|
||||
#include "qgis.h"
|
||||
#include "qgsprocessingalgorithm.h"
|
||||
|
||||
///@cond PRIVATE
|
||||
|
||||
/**
|
||||
* Native transect algorithm.
|
||||
*/
|
||||
class QgsTransectAlgorithm : public QgsProcessingAlgorithm
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
* Draw the transect on which side of the line
|
||||
*/
|
||||
enum Side
|
||||
{
|
||||
Left,
|
||||
Right,
|
||||
Both
|
||||
};
|
||||
QgsTransectAlgorithm() = default;
|
||||
void initAlgorithm( const QVariantMap &configuration = QVariantMap() ) override;
|
||||
QString name() const override;
|
||||
QString displayName() const override;
|
||||
virtual QStringList tags() const override;
|
||||
QString group() const override;
|
||||
QString shortHelpString() const override;
|
||||
QgsTransectAlgorithm *createInstance() const override SIP_FACTORY;
|
||||
|
||||
protected:
|
||||
|
||||
virtual QVariantMap processAlgorithm( const QVariantMap ¶meters,
|
||||
QgsProcessingContext &context, QgsProcessingFeedback *feedback ) override;
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* Returns the transect of the point \a point with \a length, \a orientation and \a angle.
|
||||
* \param point The vertex
|
||||
* \param angleAtVertex Angle at the vertex
|
||||
* \param length Length of the transect Distance to extend line from input feature
|
||||
* \param orientation Orientation of the transect
|
||||
* \param angle Angle of the transect relative to the segment [\a p1 - \a p2] (degrees clockwise)
|
||||
*/
|
||||
QgsGeometry calcTransect( const QgsPoint &point, const double angleAtVertex, const double length, const Side orientation, const double angle );
|
||||
};
|
||||
|
||||
///@endcond PRIVATE
|
||||
|
||||
#endif // QGSALGORITHMTRANSECT_H
|
@ -49,6 +49,7 @@
|
||||
#include "qgsalgorithmsmooth.h"
|
||||
#include "qgsalgorithmsplitwithlines.h"
|
||||
#include "qgsalgorithmsubdivide.h"
|
||||
#include "qgsalgorithmtransect.h"
|
||||
#include "qgsalgorithmtransform.h"
|
||||
|
||||
///@cond PRIVATE
|
||||
@ -120,6 +121,7 @@ void QgsNativeAlgorithms::loadAlgorithms()
|
||||
addAlgorithm( new QgsBoundaryAlgorithm() );
|
||||
addAlgorithm( new QgsDropGeometryAlgorithm() );
|
||||
addAlgorithm( new QgsDropMZValuesAlgorithm() );
|
||||
addAlgorithm( new QgsTransectAlgorithm() );
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user