Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Add tests for gridify
- Loading branch information
1 parent
591de92
commit 0930e18
Showing
5 changed files
with
177 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
python/plugins/processing/tests/testdata/expected/gridify_lines.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,16 @@ | ||
<GMLFeatureClassList> | ||
<GMLFeatureClass> | ||
<Name>gridify_lines</Name> | ||
<ElementPath>gridify_lines</ElementPath> | ||
<!--LINESTRING--> | ||
<GeometryType>2</GeometryType> | ||
<SRSName>EPSG:4326</SRSName> | ||
<DatasetSpecificInfo> | ||
<FeatureCount>7</FeatureCount> | ||
<ExtentXMin>2.00000</ExtentXMin> | ||
<ExtentXMax>12.00000</ExtentXMax> | ||
<ExtentYMin>-4.00000</ExtentYMin> | ||
<ExtentYMax>4.00000</ExtentYMax> | ||
</DatasetSpecificInfo> | ||
</GMLFeatureClass> | ||
</GMLFeatureClassList> |
46 changes: 46 additions & 0 deletions
46
python/plugins/processing/tests/testdata/expected/gridify_lines.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,46 @@ | ||
<?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:Box> | ||
<gml:coord><gml:X>2</gml:X><gml:Y>-4</gml:Y></gml:coord> | ||
<gml:coord><gml:X>12</gml:X><gml:Y>4</gml:Y></gml:coord> | ||
</gml:Box> | ||
</gml:boundedBy> | ||
|
||
<gml:featureMember> | ||
<ogr:gridify_lines fid="lines.0"> | ||
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6,2 8,2 8,4 12,4</gml:coordinates></gml:LineString></ogr:geometryProperty> | ||
</ogr:gridify_lines> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:gridify_lines fid="lines.1"> | ||
</ogr:gridify_lines> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:gridify_lines fid="lines.2"> | ||
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>2,0 2,2 4,2 4,4</gml:coordinates></gml:LineString></ogr:geometryProperty> | ||
</ogr:gridify_lines> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:gridify_lines fid="lines.3"> | ||
</ogr:gridify_lines> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:gridify_lines fid="lines.4"> | ||
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>8,-4 10,-4</gml:coordinates></gml:LineString></ogr:geometryProperty> | ||
</ogr:gridify_lines> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:gridify_lines fid="lines.5"> | ||
<ogr:geometryProperty><gml:LineString srsName="EPSG:4326"><gml:coordinates>6,-4 10,0</gml:coordinates></gml:LineString></ogr:geometryProperty> | ||
</ogr:gridify_lines> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:gridify_lines fid="lines.6"> | ||
</ogr:gridify_lines> | ||
</gml:featureMember> | ||
</ogr:FeatureCollection> |
32 changes: 32 additions & 0 deletions
32
python/plugins/processing/tests/testdata/expected/gridify_polys.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,32 @@ | ||
<GMLFeatureClassList> | ||
<GMLFeatureClass> | ||
<Name>gridify_polys</Name> | ||
<ElementPath>gridify_polys</ElementPath> | ||
<!--POLYGON--> | ||
<GeometryType>3</GeometryType> | ||
<SRSName>EPSG:4326</SRSName> | ||
<DatasetSpecificInfo> | ||
<FeatureCount>6</FeatureCount> | ||
<ExtentXMin>0.00000</ExtentXMin> | ||
<ExtentXMax>10.00000</ExtentXMax> | ||
<ExtentYMin>-4.00000</ExtentYMin> | ||
<ExtentYMax>6.00000</ExtentYMax> | ||
</DatasetSpecificInfo> | ||
<PropertyDefn> | ||
<Name>name</Name> | ||
<ElementPath>name</ElementPath> | ||
<Type>String</Type> | ||
<Width>5</Width> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>intval</Name> | ||
<ElementPath>intval</ElementPath> | ||
<Type>Integer</Type> | ||
</PropertyDefn> | ||
<PropertyDefn> | ||
<Name>floatval</Name> | ||
<ElementPath>floatval</ElementPath> | ||
<Type>Real</Type> | ||
</PropertyDefn> | ||
</GMLFeatureClass> | ||
</GMLFeatureClassList> |
57 changes: 57 additions & 0 deletions
57
python/plugins/processing/tests/testdata/expected/gridify_polys.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,57 @@ | ||
<?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:Box> | ||
<gml:coord><gml:X>-0</gml:X><gml:Y>-4</gml:Y></gml:coord> | ||
<gml:coord><gml:X>10</gml:X><gml:Y>6</gml:Y></gml:coord> | ||
</gml:Box> | ||
</gml:boundedBy> | ||
|
||
<gml:featureMember> | ||
<ogr:gridify_polys fid="polys.0"> | ||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>0,0 0,4 4,4 4,2 2,2 2,0 0,0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | ||
<ogr:name>aaaaa</ogr:name> | ||
<ogr:intval>33</ogr:intval> | ||
<ogr:floatval>44.123456</ogr:floatval> | ||
</ogr:gridify_polys> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:gridify_polys fid="polys.1"> | ||
<ogr:name>Aaaaa</ogr:name> | ||
<ogr:intval>-33</ogr:intval> | ||
<ogr:floatval>0</ogr:floatval> | ||
</ogr:gridify_polys> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:gridify_polys fid="polys.2"> | ||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>2,4 2,6 4,6 4,4 2,4</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | ||
<ogr:name>bbaaa</ogr:name> | ||
<ogr:floatval>0.123</ogr:floatval> | ||
</ogr:gridify_polys> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:gridify_polys fid="polys.3"> | ||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>6,0 10,0 10,-4 6,-4 6,0</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | ||
<ogr:name>ASDF</ogr:name> | ||
<ogr:intval>0</ogr:intval> | ||
</ogr:gridify_polys> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:gridify_polys fid="polys.4"> | ||
<ogr:intval>120</ogr:intval> | ||
<ogr:floatval>-100291.43213</ogr:floatval> | ||
</ogr:gridify_polys> | ||
</gml:featureMember> | ||
<gml:featureMember> | ||
<ogr:gridify_polys fid="polys.5"> | ||
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4,2 6,0 6,-4 2,0 2,2 4,2</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty> | ||
<ogr:name>elim</ogr:name> | ||
<ogr:intval>2</ogr:intval> | ||
<ogr:floatval>3.33</ogr:floatval> | ||
</ogr:gridify_polys> | ||
</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