Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[processing] group option for autoincrement field algorithm
- Loading branch information
1 parent
62ff88a
commit 8026008
Showing
5 changed files
with
204 additions
and
6 deletions.
There are no files selected for viewing
97 changes: 97 additions & 0 deletions
97
python/plugins/processing/tests/testdata/expected/autoincrement_grouped.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,97 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ogr:FeatureCollection | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://ogr.maptools.org/ autoincrement_grouped.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.162955854126682</gml:X><gml:Y>6.088675623800385</gml:Y></gml:coord> | ||
</gml:Box> | ||
</gml:boundedBy> | ||
|
||
<gml:featureMember> | ||
<ogr:autoincrement_grouped fid="polys.0"> | ||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-1,-1 -1,3 3,3 3,2 2,2 2,-1 -1,-1</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | ||
<ogr:name>aa</ogr:name> | ||
<ogr:intval>1</ogr:intval> | ||
<ogr:floatval>44.123456</ogr:floatval> | ||
<ogr:AUTO>6</ogr:AUTO> | ||
</ogr:autoincrement_grouped> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:autoincrement_grouped fid="polys.1"> | ||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>6.24145873320538,-0.054510556621882 7.24145873320538,-1.05451055662188 5.24145873320538,-1.05451055662188 6.24145873320538,-0.054510556621882</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | ||
<ogr:name>dd</ogr:name> | ||
<ogr:floatval>0</ogr:floatval> | ||
<ogr:AUTO>6</ogr:AUTO> | ||
</ogr:autoincrement_grouped> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:autoincrement_grouped fid="polys.2"> | ||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2,5 2,6 3,6 3,5 2,5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | ||
<ogr:name>bb</ogr:name> | ||
<ogr:intval>1</ogr:intval> | ||
<ogr:floatval>0.123</ogr:floatval> | ||
<ogr:AUTO>6</ogr:AUTO> | ||
</ogr:autoincrement_grouped> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:autoincrement_grouped fid="polys.3"> | ||
<ogr:intval>120</ogr:intval> | ||
<ogr:floatval>-100291.43213</ogr:floatval> | ||
<ogr:AUTO>6</ogr:AUTO> | ||
</ogr:autoincrement_grouped> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:autoincrement_grouped fid="polys.4"> | ||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>3,2 6,1 6,-3 2,-1 2,2 3,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | ||
<ogr:name>aa</ogr:name> | ||
<ogr:intval>1</ogr:intval> | ||
<ogr:floatval>3.33</ogr:floatval> | ||
<ogr:AUTO>7</ogr:AUTO> | ||
</ogr:autoincrement_grouped> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:autoincrement_grouped fid="polys.5"> | ||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2.44337811900192,4.42360844529751 2.44337811900192,5.42360844529751 3.44337811900192,5.42360844529751 3.44337811900192,4.42360844529751 2.44337811900192,4.42360844529751</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | ||
<ogr:name>bb</ogr:name> | ||
<ogr:intval>1</ogr:intval> | ||
<ogr:floatval>0.123</ogr:floatval> | ||
<ogr:AUTO>7</ogr:AUTO> | ||
</ogr:autoincrement_grouped> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:autoincrement_grouped fid="polys.6"> | ||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4.17255278310941,4.82264875239923 4.17255278310941,5.82264875239923 5.17255278310941,5.82264875239923 5.17255278310941,4.82264875239923 4.17255278310941,4.82264875239923</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | ||
<ogr:name>bb</ogr:name> | ||
<ogr:intval>1</ogr:intval> | ||
<ogr:floatval>0.123</ogr:floatval> | ||
<ogr:AUTO>8</ogr:AUTO> | ||
</ogr:autoincrement_grouped> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:autoincrement_grouped fid="polys.7"> | ||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>8.16295585412668,2.73877159309021 8.16295585412668,3.73877159309021 9.16295585412668,3.73877159309021 9.16295585412668,2.73877159309021 8.16295585412668,2.73877159309021</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | ||
<ogr:name>cc</ogr:name> | ||
<ogr:floatval>0.123</ogr:floatval> | ||
<ogr:AUTO>6</ogr:AUTO> | ||
</ogr:autoincrement_grouped> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:autoincrement_grouped fid="polys.9"> | ||
<ogr:name>dd</ogr:name> | ||
<ogr:AUTO>7</ogr:AUTO> | ||
</ogr:autoincrement_grouped> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:autoincrement_grouped fid="polys.8"> | ||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2.62072936660269,5.08867562380038 2.62072936660269,6.08867562380038 3.62072936660269,6.08867562380038 3.62072936660269,5.08867562380038 2.62072936660269,5.08867562380038</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | ||
<ogr:name>bb</ogr:name> | ||
<ogr:intval>2</ogr:intval> | ||
<ogr:floatval>0.123</ogr:floatval> | ||
<ogr:AUTO>6</ogr:AUTO> | ||
</ogr:autoincrement_grouped> | ||
</gml:featureMember> | ||
</ogr:FeatureCollection> |
50 changes: 50 additions & 0 deletions
50
python/plugins/processing/tests/testdata/expected/autoincrement_grouped.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,50 @@ | ||
<?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="autoincrement_grouped" type="ogr:autoincrement_grouped_Type" substitutionGroup="gml:_Feature"/> | ||
<xs:complexType name="autoincrement_grouped_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="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:element name="floatval" nillable="true" minOccurs="0" maxOccurs="1"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:decimal"> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
</xs:element> | ||
<xs:element name="AUTO" nillable="true" minOccurs="0" maxOccurs="1"> | ||
<xs:simpleType> | ||
<xs:restriction base="xs:long"> | ||
<xs:totalDigits value="20"/> | ||
</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
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