mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
[processing] tests for OGR-based algorithms
This commit is contained in:
parent
fd12d29615
commit
ff75873eb8
@ -325,8 +325,8 @@ class GdalUtils(object):
|
||||
@staticmethod
|
||||
def ogrLayerName(uri):
|
||||
uri = uri.strip('"')
|
||||
if os.path.isfile(uri):
|
||||
return os.path.basename(os.path.splitext(uri)[0])
|
||||
#if os.path.isfile(uri):
|
||||
# return os.path.basename(os.path.splitext(uri)[0])
|
||||
|
||||
if ' table=' in uri:
|
||||
# table="schema"."table"
|
||||
|
File diff suppressed because one or more lines are too long
23
python/plugins/processing/tests/testdata/expected/gdal/buffer_lines.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/gdal/buffer_lines.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="buffer_lines" type="ogr:buffer_lines_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="buffer_lines_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:MultiPolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
19
python/plugins/processing/tests/testdata/expected/gdal/buffer_lines_dissolve.gml
vendored
Normal file
19
python/plugins/processing/tests/testdata/expected/gdal/buffer_lines_dissolve.gml
vendored
Normal file
File diff suppressed because one or more lines are too long
23
python/plugins/processing/tests/testdata/expected/gdal/buffer_lines_dissolve.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/gdal/buffer_lines_dissolve.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="buffer_lines_dissolve" type="ogr:buffer_lines_dissolve_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="buffer_lines_dissolve_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:MultiPolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
File diff suppressed because one or more lines are too long
45
python/plugins/processing/tests/testdata/expected/gdal/buffer_polys.xsd
vendored
Normal file
45
python/plugins/processing/tests/testdata/expected/gdal/buffer_polys.xsd
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
<?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="buffer_polys" type="ogr:buffer_polys_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="buffer_polys_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:MultiPolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="name" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="80"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="intval" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="9"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="floatval" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="24"/>
|
||||
<xs:fractionDigits value="15"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation=""
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ buffer_polys_dissolve.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
|
45
python/plugins/processing/tests/testdata/expected/gdal/buffer_polys_dissolve.xsd
vendored
Normal file
45
python/plugins/processing/tests/testdata/expected/gdal/buffer_polys_dissolve.xsd
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
<?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="buffer_polys_dissolve" type="ogr:buffer_polys_dissolve_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="buffer_polys_dissolve_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:MultiPolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="name" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="80"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="intval" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="9"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="floatval" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="24"/>
|
||||
<xs:fractionDigits value="15"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
33
python/plugins/processing/tests/testdata/expected/gdal/clip_lines.gml
vendored
Normal file
33
python/plugins/processing/tests/testdata/expected/gdal/clip_lines.gml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ clip_lines.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>4.430364372469636</gml:X><gml:Y>-2.103238866396762</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>8.630364372469638</gml:X><gml:Y>2</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:clip_lines fid="lines.0">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>6,2 8.63036437246964,2.0</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:clip_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:clip_lines fid="lines.3">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>4.43036437246964,1.0 5,1</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:clip_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:clip_lines fid="lines.5">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>6.89676113360324,-2.10323886639676 8.63036437246964,-0.369635627530362</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:clip_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:clip_lines fid="lines.6">
|
||||
</ogr:clip_lines>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
23
python/plugins/processing/tests/testdata/expected/gdal/clip_lines.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/gdal/clip_lines.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="clip_lines" type="ogr:clip_lines_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="clip_lines_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:MultiLineStringPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
29
python/plugins/processing/tests/testdata/expected/gdal/clip_lines_by_multipolygon.gml
vendored
Normal file
29
python/plugins/processing/tests/testdata/expected/gdal/clip_lines_by_multipolygon.gml
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ clip_lines_by_multipolygon.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>2</gml:X><gml:Y>1</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>8</gml:X><gml:Y>3</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:clip_lines_by_multipolygon fid="lines.0">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>7,2 8,2</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:clip_lines_by_multipolygon>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:clip_lines_by_multipolygon fid="lines.2">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>2,1 2,2</gml:coordinates></gml:LineString></gml:lineStringMember><gml:lineStringMember><gml:LineString><gml:coordinates>2,2 3,2</gml:coordinates></gml:LineString></gml:lineStringMember><gml:lineStringMember><gml:LineString><gml:coordinates>3,2 3,3</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:clip_lines_by_multipolygon>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:clip_lines_by_multipolygon fid="lines.3">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>3,1 4,1</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:clip_lines_by_multipolygon>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
23
python/plugins/processing/tests/testdata/expected/gdal/clip_lines_by_multipolygon.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/gdal/clip_lines_by_multipolygon.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="clip_lines_by_multipolygon" type="ogr:clip_lines_by_multipolygon_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="clip_lines_by_multipolygon_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:MultiLineStringPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
33
python/plugins/processing/tests/testdata/expected/gdal/clip_lines_by_polygon.gml
vendored
Normal file
33
python/plugins/processing/tests/testdata/expected/gdal/clip_lines_by_polygon.gml
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ clip_lines_by_polygon.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>-1</gml:X><gml:Y>-3</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>10</gml:X><gml:Y>1</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:clip_lines_by_polygon fid="lines.1">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>-1,-1 1,-1</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:clip_lines_by_polygon>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:clip_lines_by_polygon fid="lines.4">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>7,-3 10,-3</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:clip_lines_by_polygon>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:clip_lines_by_polygon fid="lines.5">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>6,-3 7,-2</gml:coordinates></gml:LineString></gml:lineStringMember><gml:lineStringMember><gml:LineString><gml:coordinates>9,0 10,1</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:clip_lines_by_polygon>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:clip_lines_by_polygon fid="lines.6">
|
||||
</ogr:clip_lines_by_polygon>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
23
python/plugins/processing/tests/testdata/expected/gdal/clip_lines_by_polygon.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/gdal/clip_lines_by_polygon.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="clip_lines_by_polygon" type="ogr:clip_lines_by_polygon_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="clip_lines_by_polygon_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:MultiLineStringPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
49
python/plugins/processing/tests/testdata/expected/gdal/clip_points_by_polygon.gml
vendored
Normal file
49
python/plugins/processing/tests/testdata/expected/gdal/clip_points_by_polygon.gml
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ clip_points_by_polygon.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>0</gml:X><gml:Y>-1</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>7</gml:X><gml:Y>3</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:clip_points_by_polygon fid="points.0">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>1,1</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:id>1</ogr:id>
|
||||
<ogr:id2>2</ogr:id2>
|
||||
</ogr:clip_points_by_polygon>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:clip_points_by_polygon fid="points.1">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>3,3</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:id>2</ogr:id>
|
||||
<ogr:id2>1</ogr:id2>
|
||||
</ogr:clip_points_by_polygon>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:clip_points_by_polygon fid="points.4">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>4,1</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:id>5</ogr:id>
|
||||
<ogr:id2>1</ogr:id2>
|
||||
</ogr:clip_points_by_polygon>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:clip_points_by_polygon fid="points.7">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>7,-1</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:id>8</ogr:id>
|
||||
<ogr:id2>0</ogr:id2>
|
||||
</ogr:clip_points_by_polygon>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:clip_points_by_polygon fid="points.8">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>0,-1</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:id>9</ogr:id>
|
||||
<ogr:id2>0</ogr:id2>
|
||||
</ogr:clip_points_by_polygon>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
37
python/plugins/processing/tests/testdata/expected/gdal/clip_points_by_polygon.xsd
vendored
Normal file
37
python/plugins/processing/tests/testdata/expected/gdal/clip_points_by_polygon.xsd
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
<?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="clip_points_by_polygon" type="ogr:clip_points_by_polygon_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="clip_points_by_polygon_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:PointPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="id" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="9"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="id2" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="9"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
22
python/plugins/processing/tests/testdata/expected/gdal/execute_sql.gml
vendored
Normal file
22
python/plugins/processing/tests/testdata/expected/gdal/execute_sql.gml
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ execute_sql.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>2</gml:X><gml:Y>-3</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>6</gml:X><gml:Y>2</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:execute_sql fid="polys.5">
|
||||
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:4326"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3,2 6,1 6,-3 2,-1 2,2 3,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
|
||||
<ogr:name>elim</ogr:name>
|
||||
<ogr:intval>2</ogr:intval>
|
||||
<ogr:floatval>3.330000000000000</ogr:floatval>
|
||||
</ogr:execute_sql>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
45
python/plugins/processing/tests/testdata/expected/gdal/execute_sql.xsd
vendored
Normal file
45
python/plugins/processing/tests/testdata/expected/gdal/execute_sql.xsd
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
<?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="execute_sql" type="ogr:execute_sql_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="execute_sql_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:MultiPolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="name" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="5"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="intval" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="9"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="floatval" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
<xs:totalDigits value="24"/>
|
||||
<xs:fractionDigits value="15"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation=""
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ offset_lines.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
@ -13,36 +13,32 @@
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:offset_lines fid="lines.0">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>11.3535533905933,4.64644660940673 9.5,2.79289321881345 9.5,2.0 9.4975923633361,1.95099142983522 9.49039264020162,1.90245483899194 9.4784701678661,1.85485766137277 9.46193976625564,1.80865828381746 9.44096063217418,1.764301631587 9.41573480615127,1.7222148834902 9.38650522668137,1.68280335791818 9.35355339059327,1.64644660940673 9.31719664208182,1.61349477331863 9.2777851165098,1.58426519384873 9.235698368413,1.55903936782582 9.19134171618255,1.53806023374436 9.14514233862723,1.5215298321339 9.09754516100806,1.50960735979838 9.04900857016478,1.5024076366639 9.0,1.5 6.0,1.5</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>11.3535533905933,4.64644660940673 9.5,2.79289321881345 9.5,2.0 9.4975923633361,1.95099142983522 9.49039264020162,1.90245483899194 9.4784701678661,1.85485766137277 9.46193976625564,1.80865828381746 9.44096063217418,1.764301631587 9.41573480615127,1.7222148834902 9.38650522668137,1.68280335791818 9.35355339059327,1.64644660940673 9.31719664208182,1.61349477331863 9.2777851165098,1.58426519384873 9.235698368413,1.55903936782582 9.19134171618255,1.53806023374436 9.14514233862723,1.5215298321339 9.09754516100806,1.50960735979838 9.04900857016478,1.5024076366639 9.0,1.5 6.0,1.5</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:offset_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:offset_lines fid="lines.1">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>1.0,-1.5 -1.0,-1.5</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>1.0,-1.5 -1.0,-1.5</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:offset_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:offset_lines fid="lines.2">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>3.5,3.0 3.5,2.0 3.4975923633361,1.95099142983522 3.49039264020162,1.90245483899194 3.4784701678661,1.85485766137277 3.46193976625564,1.80865828381746 3.44096063217418,1.764301631587 3.41573480615127,1.7222148834902 3.38650522668137,1.68280335791818 3.35355339059327,1.64644660940673 3.31719664208182,1.61349477331863 3.2777851165098,1.58426519384873 3.235698368413,1.55903936782582 3.19134171618254,1.53806023374436 3.14514233862723,1.5215298321339 3.09754516100806,1.50960735979838 3.04900857016478,1.5024076366639 3.0,1.5 2.5,1.5 2.5,0.0</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>3.5,3.0 3.5,2.0 3.4975923633361,1.95099142983522 3.49039264020162,1.90245483899194 3.4784701678661,1.85485766137277 3.46193976625564,1.80865828381746 3.44096063217418,1.764301631587 3.41573480615127,1.7222148834902 3.38650522668137,1.68280335791818 3.35355339059327,1.64644660940673 3.31719664208182,1.61349477331863 3.2777851165098,1.58426519384873 3.235698368413,1.55903936782582 3.19134171618254,1.53806023374436 3.14514233862723,1.5215298321339 3.09754516100806,1.50960735979838 3.04900857016478,1.5024076366639 3.0,1.5 2.5,1.5 2.5,0.0</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:offset_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:offset_lines fid="lines.3">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>5.0,0.5 3.0,0.5</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>5.0,0.5 3.0,0.5</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:offset_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:offset_lines fid="lines.4">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>10.0,-3.5 7.0,-3.5</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>10.0,-3.5 7.0,-3.5</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:offset_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:offset_lines fid="lines.5">
|
||||
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>10.3535533905933,0.646446609406726 6.35355339059327,-3.35355339059327</gml:coordinates></gml:LineString></ogr:geometryProperty>
|
||||
</ogr:offset_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:offset_lines fid="lines.6">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>10.3535533905933,0.646446609406726 6.35355339059327,-3.35355339059327</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:offset_lines>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
||||
|
23
python/plugins/processing/tests/testdata/expected/gdal/offset_lines.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/gdal/offset_lines.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="offset_lines" type="ogr:offset_lines_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="offset_lines_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:MultiLineStringPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation=""
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ one_side_buffer.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
@ -11,38 +11,9 @@
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:one_side_buffer fid="lines.0">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>11,5 9,3 9,2 6,2 6.0,2.5 8.5,2.5 8.5,3.0 8.5024076366639,3.04900857016478 8.50960735979838,3.09754516100806 8.5215298321339,3.14514233862723 8.53806023374436,3.19134171618255 8.55903936782582,3.235698368413 8.58426519384873,3.2777851165098 8.61349477331863,3.31719664208182 8.64644660940673,3.35355339059327 10.6464466094067,5.35355339059327 11,5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:one_side_buffer>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:one_side_buffer fid="lines.1">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1,-1 -1,-1 -1.0,-0.5 1.0,-0.5 1,-1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:one_side_buffer>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:one_side_buffer fid="lines.2">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3,3 3,2 2,2 2,0 1.5,0.0 1.5,2.0 1.5024076366639,2.04900857016478 1.50960735979838,2.09754516100806 1.5215298321339,2.14514233862723 1.53806023374436,2.19134171618254 1.55903936782582,2.235698368413 1.58426519384873,2.2777851165098 1.61349477331863,2.31719664208182 1.64644660940673,2.35355339059327 1.68280335791818,2.38650522668137 1.7222148834902,2.41573480615127 1.764301631587,2.44096063217418 1.80865828381746,2.46193976625564 1.85485766137277,2.4784701678661 1.90245483899194,2.49039264020162 1.95099142983522,2.4975923633361 2.0,2.5 2.5,2.5 2.5,3.0 3,3</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:one_side_buffer>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:one_side_buffer fid="lines.3">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>5,1 3,1 3.0,1.5 5.0,1.5 5,1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:one_side_buffer>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:one_side_buffer fid="lines.4">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>10,-3 7,-3 7.0,-2.5 10.0,-2.5 10,-3</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:one_side_buffer>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:one_side_buffer fid="lines.5">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>10,1 6,-3 5.64644660940673,-2.64644660940673 9.64644660940673,1.35355339059327 10,1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:one_side_buffer>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:one_side_buffer fid="lines.6">
|
||||
<ogr:geometryProperty><gml:MultiPolygon srsName="EPSG:4326"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1,-1 -1,-1 -1.0,-0.5 1.0,-0.5 1,-1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>10,-3 7,-3 7.0,-2.5 10.0,-2.5 10,-3</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>11,5 9,3 9,2 6,2 6.0,2.5 8.5,2.5 8.5,3.0 8.5024076366639,3.04900857016478 8.50960735979838,3.09754516100806 8.5215298321339,3.14514233862723 8.53806023374436,3.19134171618255 8.55903936782582,3.235698368413 8.58426519384873,3.2777851165098 8.61349477331863,3.31719664208182 8.64644660940673,3.35355339059327 10.6464466094067,5.35355339059327 11,5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>10,1 6,-3 5.64644660940673,-2.64644660940673 9.64644660940673,1.35355339059327 10,1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>5,1 3,1 3.0,1.5 5.0,1.5 5,1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3,3 3,2 2,2 2,0 1.5,0.0 1.5,2.0 1.5024076366639,2.04900857016478 1.50960735979838,2.09754516100806 1.5215298321339,2.14514233862723 1.53806023374436,2.19134171618254 1.55903936782582,2.235698368413 1.58426519384873,2.2777851165098 1.61349477331863,2.31719664208182 1.64644660940673,2.35355339059327 1.68280335791818,2.38650522668137 1.7222148834902,2.41573480615127 1.764301631587,2.44096063217418 1.80865828381746,2.46193976625564 1.85485766137277,2.4784701678661 1.90245483899194,2.49039264020162 1.95099142983522,2.4975923633361 2.0,2.5 2.5,2.5 2.5,3.0 3,3</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon></ogr:geometryProperty>
|
||||
</ogr:one_side_buffer>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
||||
|
23
python/plugins/processing/tests/testdata/expected/gdal/one_side_buffer.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/gdal/one_side_buffer.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="one_side_buffer" type="ogr:one_side_buffer_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="one_side_buffer_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:MultiPolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
@ -12,33 +12,33 @@
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:SELECT fid="lines.0">
|
||||
<ogr:points_along_lines fid="lines.0">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>7.70710678118655,2.0</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
</ogr:SELECT>
|
||||
</ogr:points_along_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:SELECT fid="lines.1">
|
||||
<ogr:points_along_lines fid="lines.1">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>-0.5,-1.0</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
</ogr:SELECT>
|
||||
</ogr:points_along_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:SELECT fid="lines.2">
|
||||
<ogr:points_along_lines fid="lines.2">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2,1</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
</ogr:SELECT>
|
||||
</ogr:points_along_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:SELECT fid="lines.3">
|
||||
<ogr:points_along_lines fid="lines.3">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>3.5,1.0</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
</ogr:SELECT>
|
||||
</ogr:points_along_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:SELECT fid="lines.4">
|
||||
<ogr:points_along_lines fid="lines.4">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>7.75,-3.0</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
</ogr:SELECT>
|
||||
</ogr:points_along_lines>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:SELECT fid="lines.5">
|
||||
<ogr:points_along_lines fid="lines.5">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>7,-2</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
</ogr:SELECT>
|
||||
</ogr:points_along_lines>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
||||
|
23
python/plugins/processing/tests/testdata/expected/gdal/points_along_lines.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/gdal/points_along_lines.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="points_along_lines" type="ogr:points_along_lines_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="points_along_lines_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:PointPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
@ -441,6 +441,143 @@ tests:
|
||||
# hash: 2d0585dc8166fbe3cec7d9e6fd66e95cc9bdb1043b3b0fa7cbdfef4c
|
||||
# type: rasterhash
|
||||
|
||||
- algorithm: gdal:buffervectors
|
||||
name: Buffer lines
|
||||
params:
|
||||
DISSOLVE: false
|
||||
DISTANCE: 0.5
|
||||
EXPLODE_COLLECTIONS: false
|
||||
GEOMETRY: geometry
|
||||
INPUT:
|
||||
name: lines.gml
|
||||
type: vector
|
||||
OPTIONS: ''
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/gdal/buffer_lines.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: gdal:buffervectors
|
||||
name: BUffer lines with dissolve
|
||||
params:
|
||||
DISSOLVE: true
|
||||
DISTANCE: 1.0
|
||||
EXPLODE_COLLECTIONS: false
|
||||
GEOMETRY: geometry
|
||||
INPUT:
|
||||
name: lines.gml
|
||||
type: vector
|
||||
OPTIONS: ''
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/gdal/buffer_lines_dissolve.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: gdal:buffervectors
|
||||
name: Buffer polygons
|
||||
params:
|
||||
DISSOLVE: false
|
||||
DISTANCE: 0.5
|
||||
EXPLODE_COLLECTIONS: false
|
||||
GEOMETRY: geometry
|
||||
INPUT:
|
||||
name: polys.gml
|
||||
type: vector
|
||||
OPTIONS: ''
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/gdal/buffer_polys.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: gdal:buffervectors
|
||||
name: Buffer polygons with dissolve
|
||||
params:
|
||||
DISSOLVE: true
|
||||
DISTANCE: 0.5
|
||||
EXPLODE_COLLECTIONS: false
|
||||
GEOMETRY: geometry
|
||||
INPUT:
|
||||
name: polys.gml
|
||||
type: vector
|
||||
OPTIONS: ''
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/gdal/buffer_polys_dissolve.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: gdal:clipvectorbypolygon
|
||||
name: Clip lines by polygons
|
||||
params:
|
||||
INPUT:
|
||||
name: lines.gml
|
||||
type: vector
|
||||
MASK:
|
||||
name: polys.gml
|
||||
type: vector
|
||||
OPTIONS: ''
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/gdal/clip_lines_by_polygon.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: gdal:clipvectorbypolygon
|
||||
name: Clip lines by multipolygons
|
||||
params:
|
||||
INPUT:
|
||||
name: lines.gml
|
||||
type: vector
|
||||
MASK:
|
||||
name: multipolys.gml
|
||||
type: vector
|
||||
OPTIONS: ''
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/gdal/clip_lines_by_multipolygon.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: gdal:clipvectorbypolygon
|
||||
name: Clip points by polygons
|
||||
params:
|
||||
INPUT:
|
||||
name: points.gml
|
||||
type: vector
|
||||
MASK:
|
||||
name: polys.gml
|
||||
type: vector
|
||||
OPTIONS: ''
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/gdal/clip_points_by_polygon.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: gdal:executesql
|
||||
name: Execute SQL
|
||||
params:
|
||||
DIALECT: 0
|
||||
INPUT:
|
||||
name: polys.gml
|
||||
type: vector
|
||||
OPTIONS: ''
|
||||
SQL: SELECT * FROM polys2 WHERE intval=2
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/gdal/execute_sql.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: gdal:offsetcurve
|
||||
name: Offset curve (right-sided)
|
||||
params:
|
||||
DISTANCE: -0.5
|
||||
GEOMETRY: geometry
|
||||
INPUT:
|
||||
name: lines.gml
|
||||
type: vector
|
||||
OPTIONS: ''
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/gdal/offset_lines.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: gdal:ogrinfo
|
||||
name: ogrinfo
|
||||
params:
|
||||
@ -457,6 +594,23 @@ tests:
|
||||
- 'Geometry: Line String'
|
||||
- 'Feature Count: [6|7]' # On some platforms returns 6 instead of 7...
|
||||
|
||||
- algorithm: gdal:onesidebuffer
|
||||
name: One-sided buffer (left-handed)
|
||||
params:
|
||||
BUFFER_SIDE: 1
|
||||
DISSOLVE: false
|
||||
DISTANCE: 0.5
|
||||
EXPLODE_COLLECTIONS: false
|
||||
GEOMETRY: geometry
|
||||
INPUT:
|
||||
name: lines.gml
|
||||
type: vector
|
||||
OPTIONS: ''
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/gdal/one_side_buffer.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: gdal:pointsalonglines
|
||||
name: Points along lines
|
||||
params:
|
||||
@ -465,101 +619,8 @@ tests:
|
||||
INPUT:
|
||||
name: lines.gml
|
||||
type: vector
|
||||
OPTIONS: ''
|
||||
results:
|
||||
OUTPUT:
|
||||
name: expected/gdal/points_along_lines.gml
|
||||
type: vector
|
||||
pk: fid
|
||||
compare:
|
||||
ignore_crs_check: true
|
||||
|
||||
- algorithm: gdal:offsetcurve
|
||||
name: Offset curve (right-handed)
|
||||
params:
|
||||
GEOMETRY: geometry
|
||||
INPUT_LAYER:
|
||||
name: lines.gml
|
||||
type: vector
|
||||
RADIUS: -0.5
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/gdal/offset_lines.gml
|
||||
type: vector
|
||||
compare:
|
||||
geometry:
|
||||
precision: 7
|
||||
|
||||
- algorithm: gdal:buffervectors
|
||||
name: Buffer lines
|
||||
params:
|
||||
DISSOLVEALL: false
|
||||
DISTANCE: 1.0
|
||||
GEOMETRY: geometry
|
||||
INPUT_LAYER:
|
||||
name: lines.gml
|
||||
type: vector
|
||||
MULTI: false
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/gdal/buffer_lines.gml
|
||||
type: vector
|
||||
compare:
|
||||
geometry:
|
||||
precision: 7
|
||||
expectedFailure:
|
||||
- int(1)
|
||||
|
||||
- algorithm: gdal:buffervectors
|
||||
name: Basic polygon buffer
|
||||
params:
|
||||
DISSOLVEALL: false
|
||||
DISTANCE: 0.5
|
||||
GEOMETRY: geometry
|
||||
INPUT_LAYER:
|
||||
name: polys.gml
|
||||
type: vector
|
||||
MULTI: false
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/gdal/buffer_polys.gml
|
||||
type: vector
|
||||
compare:
|
||||
geometry:
|
||||
precision: 7
|
||||
|
||||
- algorithm: gdal:buffervectors
|
||||
name: Polygon buffer with dissolve
|
||||
params:
|
||||
DISSOLVEALL: true
|
||||
DISTANCE: 0.5
|
||||
GEOMETRY: geometry
|
||||
INPUT_LAYER:
|
||||
name: polys.gml
|
||||
type: vector
|
||||
MULTI: false
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/gdal/buffer_polys_dissolve.gml
|
||||
type: vector
|
||||
compare:
|
||||
geometry:
|
||||
precision: 7
|
||||
|
||||
- algorithm: gdal:singlesidedbuffer
|
||||
name: One-side buffer for lines (left-handed)
|
||||
params:
|
||||
DISSOLVEALL: false
|
||||
GEOMETRY: geometry
|
||||
INPUT_LAYER:
|
||||
name: lines.gml
|
||||
type: vector
|
||||
LEFTRIGHT: '1'
|
||||
MULTI: false
|
||||
RADIUS: 0.5
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/gdal/one_side_buffer.gml
|
||||
type: vector
|
||||
compare:
|
||||
geometry:
|
||||
precision: 7
|
||||
|
Loading…
x
Reference in New Issue
Block a user