-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #47049 from nirvn/refactor_missing_array_fix
Add missing string,integer,double array field types in the refactor and aggregate algorithms
- Loading branch information
Showing
19 changed files
with
462 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
python/plugins/processing/tests/testdata/expected/aggregate_to_array.gml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ogr:FeatureCollection | ||
gml:id="aFeatureCollection" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://ogr.maptools.org/ aggregate_to_array.xsd" | ||
xmlns:ogr="http://ogr.maptools.org/" | ||
xmlns:gml="http://www.opengis.net/gml/3.2"> | ||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>-3 -1</gml:lowerCorner><gml:upperCorner>5 11</gml:upperCorner></gml:Envelope></gml:boundedBy> | ||
|
||
<ogr:featureMember> | ||
<ogr:aggregate_to_array gml:id="aggregate_to_array.0"> | ||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>-3 -1</gml:lowerCorner><gml:upperCorner>5 11</gml:upperCorner></gml:Envelope></gml:boundedBy> | ||
<ogr:geometryProperty><gml:MultiCurve srsName="urn:ogc:def:crs:EPSG::4326" gml:id="aggregate_to_array.geom.0"><gml:curveMember><gml:LineString gml:id="aggregate_to_array.geom.0.0"><gml:posList>2 6 2 9 3 9 5 11</gml:posList></gml:LineString></gml:curveMember><gml:curveMember><gml:LineString gml:id="aggregate_to_array.geom.0.1"><gml:posList>-1 -1 -1 1</gml:posList></gml:LineString></gml:curveMember><gml:curveMember><gml:LineString gml:id="aggregate_to_array.geom.0.2"><gml:posList>0 2 2 2 2 3 3 3</gml:posList></gml:LineString></gml:curveMember><gml:curveMember><gml:LineString gml:id="aggregate_to_array.geom.0.3"><gml:posList>1 3 1 5</gml:posList></gml:LineString></gml:curveMember><gml:curveMember><gml:LineString gml:id="aggregate_to_array.geom.0.4"><gml:posList>-3 7 -3 10</gml:posList></gml:LineString></gml:curveMember><gml:curveMember><gml:LineString gml:id="aggregate_to_array.geom.0.5"><gml:posList>-3 6 1 10</gml:posList></gml:LineString></gml:curveMember></gml:MultiCurve></ogr:geometryProperty> | ||
<ogr:fids>lines.0</ogr:fids> | ||
<ogr:fids>lines.1</ogr:fids> | ||
<ogr:fids>lines.2</ogr:fids> | ||
<ogr:fids>lines.3</ogr:fids> | ||
<ogr:fids>lines.4</ogr:fids> | ||
<ogr:fids>lines.5</ogr:fids> | ||
<ogr:fids>lines.6</ogr:fids> | ||
</ogr:aggregate_to_array> | ||
</ogr:featureMember> | ||
</ogr:FeatureCollection> |
53 changes: 53 additions & 0 deletions
53
python/plugins/processing/tests/testdata/expected/aggregate_to_array.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?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/3.2" | ||
xmlns:gmlsf="http://www.opengis.net/gmlsf/2.0" | ||
elementFormDefault="qualified" | ||
version="1.0"> | ||
<xs:annotation> | ||
<xs:appinfo source="http://schemas.opengis.net/gmlsfProfile/2.0/gmlsfLevels.xsd"> | ||
<gmlsf:ComplianceLevel>1</gmlsf:ComplianceLevel> | ||
</xs:appinfo> | ||
</xs:annotation> | ||
<xs:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/> | ||
<xs:import namespace="http://www.opengis.net/gmlsf/2.0" schemaLocation="http://schemas.opengis.net/gmlsfProfile/2.0/gmlsfLevels.xsd"/> | ||
<xs:element name="FeatureCollection" type="ogr:FeatureCollectionType" substitutionGroup="gml:AbstractFeature"/> | ||
<xs:complexType name="FeatureCollectionType"> | ||
<xs:complexContent> | ||
<xs:extension base="gml:AbstractFeatureType"> | ||
<xs:sequence minOccurs="0" maxOccurs="unbounded"> | ||
<xs:element name="featureMember"> | ||
<xs:complexType> | ||
<xs:complexContent> | ||
<xs:extension base="gml:AbstractFeatureMemberType"> | ||
<xs:sequence> | ||
<xs:element ref="gml:AbstractFeature"/> | ||
</xs:sequence> | ||
</xs:extension> | ||
</xs:complexContent> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:extension> | ||
</xs:complexContent> | ||
</xs:complexType> | ||
<xs:element name="aggregate_to_array" type="ogr:aggregate_to_array_Type" substitutionGroup="gml:AbstractFeature"/> | ||
<xs:complexType name="aggregate_to_array_Type"> | ||
<xs:complexContent> | ||
<xs:extension base="gml:AbstractFeatureType"> | ||
<xs:sequence> | ||
<xs:element name="geometryProperty" type="gml:MultiCurvePropertyType" nillable="true" minOccurs="0" maxOccurs="1"/> <!-- restricted to MultiLineString --><!-- srsName="urn:ogc:def:crs:EPSG::4326" --> | ||
<xs:element name="fids" nillable="true" minOccurs="0" maxOccurs="unbounded"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:string"> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:extension> | ||
</xs:complexContent> | ||
</xs:complexType> | ||
</xs:schema> |
118 changes: 118 additions & 0 deletions
118
python/plugins/processing/tests/testdata/expected/refactor_array.gml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,118 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ogr:FeatureCollection | ||
gml:id="aFeatureCollection" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://ogr.maptools.org/ refactor_array.xsd" | ||
xmlns:ogr="http://ogr.maptools.org/" | ||
xmlns:gml="http://www.opengis.net/gml/3.2"> | ||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>-5 0</gml:lowerCorner><gml:upperCorner>3 8</gml:upperCorner></gml:Envelope></gml:boundedBy> | ||
|
||
<ogr:featureMember> | ||
<ogr:refactor_array gml:id="refactor_array.0"> | ||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>1 1</gml:lowerCorner><gml:upperCorner>1 1</gml:upperCorner></gml:Envelope></gml:boundedBy> | ||
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::4326" gml:id="refactor_array.geom.0"><gml:pos>1 1</gml:pos></gml:Point></ogr:geometryProperty> | ||
<ogr:fid>points.0</ogr:fid> | ||
<ogr:id>1</ogr:id> | ||
<ogr:id2>2</ogr:id2> | ||
<ogr:array>1</ogr:array> | ||
<ogr:array>2</ogr:array> | ||
<ogr:array>3</ogr:array> | ||
</ogr:refactor_array> | ||
</ogr:featureMember> | ||
<ogr:featureMember> | ||
<ogr:refactor_array gml:id="refactor_array.1"> | ||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>3 3</gml:lowerCorner><gml:upperCorner>3 3</gml:upperCorner></gml:Envelope></gml:boundedBy> | ||
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::4326" gml:id="refactor_array.geom.1"><gml:pos>3 3</gml:pos></gml:Point></ogr:geometryProperty> | ||
<ogr:fid>points.1</ogr:fid> | ||
<ogr:id>2</ogr:id> | ||
<ogr:id2>1</ogr:id2> | ||
<ogr:array>1</ogr:array> | ||
<ogr:array>2</ogr:array> | ||
<ogr:array>3</ogr:array> | ||
</ogr:refactor_array> | ||
</ogr:featureMember> | ||
<ogr:featureMember> | ||
<ogr:refactor_array gml:id="refactor_array.2"> | ||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>2 2</gml:lowerCorner><gml:upperCorner>2 2</gml:upperCorner></gml:Envelope></gml:boundedBy> | ||
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::4326" gml:id="refactor_array.geom.2"><gml:pos>2 2</gml:pos></gml:Point></ogr:geometryProperty> | ||
<ogr:fid>points.2</ogr:fid> | ||
<ogr:id>3</ogr:id> | ||
<ogr:id2>0</ogr:id2> | ||
<ogr:array>1</ogr:array> | ||
<ogr:array>2</ogr:array> | ||
<ogr:array>3</ogr:array> | ||
</ogr:refactor_array> | ||
</ogr:featureMember> | ||
<ogr:featureMember> | ||
<ogr:refactor_array gml:id="refactor_array.3"> | ||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>2 5</gml:lowerCorner><gml:upperCorner>2 5</gml:upperCorner></gml:Envelope></gml:boundedBy> | ||
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::4326" gml:id="refactor_array.geom.3"><gml:pos>2 5</gml:pos></gml:Point></ogr:geometryProperty> | ||
<ogr:fid>points.3</ogr:fid> | ||
<ogr:id>4</ogr:id> | ||
<ogr:id2>2</ogr:id2> | ||
<ogr:array>1</ogr:array> | ||
<ogr:array>2</ogr:array> | ||
<ogr:array>3</ogr:array> | ||
</ogr:refactor_array> | ||
</ogr:featureMember> | ||
<ogr:featureMember> | ||
<ogr:refactor_array gml:id="refactor_array.4"> | ||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>1 4</gml:lowerCorner><gml:upperCorner>1 4</gml:upperCorner></gml:Envelope></gml:boundedBy> | ||
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::4326" gml:id="refactor_array.geom.4"><gml:pos>1 4</gml:pos></gml:Point></ogr:geometryProperty> | ||
<ogr:fid>points.4</ogr:fid> | ||
<ogr:id>5</ogr:id> | ||
<ogr:id2>1</ogr:id2> | ||
<ogr:array>1</ogr:array> | ||
<ogr:array>2</ogr:array> | ||
<ogr:array>3</ogr:array> | ||
</ogr:refactor_array> | ||
</ogr:featureMember> | ||
<ogr:featureMember> | ||
<ogr:refactor_array gml:id="refactor_array.5"> | ||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>-5 0</gml:lowerCorner><gml:upperCorner>-5 0</gml:upperCorner></gml:Envelope></gml:boundedBy> | ||
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::4326" gml:id="refactor_array.geom.5"><gml:pos>-5 0</gml:pos></gml:Point></ogr:geometryProperty> | ||
<ogr:fid>points.5</ogr:fid> | ||
<ogr:id>6</ogr:id> | ||
<ogr:id2>0</ogr:id2> | ||
<ogr:array>1</ogr:array> | ||
<ogr:array>2</ogr:array> | ||
<ogr:array>3</ogr:array> | ||
</ogr:refactor_array> | ||
</ogr:featureMember> | ||
<ogr:featureMember> | ||
<ogr:refactor_array gml:id="refactor_array.6"> | ||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>-1 8</gml:lowerCorner><gml:upperCorner>-1 8</gml:upperCorner></gml:Envelope></gml:boundedBy> | ||
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::4326" gml:id="refactor_array.geom.6"><gml:pos>-1 8</gml:pos></gml:Point></ogr:geometryProperty> | ||
<ogr:fid>points.6</ogr:fid> | ||
<ogr:id>7</ogr:id> | ||
<ogr:id2>0</ogr:id2> | ||
<ogr:array>1</ogr:array> | ||
<ogr:array>2</ogr:array> | ||
<ogr:array>3</ogr:array> | ||
</ogr:refactor_array> | ||
</ogr:featureMember> | ||
<ogr:featureMember> | ||
<ogr:refactor_array gml:id="refactor_array.7"> | ||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>-1 7</gml:lowerCorner><gml:upperCorner>-1 7</gml:upperCorner></gml:Envelope></gml:boundedBy> | ||
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::4326" gml:id="refactor_array.geom.7"><gml:pos>-1 7</gml:pos></gml:Point></ogr:geometryProperty> | ||
<ogr:fid>points.7</ogr:fid> | ||
<ogr:id>8</ogr:id> | ||
<ogr:id2>0</ogr:id2> | ||
<ogr:array>1</ogr:array> | ||
<ogr:array>2</ogr:array> | ||
<ogr:array>3</ogr:array> | ||
</ogr:refactor_array> | ||
</ogr:featureMember> | ||
<ogr:featureMember> | ||
<ogr:refactor_array gml:id="refactor_array.8"> | ||
<gml:boundedBy><gml:Envelope srsName="urn:ogc:def:crs:EPSG::4326"><gml:lowerCorner>-1 0</gml:lowerCorner><gml:upperCorner>-1 0</gml:upperCorner></gml:Envelope></gml:boundedBy> | ||
<ogr:geometryProperty><gml:Point srsName="urn:ogc:def:crs:EPSG::4326" gml:id="refactor_array.geom.8"><gml:pos>-1 0</gml:pos></gml:Point></ogr:geometryProperty> | ||
<ogr:fid>points.8</ogr:fid> | ||
<ogr:id>9</ogr:id> | ||
<ogr:id2>0</ogr:id2> | ||
<ogr:array>1</ogr:array> | ||
<ogr:array>2</ogr:array> | ||
<ogr:array>3</ogr:array> | ||
</ogr:refactor_array> | ||
</ogr:featureMember> | ||
</ogr:FeatureCollection> |
74 changes: 74 additions & 0 deletions
74
python/plugins/processing/tests/testdata/expected/refactor_array.xsd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:schema | ||
targetNamespace="http://ogr.maptools.org/" | ||
xmlns:ogr="http://ogr.maptools.org/" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xmlns:gml="http://www.opengis.net/gml/3.2" | ||
xmlns:gmlsf="http://www.opengis.net/gmlsf/2.0" | ||
elementFormDefault="qualified" | ||
version="1.0"> | ||
<xs:annotation> | ||
<xs:appinfo source="http://schemas.opengis.net/gmlsfProfile/2.0/gmlsfLevels.xsd"> | ||
<gmlsf:ComplianceLevel>1</gmlsf:ComplianceLevel> | ||
</xs:appinfo> | ||
</xs:annotation> | ||
<xs:import namespace="http://www.opengis.net/gml/3.2" schemaLocation="http://schemas.opengis.net/gml/3.2.1/gml.xsd"/> | ||
<xs:import namespace="http://www.opengis.net/gmlsf/2.0" schemaLocation="http://schemas.opengis.net/gmlsfProfile/2.0/gmlsfLevels.xsd"/> | ||
<xs:element name="FeatureCollection" type="ogr:FeatureCollectionType" substitutionGroup="gml:AbstractFeature"/> | ||
<xs:complexType name="FeatureCollectionType"> | ||
<xs:complexContent> | ||
<xs:extension base="gml:AbstractFeatureType"> | ||
<xs:sequence minOccurs="0" maxOccurs="unbounded"> | ||
<xs:element name="featureMember"> | ||
<xs:complexType> | ||
<xs:complexContent> | ||
<xs:extension base="gml:AbstractFeatureMemberType"> | ||
<xs:sequence> | ||
<xs:element ref="gml:AbstractFeature"/> | ||
</xs:sequence> | ||
</xs:extension> | ||
</xs:complexContent> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:extension> | ||
</xs:complexContent> | ||
</xs:complexType> | ||
<xs:element name="refactor_array" type="ogr:refactor_array_Type" substitutionGroup="gml:AbstractFeature"/> | ||
<xs:complexType name="refactor_array_Type"> | ||
<xs:complexContent> | ||
<xs:extension base="gml:AbstractFeatureType"> | ||
<xs:sequence> | ||
<xs:element name="geometryProperty" type="gml:PointPropertyType" nillable="true" minOccurs="0" maxOccurs="1"/><!-- srsName="urn:ogc:def:crs:EPSG::4326" --> | ||
<xs:element name="fid" nillable="true" minOccurs="0" maxOccurs="1"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:string"> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
<xs:element name="id" nillable="true" minOccurs="0" maxOccurs="1"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:integer"> | ||
<xs:totalDigits value="10"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
<xs:element name="id2" nillable="true" minOccurs="0" maxOccurs="1"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:integer"> | ||
<xs:totalDigits value="10"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
<xs:element name="array" nillable="true" minOccurs="0" maxOccurs="unbounded"> | ||
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.