Skip to content
Permalink
Browse files

[processing] test poly_from_extent (#4149)

  • Loading branch information
ghtmtt authored and m-kuhn committed Feb 15, 2017
1 parent 13e7cd9 commit 34b277a09b43ef3ce8238ab1fef11e8775beadaa
@@ -0,0 +1,66 @@
<GMLFeatureClassList>
<GMLFeatureClass>
<Name>polygon_from_extent</Name>
<ElementPath>polygon_from_extent</ElementPath>
<!--POLYGON-->
<GeometryType>3</GeometryType>
<SRSName>EPSG:4326</SRSName>
<DatasetSpecificInfo>
<FeatureCount>1</FeatureCount>
<ExtentXMin>-1.00000</ExtentXMin>
<ExtentXMax>10.00000</ExtentXMax>
<ExtentYMin>-3.00000</ExtentYMin>
<ExtentYMax>6.00000</ExtentYMax>
</DatasetSpecificInfo>
<PropertyDefn>
<Name>MINX</Name>
<ElementPath>MINX</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
<PropertyDefn>
<Name>MINY</Name>
<ElementPath>MINY</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
<PropertyDefn>
<Name>MAXX</Name>
<ElementPath>MAXX</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
<PropertyDefn>
<Name>MAXY</Name>
<ElementPath>MAXY</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
<PropertyDefn>
<Name>CNTX</Name>
<ElementPath>CNTX</ElementPath>
<Type>Real</Type>
</PropertyDefn>
<PropertyDefn>
<Name>CNTY</Name>
<ElementPath>CNTY</ElementPath>
<Type>Real</Type>
</PropertyDefn>
<PropertyDefn>
<Name>AREA</Name>
<ElementPath>AREA</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
<PropertyDefn>
<Name>PERIM</Name>
<ElementPath>PERIM</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
<PropertyDefn>
<Name>HEIGHT</Name>
<ElementPath>HEIGHT</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
<PropertyDefn>
<Name>WIDTH</Name>
<ElementPath>WIDTH</ElementPath>
<Type>Integer</Type>
</PropertyDefn>
</GMLFeatureClass>
</GMLFeatureClassList>
@@ -0,0 +1,29 @@
<?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>-1</gml:X><gml:Y>-3</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:polygon_from_extent fid="polygon_from_extent.0">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-1,-3 -1,6 10,6 10,-3 -1,-3</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:MINX>-1</ogr:MINX>
<ogr:MINY>-3</ogr:MINY>
<ogr:MAXX>10</ogr:MAXX>
<ogr:MAXY>6</ogr:MAXY>
<ogr:CNTX>4.5</ogr:CNTX>
<ogr:CNTY>1.5</ogr:CNTY>
<ogr:AREA>99</ogr:AREA>
<ogr:PERIM>40</ogr:PERIM>
<ogr:HEIGHT>9</ogr:HEIGHT>
<ogr:WIDTH>11</ogr:WIDTH>
</ogr:polygon_from_extent>
</gml:featureMember>
</ogr:FeatureCollection>
@@ -2361,3 +2361,14 @@ tests:
name: expected/find_projection.html
type: file

- algorithm: qgis:polygonfromlayerextent
name: Standard polygon from layer extent
params:
BY_FEATURE: false
INPUT_LAYER:
name: polys.gml
type: vector
results:
OUTPUT:
name: expected/polygon_from_extent.gml
type: vector

0 comments on commit 34b277a

Please sign in to comment.
You can’t perform that action at this time.