-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[processing] List unique values improvements
- allow running on non-spatial tables - allow choice of more than one field
- Loading branch information
1 parent
ebd98e3
commit 5b1da98
Showing
7 changed files
with
150 additions
and
20 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
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
45 changes: 45 additions & 0 deletions
45
python/plugins/processing/tests/testdata/expected/unique_values_multiple.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,45 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ogr:FeatureCollection | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://ogr.maptools.org/ unique_values_multiple.xsd" | ||
xmlns:ogr="http://ogr.maptools.org/" | ||
xmlns:gml="http://www.opengis.net/gml"> | ||
<gml:boundedBy><gml:null>missing</gml:null></gml:boundedBy> | ||
|
||
<gml:featureMember> | ||
<ogr:unique_values_multiple fid="unique_values_multiple.0"> | ||
<ogr:name>aa</ogr:name> | ||
<ogr:intval>1</ogr:intval> | ||
</ogr:unique_values_multiple> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:unique_values_multiple fid="unique_values_multiple.1"> | ||
<ogr:name>bb</ogr:name> | ||
<ogr:intval>2</ogr:intval> | ||
</ogr:unique_values_multiple> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:unique_values_multiple fid="unique_values_multiple.2"> | ||
<ogr:name>cc</ogr:name> | ||
<ogr:intval xsi:nil="true"/> | ||
</ogr:unique_values_multiple> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:unique_values_multiple fid="unique_values_multiple.3"> | ||
<ogr:name xsi:nil="true"/> | ||
<ogr:intval>120</ogr:intval> | ||
</ogr:unique_values_multiple> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:unique_values_multiple fid="unique_values_multiple.4"> | ||
<ogr:name>bb</ogr:name> | ||
<ogr:intval>1</ogr:intval> | ||
</ogr:unique_values_multiple> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:unique_values_multiple fid="unique_values_multiple.5"> | ||
<ogr:name>dd</ogr:name> | ||
<ogr:intval xsi:nil="true"/> | ||
</ogr:unique_values_multiple> | ||
</gml:featureMember> | ||
</ogr:FeatureCollection> |
36 changes: 36 additions & 0 deletions
36
python/plugins/processing/tests/testdata/expected/unique_values_multiple.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,36 @@ | ||
<?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="unique_values_multiple" type="ogr:unique_values_multiple_Type" substitutionGroup="gml:_Feature"/> | ||
<xs:complexType name="unique_values_multiple_Type"> | ||
<xs:complexContent> | ||
<xs:extension base="gml:AbstractFeatureType"> | ||
<xs:sequence> | ||
<xs:element name="name" nillable="true" minOccurs="0" maxOccurs="1"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:string"> | ||
<xs:maxLength value="2"/> | ||
</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="10"/> | ||
</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