-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improvements: - keep original field type and name for category field - add unit test
- Loading branch information
1 parent
adda744
commit b93be39
Showing
5 changed files
with
153 additions
and
32 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
45 changes: 45 additions & 0 deletions
45
python/plugins/processing/tests/testdata/expected/stats_by_category.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,45 @@ | ||
<GMLFeatureClassList> | ||
<GMLFeatureClass> | ||
<Name>stats_by_category</Name> | ||
<ElementPath>stats_by_category</ElementPath> | ||
<GeometryType>100</GeometryType> | ||
<DatasetSpecificInfo> | ||
<FeatureCount>3</FeatureCount> | ||
</DatasetSpecificInfo> | ||
<PropertyDefn> | ||
<Name>id2</Name> | ||
<ElementPath>id2</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>min</Name> | ||
<ElementPath>min</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>max</Name> | ||
<ElementPath>max</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>mean</Name> | ||
<ElementPath>mean</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>stddev</Name> | ||
<ElementPath>stddev</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>sum</Name> | ||
<ElementPath>sum</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>count</Name> | ||
<ElementPath>count</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
</GMLFeatureClass> | ||
</GMLFeatureClassList> |
42 changes: 42 additions & 0 deletions
42
python/plugins/processing/tests/testdata/expected/stats_by_category.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,42 @@ | ||
<?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:stats_by_category fid="stats_by_category.0"> | ||
<ogr:id2>2</ogr:id2> | ||
<ogr:min>1</ogr:min> | ||
<ogr:max>4</ogr:max> | ||
<ogr:mean>2.5</ogr:mean> | ||
<ogr:stddev>2.12132034355964</ogr:stddev> | ||
<ogr:sum>5</ogr:sum> | ||
<ogr:count>2</ogr:count> | ||
</ogr:stats_by_category> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_category fid="stats_by_category.1"> | ||
<ogr:id2>1</ogr:id2> | ||
<ogr:min>2</ogr:min> | ||
<ogr:max>5</ogr:max> | ||
<ogr:mean>3.5</ogr:mean> | ||
<ogr:stddev>2.12132034355964</ogr:stddev> | ||
<ogr:sum>7</ogr:sum> | ||
<ogr:count>2</ogr:count> | ||
</ogr:stats_by_category> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:stats_by_category fid="stats_by_category.2"> | ||
<ogr:id2>0</ogr:id2> | ||
<ogr:min>3</ogr:min> | ||
<ogr:max>9</ogr:max> | ||
<ogr:mean>6.6</ogr:mean> | ||
<ogr:stddev>2.30217288664427</ogr:stddev> | ||
<ogr:sum>33</ogr:sum> | ||
<ogr:count>5</ogr:count> | ||
</ogr:stats_by_category> | ||
</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