mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-13 00:03:09 -04:00
Merge pull request #3371 from nyalldawson/processing
[processing] New algs + a fix
This commit is contained in:
commit
d5516fa7e3
@ -33,6 +33,12 @@ qgis:basicstatisticsfortextfields: >
|
||||
|
||||
Statistics are generated as an HTML file.
|
||||
|
||||
qgis:boundary: >
|
||||
Returns the closure of the combinatorial boundary of the input geometries (ie the topological boundary of the geometry). For instance, a polygon geometry will have a boundary consisting of the linestrings for each ring in the polygon. Only valid for polygon or line layers.
|
||||
|
||||
qgis:boundingboxes: >
|
||||
This algorithm calculates the bounding box (envelope) of each feature in an input layer.
|
||||
|
||||
qgis:buildvirtualvector: >
|
||||
This algorithm creates a virtual layer that contains a set of vector layer.
|
||||
|
||||
@ -259,6 +265,10 @@ qgis:orientedminimumboundingbox: >
|
||||
qgis:pointsdisplacement:
|
||||
|
||||
|
||||
qgis:pointonsurface: >
|
||||
Returns a point guaranteed to lie on the surface of a geometry.
|
||||
|
||||
|
||||
qgis:pointslayerfromtable: >
|
||||
This algorithm generates a points layer based on the values from an input table.
|
||||
|
||||
|
97
python/plugins/processing/algs/qgis/Boundary.py
Normal file
97
python/plugins/processing/algs/qgis/Boundary.py
Normal file
@ -0,0 +1,97 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
***************************************************************************
|
||||
Boundary.py
|
||||
--------------
|
||||
Date : July 2016
|
||||
Copyright : (C) 2016 by Nyall Dawson
|
||||
Email : nyall dot dawson at gmail dot com
|
||||
***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************
|
||||
"""
|
||||
|
||||
__author__ = 'Nyall Dawson'
|
||||
__date__ = 'July 2016'
|
||||
__copyright__ = '(C) 2016, Nyall Dawson'
|
||||
|
||||
# This will get replaced with a git SHA1 when you do a git archive323
|
||||
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
|
||||
from qgis.core import QgsGeometry, QgsWkbTypes
|
||||
|
||||
from qgis.PyQt.QtGui import QIcon
|
||||
|
||||
from processing.core.GeoAlgorithm import GeoAlgorithm
|
||||
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
|
||||
from processing.core.parameters import ParameterVector
|
||||
from processing.core.outputs import OutputVector
|
||||
from processing.tools import dataobjects, vector
|
||||
|
||||
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
|
||||
|
||||
|
||||
class Boundary(GeoAlgorithm):
|
||||
|
||||
INPUT_LAYER = 'INPUT_LAYER'
|
||||
OUTPUT_LAYER = 'OUTPUT_LAYER'
|
||||
|
||||
def getIcon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'convex_hull.png'))
|
||||
|
||||
def defineCharacteristics(self):
|
||||
self.name, self.i18n_name = self.trAlgorithm('Boundary')
|
||||
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')
|
||||
|
||||
self.addParameter(ParameterVector(self.INPUT_LAYER,
|
||||
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_LINE,
|
||||
ParameterVector.VECTOR_TYPE_POLYGON]))
|
||||
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Boundary')))
|
||||
|
||||
def processAlgorithm(self, progress):
|
||||
layer = dataobjects.getObjectFromUri(
|
||||
self.getParameterValue(self.INPUT_LAYER))
|
||||
|
||||
input_wkb = layer.wkbType()
|
||||
if QgsWkbTypes.geometryType(input_wkb) == QgsWkbTypes.LineGeometry:
|
||||
output_wkb = QgsWkbTypes.MultiPoint
|
||||
elif QgsWkbTypes.geometryType(input_wkb) == QgsWkbTypes.PolygonGeometry:
|
||||
output_wkb = QgsWkbTypes.MultiLineString
|
||||
if QgsWkbTypes.hasZ(input_wkb):
|
||||
output_wkb = QgsWkbTypes.addZ(output_wkb)
|
||||
if QgsWkbTypes.hasM(input_wkb):
|
||||
output_wkb = QgsWkbTypes.addM(output_wkb)
|
||||
|
||||
writer = self.getOutputFromName(
|
||||
self.OUTPUT_LAYER).getVectorWriter(
|
||||
layer.fields(),
|
||||
output_wkb,
|
||||
layer.crs())
|
||||
|
||||
features = vector.features(layer)
|
||||
total = 100.0 / len(features)
|
||||
|
||||
for current, input_feature in enumerate(features):
|
||||
output_feature = input_feature
|
||||
input_geometry = input_feature.geometry()
|
||||
if input_geometry:
|
||||
output_geometry = QgsGeometry(input_geometry.geometry().boundary())
|
||||
if not output_geometry:
|
||||
raise GeoAlgorithmExecutionException(
|
||||
self.tr('Error calculating boundary'))
|
||||
|
||||
output_feature.setGeometry(output_geometry)
|
||||
|
||||
writer.addFeature(output_feature)
|
||||
progress.setPercentage(int(current * total))
|
||||
|
||||
del writer
|
86
python/plugins/processing/algs/qgis/BoundingBox.py
Normal file
86
python/plugins/processing/algs/qgis/BoundingBox.py
Normal file
@ -0,0 +1,86 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
***************************************************************************
|
||||
BoundingBox.py
|
||||
--------------
|
||||
Date : July 2016
|
||||
Copyright : (C) 2016 by Nyall Dawson
|
||||
Email : nyall dot dawson at gmail dot com
|
||||
***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************
|
||||
"""
|
||||
|
||||
__author__ = 'Nyall Dawson'
|
||||
__date__ = 'July 2016'
|
||||
__copyright__ = '(C) 2016, Nyall Dawson'
|
||||
|
||||
# This will get replaced with a git SHA1 when you do a git archive323
|
||||
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
|
||||
from qgis.core import QgsGeometry, QgsWkbTypes
|
||||
|
||||
from qgis.PyQt.QtGui import QIcon
|
||||
|
||||
from processing.core.GeoAlgorithm import GeoAlgorithm
|
||||
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
|
||||
from processing.core.parameters import ParameterVector
|
||||
from processing.core.outputs import OutputVector
|
||||
from processing.tools import dataobjects, vector
|
||||
|
||||
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
|
||||
|
||||
|
||||
class BoundingBox(GeoAlgorithm):
|
||||
|
||||
INPUT_LAYER = 'INPUT_LAYER'
|
||||
OUTPUT_LAYER = 'OUTPUT_LAYER'
|
||||
|
||||
def getIcon(self):
|
||||
return QIcon(os.path.join(pluginPath, 'images', 'ftools', 'matrix.png'))
|
||||
|
||||
def defineCharacteristics(self):
|
||||
self.name, self.i18n_name = self.trAlgorithm('Bounding boxes')
|
||||
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')
|
||||
|
||||
self.addParameter(ParameterVector(self.INPUT_LAYER,
|
||||
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_ANY]))
|
||||
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Bounds')))
|
||||
|
||||
def processAlgorithm(self, progress):
|
||||
layer = dataobjects.getObjectFromUri(
|
||||
self.getParameterValue(self.INPUT_LAYER))
|
||||
|
||||
writer = self.getOutputFromName(
|
||||
self.OUTPUT_LAYER).getVectorWriter(
|
||||
layer.fields().toList(),
|
||||
QgsWkbTypes.Polygon,
|
||||
layer.crs())
|
||||
|
||||
features = vector.features(layer)
|
||||
total = 100.0 / len(features)
|
||||
|
||||
for current, input_feature in enumerate(features):
|
||||
output_feature = input_feature
|
||||
input_geometry = input_feature.geometry()
|
||||
if input_geometry:
|
||||
output_geometry = QgsGeometry.fromRect(input_geometry.boundingBox())
|
||||
if not output_geometry:
|
||||
raise GeoAlgorithmExecutionException(
|
||||
self.tr('Error calculating bounding box'))
|
||||
|
||||
output_feature.setGeometry(output_geometry)
|
||||
|
||||
writer.addFeature(output_feature)
|
||||
progress.setPercentage(int(current * total))
|
||||
|
||||
del writer
|
83
python/plugins/processing/algs/qgis/PointOnSurface.py
Normal file
83
python/plugins/processing/algs/qgis/PointOnSurface.py
Normal file
@ -0,0 +1,83 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
"""
|
||||
***************************************************************************
|
||||
PointOnSurface.py
|
||||
--------------
|
||||
Date : July 2016
|
||||
Copyright : (C) 2016 by Nyall Dawson
|
||||
Email : nyall dot dawson at gmail dot com
|
||||
***************************************************************************
|
||||
* *
|
||||
* 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. *
|
||||
* *
|
||||
***************************************************************************
|
||||
"""
|
||||
|
||||
__author__ = 'Nyall Dawson'
|
||||
__date__ = 'July 2016'
|
||||
__copyright__ = '(C) 2016, Nyall Dawson'
|
||||
|
||||
# This will get replaced with a git SHA1 when you do a git archive323
|
||||
|
||||
__revision__ = '$Format:%H$'
|
||||
|
||||
import os
|
||||
|
||||
from qgis.core import QgsGeometry, QgsWkbTypes
|
||||
|
||||
from qgis.PyQt.QtGui import QIcon
|
||||
|
||||
from processing.core.GeoAlgorithm import GeoAlgorithm
|
||||
from processing.core.GeoAlgorithmExecutionException import GeoAlgorithmExecutionException
|
||||
from processing.core.parameters import ParameterVector
|
||||
from processing.core.outputs import OutputVector
|
||||
from processing.tools import dataobjects, vector
|
||||
|
||||
pluginPath = os.path.split(os.path.split(os.path.dirname(__file__))[0])[0]
|
||||
|
||||
|
||||
class PointOnSurface(GeoAlgorithm):
|
||||
|
||||
INPUT_LAYER = 'INPUT_LAYER'
|
||||
OUTPUT_LAYER = 'OUTPUT_LAYER'
|
||||
|
||||
def defineCharacteristics(self):
|
||||
self.name, self.i18n_name = self.trAlgorithm('Point on surface')
|
||||
self.group, self.i18n_group = self.trAlgorithm('Vector geometry tools')
|
||||
|
||||
self.addParameter(ParameterVector(self.INPUT_LAYER,
|
||||
self.tr('Input layer'), [ParameterVector.VECTOR_TYPE_ANY]))
|
||||
self.addOutput(OutputVector(self.OUTPUT_LAYER, self.tr('Point')))
|
||||
|
||||
def processAlgorithm(self, progress):
|
||||
layer = dataobjects.getObjectFromUri(
|
||||
self.getParameterValue(self.INPUT_LAYER))
|
||||
|
||||
writer = self.getOutputFromName(
|
||||
self.OUTPUT_LAYER).getVectorWriter(
|
||||
layer.fields().toList(),
|
||||
QgsWkbTypes.Point,
|
||||
layer.crs())
|
||||
|
||||
features = vector.features(layer)
|
||||
total = 100.0 / len(features)
|
||||
|
||||
for current, input_feature in enumerate(features):
|
||||
output_feature = input_feature
|
||||
input_geometry = input_feature.geometry()
|
||||
if input_geometry:
|
||||
output_geometry = input_geometry.pointOnSurface()
|
||||
if not output_geometry:
|
||||
raise GeoAlgorithmExecutionException(
|
||||
self.tr('Error calculating point on surface'))
|
||||
|
||||
output_feature.setGeometry(output_geometry)
|
||||
|
||||
writer.addFeature(output_feature)
|
||||
progress.setPercentage(int(current * total))
|
||||
|
||||
del writer
|
@ -147,6 +147,9 @@ from .DefineProjection import DefineProjection
|
||||
from .RectanglesOvalsDiamondsVariable import RectanglesOvalsDiamondsVariable
|
||||
from .RectanglesOvalsDiamondsFixed import RectanglesOvalsDiamondsFixed
|
||||
from .MergeLines import MergeLines
|
||||
from .BoundingBox import BoundingBox
|
||||
from .Boundary import Boundary
|
||||
from .PointOnSurface import PointOnSurface
|
||||
|
||||
pluginPath = os.path.normpath(os.path.join(
|
||||
os.path.split(os.path.dirname(__file__))[0], os.pardir))
|
||||
@ -198,7 +201,8 @@ class QGISAlgorithmProvider(AlgorithmProvider):
|
||||
CheckValidity(), OrientedMinimumBoundingBox(), Smooth(),
|
||||
ReverseLineDirection(), SpatialIndex(), DefineProjection(),
|
||||
RectanglesOvalsDiamondsVariable(),
|
||||
RectanglesOvalsDiamondsFixed(), MergeLines()
|
||||
RectanglesOvalsDiamondsFixed(), MergeLines(),
|
||||
BoundingBox(), Boundary(), PointOnSurface()
|
||||
]
|
||||
|
||||
if hasMatplotlib:
|
||||
|
48
python/plugins/processing/tests/testdata/expected/lines_boundary.gml
vendored
Normal file
48
python/plugins/processing/tests/testdata/expected/lines_boundary.gml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ lines_boundary.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>11</gml:X><gml:Y>5</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:lines_boundary fid="lines.0">
|
||||
<ogr:geometryProperty><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates>6,2</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>11,5</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></ogr:geometryProperty>
|
||||
</ogr:lines_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:lines_boundary fid="lines.1">
|
||||
<ogr:geometryProperty><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates>-1,-1</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>1,-1</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></ogr:geometryProperty>
|
||||
</ogr:lines_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:lines_boundary fid="lines.2">
|
||||
<ogr:geometryProperty><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates>2,0</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>3,3</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></ogr:geometryProperty>
|
||||
</ogr:lines_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:lines_boundary fid="lines.3">
|
||||
<ogr:geometryProperty><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates>3,1</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>5,1</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></ogr:geometryProperty>
|
||||
</ogr:lines_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:lines_boundary fid="lines.4">
|
||||
<ogr:geometryProperty><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates>7,-3</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>10,-3</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></ogr:geometryProperty>
|
||||
</ogr:lines_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:lines_boundary fid="lines.5">
|
||||
<ogr:geometryProperty><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates>6,-3</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>10,1</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></ogr:geometryProperty>
|
||||
</ogr:lines_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:lines_boundary fid="lines.6">
|
||||
</ogr:lines_boundary>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
23
python/plugins/processing/tests/testdata/expected/lines_boundary.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/lines_boundary.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="lines_boundary" type="ogr:lines_boundary_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="lines_boundary_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:MultiPointPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
48
python/plugins/processing/tests/testdata/expected/lines_bounds.gml
vendored
Normal file
48
python/plugins/processing/tests/testdata/expected/lines_bounds.gml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ lines_bounds.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>11</gml:X><gml:Y>5</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:lines_bounds fid="lines.0">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>6,2 11,2 11,5 6,5 6,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:lines_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:lines_bounds fid="lines.1">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-1,-1 1,-1 1,-1 -1,-1 -1,-1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:lines_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:lines_bounds fid="lines.2">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2,0 3,0 3,3 2,3 2,0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:lines_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:lines_bounds fid="lines.3">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3,1 5,1 5,1 3,1 3,1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:lines_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:lines_bounds fid="lines.4">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>7,-3 10,-3 10,-3 7,-3 7,-3</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:lines_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:lines_bounds fid="lines.5">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>6,-3 10,-3 10,1 6,1 6,-3</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:lines_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:lines_bounds fid="lines.6">
|
||||
</ogr:lines_bounds>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
23
python/plugins/processing/tests/testdata/expected/lines_bounds.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/lines_bounds.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="lines_bounds" type="ogr:lines_bounds_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="lines_bounds_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:PolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
33
python/plugins/processing/tests/testdata/expected/multiline_boundary.gml
vendored
Normal file
33
python/plugins/processing/tests/testdata/expected/multiline_boundary.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/ multiline_boundary.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>-1</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>5.58042226487524</gml:X><gml:Y>4.119769673704415</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:multiline_boundary fid="lines.1">
|
||||
<ogr:geometryProperty><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates>-1,-1</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>1,-1</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></ogr:geometryProperty>
|
||||
</ogr:multiline_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multiline_boundary fid="lines.2">
|
||||
<ogr:geometryProperty><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates>3,1</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>5,1</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>5.024184261036468,2.414779270633399</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>5,1</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></ogr:geometryProperty>
|
||||
</ogr:multiline_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multiline_boundary fid="lines.3">
|
||||
</ogr:multiline_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multiline_boundary fid="lines.4">
|
||||
<ogr:geometryProperty><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates>2,0</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>3,3</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>2.944337811900192,4.04721689059501</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>5.459500959692898,4.119769673704415</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>3,3</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>5.58042226487524,2.946833013435702</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></ogr:geometryProperty>
|
||||
</ogr:multiline_boundary>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
23
python/plugins/processing/tests/testdata/expected/multiline_boundary.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/multiline_boundary.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="multiline_boundary" type="ogr:multiline_boundary_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="multiline_boundary_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:MultiPointPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
33
python/plugins/processing/tests/testdata/expected/multiline_bounds.gml
vendored
Normal file
33
python/plugins/processing/tests/testdata/expected/multiline_bounds.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/ multiline_bounds.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>-1</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>5.58042226487524</gml:X><gml:Y>4.119769673704415</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:multiline_bounds fid="lines.1">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-1,-1 1,-1 1,-1 -1,-1 -1,-1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:multiline_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multiline_bounds fid="lines.2">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3,1 5.024184261036468,1.0 5.024184261036468,2.414779270633399 3.0,2.414779270633399 3,1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:multiline_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multiline_bounds fid="lines.3">
|
||||
</ogr:multiline_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multiline_bounds fid="lines.4">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2,0 5.58042226487524,0.0 5.58042226487524,4.119769673704415 2.0,4.119769673704415 2,0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:multiline_bounds>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
23
python/plugins/processing/tests/testdata/expected/multiline_bounds.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/multiline_bounds.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="multiline_bounds" type="ogr:multiline_bounds_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="multiline_bounds_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:PolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
43
python/plugins/processing/tests/testdata/expected/multipoint_bounds.gml
vendored
Normal file
43
python/plugins/processing/tests/testdata/expected/multipoint_bounds.gml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ multipoint_bounds.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>-5</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:multipoint_bounds fid="points.9">
|
||||
<ogr:d>5</ogr:d>
|
||||
</ogr:multipoint_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoint_bounds fid="points.0">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1,1 3,1 3,3 1,3 1,1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
<ogr:d>1</ogr:d>
|
||||
</ogr:multipoint_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoint_bounds fid="points.3">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4,1 5,1 5,2 4,2 4,1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
<ogr:d>2</ogr:d>
|
||||
</ogr:multipoint_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoint_bounds fid="points.5">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,-5 8,-5 8,-1 0,-1 0,-5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
<ogr:d>3</ogr:d>
|
||||
</ogr:multipoint_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoint_bounds fid="points.7">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,-1 7,-1 7,-1 0,-1 0,-1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
<ogr:d>4</ogr:d>
|
||||
</ogr:multipoint_bounds>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
30
python/plugins/processing/tests/testdata/expected/multipoint_bounds.xsd
vendored
Normal file
30
python/plugins/processing/tests/testdata/expected/multipoint_bounds.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="multipoint_bounds" type="ogr:multipoint_bounds_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="multipoint_bounds_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:GeometryPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="d" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="16"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
42
python/plugins/processing/tests/testdata/expected/multipoly_boundary.gml
vendored
Normal file
42
python/plugins/processing/tests/testdata/expected/multipoly_boundary.gml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ multipoly_boundary.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>9</gml:X><gml:Y>6</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:multipoly_boundary fid="multipolys.0">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>2,1 2,2 3,2 3,3 4,3 4,1 2,1</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
<ogr:Bname>Test</ogr:Bname>
|
||||
<ogr:Bintval>1</ogr:Bintval>
|
||||
<ogr:Bfloatval>0.123</ogr:Bfloatval>
|
||||
</ogr:multipoly_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoly_boundary fid="multipolys.1">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>7,-1 8,-1 8,3 7,3 7,-1</gml:coordinates></gml:LineString></gml:lineStringMember><gml:lineStringMember><gml:LineString><gml:coordinates>7,6 7,5 7,4 8,4 9,5 9,6 7,6</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
</ogr:multipoly_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoly_boundary fid="multipolys.2">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>0,0 0,1 1,1 1,0 0,0</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
<ogr:Bname>Test</ogr:Bname>
|
||||
<ogr:Bintval>2</ogr:Bintval>
|
||||
<ogr:Bfloatval>-0.123</ogr:Bfloatval>
|
||||
</ogr:multipoly_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoly_boundary fid="multipolys.3">
|
||||
<ogr:Bname>Test</ogr:Bname>
|
||||
<ogr:Bintval>3</ogr:Bintval>
|
||||
<ogr:Bfloatval>0</ogr:Bfloatval>
|
||||
</ogr:multipoly_boundary>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
43
python/plugins/processing/tests/testdata/expected/multipoly_boundary.xsd
vendored
Normal file
43
python/plugins/processing/tests/testdata/expected/multipoly_boundary.xsd
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?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="multipoly_boundary" type="ogr:multipoly_boundary_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="multipoly_boundary_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="Bname" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="4"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Bintval" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="16"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Bfloatval" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
42
python/plugins/processing/tests/testdata/expected/multipoly_bounds.gml
vendored
Normal file
42
python/plugins/processing/tests/testdata/expected/multipoly_bounds.gml
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ multipoly_bounds.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>9</gml:X><gml:Y>6</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:multipoly_bounds fid="multipolys.0">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2,1 4,1 4,3 2,3 2,1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
<ogr:Bname>Test</ogr:Bname>
|
||||
<ogr:Bintval>1</ogr:Bintval>
|
||||
<ogr:Bfloatval>0.123</ogr:Bfloatval>
|
||||
</ogr:multipoly_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoly_bounds fid="multipolys.1">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>7,-1 9,-1 9,6 7,6 7,-1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:multipoly_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoly_bounds fid="multipolys.2">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,0 1,0 1,1 0,1 0,0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
<ogr:Bname>Test</ogr:Bname>
|
||||
<ogr:Bintval>2</ogr:Bintval>
|
||||
<ogr:Bfloatval>-0.123</ogr:Bfloatval>
|
||||
</ogr:multipoly_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoly_bounds fid="multipolys.3">
|
||||
<ogr:Bname>Test</ogr:Bname>
|
||||
<ogr:Bintval>3</ogr:Bintval>
|
||||
<ogr:Bfloatval>0</ogr:Bfloatval>
|
||||
</ogr:multipoly_bounds>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
43
python/plugins/processing/tests/testdata/expected/multipoly_bounds.xsd
vendored
Normal file
43
python/plugins/processing/tests/testdata/expected/multipoly_bounds.xsd
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?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="multipoly_bounds" type="ogr:multipoly_bounds_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="multipoly_bounds_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:PolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="Bname" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:maxLength value="4"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Bintval" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="16"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="Bfloatval" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
59
python/plugins/processing/tests/testdata/expected/point_bounds.gml
vendored
Normal file
59
python/plugins/processing/tests/testdata/expected/point_bounds.gml
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ point_bounds.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>-5</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:point_bounds fid="points.0">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1,1 1,1 1,1 1,1 1,1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:point_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_bounds fid="points.1">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3,3 3,3 3,3 3,3 3,3</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:point_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_bounds fid="points.2">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2,2 2,2 2,2 2,2 2,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:point_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_bounds fid="points.3">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>5,2 5,2 5,2 5,2 5,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:point_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_bounds fid="points.4">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4,1 4,1 4,1 4,1 4,1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:point_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_bounds fid="points.5">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,-5 0,-5 0,-5 0,-5 0,-5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:point_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_bounds fid="points.6">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>8,-1 8,-1 8,-1 8,-1 8,-1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:point_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_bounds fid="points.7">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>7,-1 7,-1 7,-1 7,-1 7,-1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:point_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_bounds fid="points.8">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,-1 0,-1 0,-1 0,-1 0,-1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
</ogr:point_bounds>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
23
python/plugins/processing/tests/testdata/expected/point_bounds.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/point_bounds.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="point_bounds" type="ogr:point_bounds_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="point_bounds_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:PolygonPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
48
python/plugins/processing/tests/testdata/expected/point_on_line.gml
vendored
Normal file
48
python/plugins/processing/tests/testdata/expected/point_on_line.gml
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ point_on_line.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>9</gml:X><gml:Y>3</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_line fid="lines.0">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>9,3</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
</ogr:point_on_line>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_line fid="lines.1">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>-1,-1</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
</ogr:point_on_line>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_line fid="lines.2">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2,2</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
</ogr:point_on_line>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_line fid="lines.3">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>3,1</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
</ogr:point_on_line>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_line fid="lines.4">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>7,-3</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
</ogr:point_on_line>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_line fid="lines.5">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>6,-3</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
</ogr:point_on_line>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_line fid="lines.6">
|
||||
</ogr:point_on_line>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
23
python/plugins/processing/tests/testdata/expected/point_on_line.xsd
vendored
Normal file
23
python/plugins/processing/tests/testdata/expected/point_on_line.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="point_on_line" type="ogr:point_on_line_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="point_on_line_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>
|
43
python/plugins/processing/tests/testdata/expected/point_on_multipoint.gml
vendored
Normal file
43
python/plugins/processing/tests/testdata/expected/point_on_multipoint.gml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ point_on_multipoint.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>-5</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>7</gml:X><gml:Y>2</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_multipoint fid="points.9">
|
||||
<ogr:d>5</ogr:d>
|
||||
</ogr:point_on_multipoint>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_multipoint fid="points.0">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2,2</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:d>1</ogr:d>
|
||||
</ogr:point_on_multipoint>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_multipoint fid="points.3">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>5,2</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:d>2</ogr:d>
|
||||
</ogr:point_on_multipoint>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_multipoint fid="points.5">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>0,-5</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:d>3</ogr:d>
|
||||
</ogr:point_on_multipoint>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_multipoint fid="points.7">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>7,-1</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:d>4</ogr:d>
|
||||
</ogr:point_on_multipoint>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
30
python/plugins/processing/tests/testdata/expected/point_on_multipoint.xsd
vendored
Normal file
30
python/plugins/processing/tests/testdata/expected/point_on_multipoint.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="point_on_multipoint" type="ogr:point_on_multipoint_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="point_on_multipoint_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:GeometryPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/>
|
||||
<xs:element name="d" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:totalDigits value="16"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
58
python/plugins/processing/tests/testdata/expected/point_on_poly.gml
vendored
Normal file
58
python/plugins/processing/tests/testdata/expected/point_on_poly.gml
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ point_on_poly.xsd"
|
||||
xmlns:ogr="http://ogr.maptools.org/"
|
||||
xmlns:gml="http://www.opengis.net/gml">
|
||||
<gml:boundedBy>
|
||||
<gml:Box>
|
||||
<gml:coord><gml:X>0.5</gml:X><gml:Y>-1</gml:Y></gml:coord>
|
||||
<gml:coord><gml:X>6.5</gml:X><gml:Y>5.5</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_poly fid="polys.0">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>0.5,0.5</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:name>aaaaa</ogr:name>
|
||||
<ogr:intval>33</ogr:intval>
|
||||
<ogr:floatval>44.123456</ogr:floatval>
|
||||
</ogr:point_on_poly>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_poly fid="polys.1">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>5.0,4.5</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:name>Aaaaa</ogr:name>
|
||||
<ogr:intval>-33</ogr:intval>
|
||||
<ogr:floatval>0</ogr:floatval>
|
||||
</ogr:point_on_poly>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_poly fid="polys.2">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>2.5,5.5</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:name>bbaaa</ogr:name>
|
||||
<ogr:floatval>0.123</ogr:floatval>
|
||||
</ogr:point_on_poly>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_poly fid="polys.3">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>6.5,-1.0</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:name>ASDF</ogr:name>
|
||||
<ogr:intval>0</ogr:intval>
|
||||
</ogr:point_on_poly>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_poly fid="polys.4">
|
||||
<ogr:intval>120</ogr:intval>
|
||||
<ogr:floatval>-100291.43213</ogr:floatval>
|
||||
</ogr:point_on_poly>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:point_on_poly fid="polys.5">
|
||||
<ogr:geometryProperty><gml:Point srsName="EPSG:4326"><gml:coordinates>4,0</gml:coordinates></gml:Point></ogr:geometryProperty>
|
||||
<ogr:name>elim</ogr:name>
|
||||
<ogr:intval>2</ogr:intval>
|
||||
<ogr:floatval>3.33</ogr:floatval>
|
||||
</ogr:point_on_poly>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
43
python/plugins/processing/tests/testdata/expected/point_on_poly.xsd
vendored
Normal file
43
python/plugins/processing/tests/testdata/expected/point_on_poly.xsd
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?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="point_on_poly" type="ogr:point_on_poly_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="point_on_poly_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="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="16"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="floatval" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
58
python/plugins/processing/tests/testdata/expected/poly_boundary.gml
vendored
Normal file
58
python/plugins/processing/tests/testdata/expected/poly_boundary.gml
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ poly_boundary.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>6</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:poly_boundary fid="polys.0">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>-1,-1 -1,3 3,3 3,2 2,2 2,-1 -1,-1</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
<ogr:name>aaaaa</ogr:name>
|
||||
<ogr:intval>33</ogr:intval>
|
||||
<ogr:floatval>44.123456</ogr:floatval>
|
||||
</ogr:poly_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:poly_boundary fid="polys.1">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>5,5 6,4 4,4 5,5</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
<ogr:name>Aaaaa</ogr:name>
|
||||
<ogr:intval>-33</ogr:intval>
|
||||
<ogr:floatval>0</ogr:floatval>
|
||||
</ogr:poly_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:poly_boundary fid="polys.2">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>2,5 2,6 3,6 3,5 2,5</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
<ogr:name>bbaaa</ogr:name>
|
||||
<ogr:floatval>0.123</ogr:floatval>
|
||||
</ogr:poly_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:poly_boundary fid="polys.3">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>6,1 10,1 10,-3 6,-3 6,1</gml:coordinates></gml:LineString></gml:lineStringMember><gml:lineStringMember><gml:LineString><gml:coordinates>7,0 7,-2 9,-2 9,0 7,0</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
<ogr:name>ASDF</ogr:name>
|
||||
<ogr:intval>0</ogr:intval>
|
||||
</ogr:poly_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:poly_boundary fid="polys.4">
|
||||
<ogr:intval>120</ogr:intval>
|
||||
<ogr:floatval>-100291.43213</ogr:floatval>
|
||||
</ogr:poly_boundary>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:poly_boundary fid="polys.5">
|
||||
<ogr:geometryProperty><gml:MultiLineString srsName="EPSG:4326"><gml:lineStringMember><gml:LineString><gml:coordinates>3,2 6,1 6,-3 2,-1 2,2 3,2</gml:coordinates></gml:LineString></gml:lineStringMember></gml:MultiLineString></ogr:geometryProperty>
|
||||
<ogr:name>elim</ogr:name>
|
||||
<ogr:intval>2</ogr:intval>
|
||||
<ogr:floatval>3.33</ogr:floatval>
|
||||
</ogr:poly_boundary>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
43
python/plugins/processing/tests/testdata/expected/poly_boundary.xsd
vendored
Normal file
43
python/plugins/processing/tests/testdata/expected/poly_boundary.xsd
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?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="poly_boundary" type="ogr:poly_boundary_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="poly_boundary_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="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="16"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="floatval" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
58
python/plugins/processing/tests/testdata/expected/poly_bounds.gml
vendored
Normal file
58
python/plugins/processing/tests/testdata/expected/poly_bounds.gml
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://ogr.maptools.org/ poly_bounds.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>6</gml:Y></gml:coord>
|
||||
</gml:Box>
|
||||
</gml:boundedBy>
|
||||
|
||||
<gml:featureMember>
|
||||
<ogr:poly_bounds fid="polys.0">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-1,-1 3,-1 3,3 -1,3 -1,-1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
<ogr:name>aaaaa</ogr:name>
|
||||
<ogr:intval>33</ogr:intval>
|
||||
<ogr:floatval>44.123456</ogr:floatval>
|
||||
</ogr:poly_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:poly_bounds fid="polys.1">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4,4 6,4 6,5 4,5 4,4</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
<ogr:name>Aaaaa</ogr:name>
|
||||
<ogr:intval>-33</ogr:intval>
|
||||
<ogr:floatval>0</ogr:floatval>
|
||||
</ogr:poly_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:poly_bounds fid="polys.2">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2,5 3,5 3,6 2,6 2,5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
<ogr:name>bbaaa</ogr:name>
|
||||
<ogr:floatval>0.123</ogr:floatval>
|
||||
</ogr:poly_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:poly_bounds fid="polys.3">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>6,-3 10,-3 10,1 6,1 6,-3</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
<ogr:name>ASDF</ogr:name>
|
||||
<ogr:intval>0</ogr:intval>
|
||||
</ogr:poly_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:poly_bounds fid="polys.4">
|
||||
<ogr:intval>120</ogr:intval>
|
||||
<ogr:floatval>-100291.43213</ogr:floatval>
|
||||
</ogr:poly_bounds>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:poly_bounds fid="polys.5">
|
||||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2,-3 6,-3 6,2 2,2 2,-3</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
||||
<ogr:name>elim</ogr:name>
|
||||
<ogr:intval>2</ogr:intval>
|
||||
<ogr:floatval>3.33</ogr:floatval>
|
||||
</ogr:poly_bounds>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
43
python/plugins/processing/tests/testdata/expected/poly_bounds.xsd
vendored
Normal file
43
python/plugins/processing/tests/testdata/expected/poly_bounds.xsd
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?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="poly_bounds" type="ogr:poly_bounds_Type" substitutionGroup="gml:_Feature"/>
|
||||
<xs:complexType name="poly_bounds_Type">
|
||||
<xs:complexContent>
|
||||
<xs:extension base="gml:AbstractFeatureType">
|
||||
<xs:sequence>
|
||||
<xs:element name="geometryProperty" type="gml:PolygonPropertyType" 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="16"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
<xs:element name="floatval" nillable="true" minOccurs="0" maxOccurs="1">
|
||||
<xs:simpleType>
|
||||
<xs:restriction base="xs:decimal">
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:extension>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
19
python/plugins/processing/tests/testdata/multipoints.gfs
vendored
Normal file
19
python/plugins/processing/tests/testdata/multipoints.gfs
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
<GMLFeatureClassList>
|
||||
<GMLFeatureClass>
|
||||
<Name>multipoints</Name>
|
||||
<ElementPath>multipoints</ElementPath>
|
||||
<SRSName>EPSG:4326</SRSName>
|
||||
<DatasetSpecificInfo>
|
||||
<FeatureCount>5</FeatureCount>
|
||||
<ExtentXMin>0.00000</ExtentXMin>
|
||||
<ExtentXMax>8.00000</ExtentXMax>
|
||||
<ExtentYMin>-5.00000</ExtentYMin>
|
||||
<ExtentYMax>3.00000</ExtentYMax>
|
||||
</DatasetSpecificInfo>
|
||||
<PropertyDefn>
|
||||
<Name>d</Name>
|
||||
<ElementPath>d</ElementPath>
|
||||
<Type>Integer</Type>
|
||||
</PropertyDefn>
|
||||
</GMLFeatureClass>
|
||||
</GMLFeatureClassList>
|
43
python/plugins/processing/tests/testdata/multipoints.gml
vendored
Normal file
43
python/plugins/processing/tests/testdata/multipoints.gml
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ogr:FeatureCollection
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation=""
|
||||
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>-5</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:multipoints fid="points.9">
|
||||
<ogr:d>5</ogr:d>
|
||||
</ogr:multipoints>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoints fid="points.0">
|
||||
<ogr:geometryProperty><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates>1,1</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>2,2</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>3,3</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></ogr:geometryProperty>
|
||||
<ogr:d>1</ogr:d>
|
||||
</ogr:multipoints>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoints fid="points.3">
|
||||
<ogr:geometryProperty><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates>5,2</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>4,1</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></ogr:geometryProperty>
|
||||
<ogr:d>2</ogr:d>
|
||||
</ogr:multipoints>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoints fid="points.5">
|
||||
<ogr:geometryProperty><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates>0,-5</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>8,-1</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></ogr:geometryProperty>
|
||||
<ogr:d>3</ogr:d>
|
||||
</ogr:multipoints>
|
||||
</gml:featureMember>
|
||||
<gml:featureMember>
|
||||
<ogr:multipoints fid="points.7">
|
||||
<ogr:geometryProperty><gml:MultiPoint srsName="EPSG:4326"><gml:pointMember><gml:Point><gml:coordinates>7,-1</gml:coordinates></gml:Point></gml:pointMember><gml:pointMember><gml:Point><gml:coordinates>0,-1</gml:coordinates></gml:Point></gml:pointMember></gml:MultiPoint></ogr:geometryProperty>
|
||||
<ogr:d>4</ogr:d>
|
||||
</ogr:multipoints>
|
||||
</gml:featureMember>
|
||||
</ogr:FeatureCollection>
|
@ -440,3 +440,145 @@ tests:
|
||||
name: expected/multi_to_single.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:boundingboxes
|
||||
name: Bounding boxes for lines
|
||||
params:
|
||||
INPUT_LAYER:
|
||||
name: lines.gml
|
||||
type: vector
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/lines_bounds.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:boundingboxes
|
||||
name: Bounding boxes for multilines
|
||||
params:
|
||||
INPUT_LAYER:
|
||||
name: multilines.gml
|
||||
type: vector
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/multiline_bounds.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:boundingboxes
|
||||
name: Bounding boxes for multipolygons
|
||||
params:
|
||||
INPUT_LAYER:
|
||||
name: multipolys.gml
|
||||
type: vector
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/multipoly_bounds.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:boundingboxes
|
||||
name: Bounding boxes for points
|
||||
params:
|
||||
INPUT_LAYER:
|
||||
name: points.gml
|
||||
type: vector
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/point_bounds.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:boundingboxes
|
||||
name: Bounding boxes for polygons
|
||||
params:
|
||||
INPUT_LAYER:
|
||||
name: polys.gml
|
||||
type: vector
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/poly_bounds.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:boundingboxes
|
||||
name: Bounding boxes for multipoints
|
||||
params:
|
||||
INPUT_LAYER:
|
||||
name: multipoints.gml
|
||||
type: vector
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/multipoint_bounds.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:boundary
|
||||
name: Polygon boundary
|
||||
params:
|
||||
INPUT_LAYER:
|
||||
name: polys.gml
|
||||
type: vector
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/poly_boundary.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:boundary
|
||||
name: Multipoly boundary
|
||||
params:
|
||||
INPUT_LAYER:
|
||||
name: multipolys.gml
|
||||
type: vector
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/multipoly_boundary.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:boundary
|
||||
name: Line boundary
|
||||
params:
|
||||
INPUT_LAYER:
|
||||
name: lines.gml
|
||||
type: vector
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/lines_boundary.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:boundary
|
||||
name: Multiline boundary
|
||||
params:
|
||||
INPUT_LAYER:
|
||||
name: multilines.gml
|
||||
type: vector
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/multiline_boundary.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:pointonsurface
|
||||
name: Point on polygon surface
|
||||
params:
|
||||
INPUT_LAYER:
|
||||
name: polys.gml
|
||||
type: vector
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/point_on_poly.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:pointonsurface
|
||||
name: Point on multipoint surface
|
||||
params:
|
||||
INPUT_LAYER:
|
||||
name: multipoints.gml
|
||||
type: vector
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/point_on_multipoint.gml
|
||||
type: vector
|
||||
|
||||
- algorithm: qgis:pointonsurface
|
||||
name: Point on line surface
|
||||
params:
|
||||
INPUT_LAYER:
|
||||
name: lines.gml
|
||||
type: vector
|
||||
results:
|
||||
OUTPUT_LAYER:
|
||||
name: expected/point_on_line.gml
|
||||
type: vector
|
||||
|
@ -653,7 +653,7 @@ class VectorWriter:
|
||||
extension = 'shp'
|
||||
self.destination = self.destination + '.shp'
|
||||
|
||||
if geometryType == QgsWkbTypes.NullGeometry:
|
||||
if geometryType == QgsWkbTypes.NoGeometry:
|
||||
if extension == 'shp':
|
||||
extension = 'dbf'
|
||||
self.destination = self.destination[:self.destination.rfind('.')] + '.dbf'
|
||||
|
Loading…
x
Reference in New Issue
Block a user