Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port Unique Values algorithm to new API
Improvements: - by default output a table with unique values, instead of a HTML file. This allows the values to be more easily used in follow up analysis (e.g. in a model). HTML output is still available, but not output by default
- Loading branch information
1 parent
82edbab
commit ea06500
Showing
5 changed files
with
111 additions
and
25 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
15 changes: 15 additions & 0 deletions
15
python/plugins/processing/tests/testdata/expected/unique_values.gfs
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,15 @@ | ||
<GMLFeatureClassList> | ||
<GMLFeatureClass> | ||
<Name>unique_values</Name> | ||
<ElementPath>unique_values</ElementPath> | ||
<GeometryType>100</GeometryType> | ||
<DatasetSpecificInfo> | ||
<FeatureCount>3</FeatureCount> | ||
</DatasetSpecificInfo> | ||
<PropertyDefn> | ||
<Name>VALUES</Name> | ||
<ElementPath>VALUES</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
</GMLFeatureClass> | ||
</GMLFeatureClassList> |
24 changes: 24 additions & 0 deletions
24
python/plugins/processing/tests/testdata/expected/unique_values.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,24 @@ | ||
<?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:null>missing</gml:null></gml:boundedBy> | ||
|
||
<gml:featureMember> | ||
<ogr:unique_values fid="unique_values.0"> | ||
<ogr:VALUES>0</ogr:VALUES> | ||
</ogr:unique_values> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:unique_values fid="unique_values.1"> | ||
<ogr:VALUES>1</ogr:VALUES> | ||
</ogr:unique_values> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:unique_values fid="unique_values.2"> | ||
<ogr:VALUES>2</ogr:VALUES> | ||
</ogr:unique_values> | ||
</gml:featureMember> | ||
</ogr:FeatureCollection> |
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