Nyall Dawson 772b769403 [processing] Hide redundant grid creation algorithms
Condenses the duplicate grid algorithms into single algorithms
(one for line, one for polygon), taking the best bits from both
and adding tests
2016-11-24 13:18:47 +10:00

135 lines
7.5 KiB
XML

<?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>-5.5</gml:Y></gml:coord>
<gml:coord><gml:X>14</gml:X><gml:Y>6.5</gml:Y></gml:coord>
</gml:Box>
</gml:boundedBy>
<gml:featureMember>
<ogr:grid_rectangles fid="grid_rectangles.0">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-1.0,6.5 4.0,6.5 4.0,3.5 -1.0,3.5 -1.0,6.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:left>-1.0000000000000000</ogr:left>
<ogr:top>6.5000000000000000</ogr:top>
<ogr:right>4.0000000000000000</ogr:right>
<ogr:bottom>3.5000000000000000</ogr:bottom>
<ogr:id>1</ogr:id>
</ogr:grid_rectangles>
</gml:featureMember>
<gml:featureMember>
<ogr:grid_rectangles fid="grid_rectangles.1">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-1.0,3.5 4.0,3.5 4.0,0.5 -1.0,0.5 -1.0,3.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:left>-1.0000000000000000</ogr:left>
<ogr:top>3.5000000000000000</ogr:top>
<ogr:right>4.0000000000000000</ogr:right>
<ogr:bottom>0.5000000000000000</ogr:bottom>
<ogr:id>2</ogr:id>
</ogr:grid_rectangles>
</gml:featureMember>
<gml:featureMember>
<ogr:grid_rectangles fid="grid_rectangles.2">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-1.0,0.5 4.0,0.5 4.0,-2.5 -1.0,-2.5 -1.0,0.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:left>-1.0000000000000000</ogr:left>
<ogr:top>0.5000000000000000</ogr:top>
<ogr:right>4.0000000000000000</ogr:right>
<ogr:bottom>-2.5000000000000000</ogr:bottom>
<ogr:id>3</ogr:id>
</ogr:grid_rectangles>
</gml:featureMember>
<gml:featureMember>
<ogr:grid_rectangles fid="grid_rectangles.3">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-1.0,-2.5 4.0,-2.5 4.0,-5.5 -1.0,-5.5 -1.0,-2.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:left>-1.0000000000000000</ogr:left>
<ogr:top>-2.5000000000000000</ogr:top>
<ogr:right>4.0000000000000000</ogr:right>
<ogr:bottom>-5.5000000000000000</ogr:bottom>
<ogr:id>4</ogr:id>
</ogr:grid_rectangles>
</gml:featureMember>
<gml:featureMember>
<ogr:grid_rectangles fid="grid_rectangles.4">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4.0,6.5 9.0,6.5 9.0,3.5 4.0,3.5 4.0,6.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:left>4.0000000000000000</ogr:left>
<ogr:top>6.5000000000000000</ogr:top>
<ogr:right>9.0000000000000000</ogr:right>
<ogr:bottom>3.5000000000000000</ogr:bottom>
<ogr:id>5</ogr:id>
</ogr:grid_rectangles>
</gml:featureMember>
<gml:featureMember>
<ogr:grid_rectangles fid="grid_rectangles.5">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4.0,3.5 9.0,3.5 9.0,0.5 4.0,0.5 4.0,3.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:left>4.0000000000000000</ogr:left>
<ogr:top>3.5000000000000000</ogr:top>
<ogr:right>9.0000000000000000</ogr:right>
<ogr:bottom>0.5000000000000000</ogr:bottom>
<ogr:id>6</ogr:id>
</ogr:grid_rectangles>
</gml:featureMember>
<gml:featureMember>
<ogr:grid_rectangles fid="grid_rectangles.6">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4.0,0.5 9.0,0.5 9.0,-2.5 4.0,-2.5 4.0,0.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:left>4.0000000000000000</ogr:left>
<ogr:top>0.5000000000000000</ogr:top>
<ogr:right>9.0000000000000000</ogr:right>
<ogr:bottom>-2.5000000000000000</ogr:bottom>
<ogr:id>7</ogr:id>
</ogr:grid_rectangles>
</gml:featureMember>
<gml:featureMember>
<ogr:grid_rectangles fid="grid_rectangles.7">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4.0,-2.5 9.0,-2.5 9.0,-5.5 4.0,-5.5 4.0,-2.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:left>4.0000000000000000</ogr:left>
<ogr:top>-2.5000000000000000</ogr:top>
<ogr:right>9.0000000000000000</ogr:right>
<ogr:bottom>-5.5000000000000000</ogr:bottom>
<ogr:id>8</ogr:id>
</ogr:grid_rectangles>
</gml:featureMember>
<gml:featureMember>
<ogr:grid_rectangles fid="grid_rectangles.8">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>9.0,6.5 14.0,6.5 14.0,3.5 9.0,3.5 9.0,6.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:left>9.0000000000000000</ogr:left>
<ogr:top>6.5000000000000000</ogr:top>
<ogr:right>14.0000000000000000</ogr:right>
<ogr:bottom>3.5000000000000000</ogr:bottom>
<ogr:id>9</ogr:id>
</ogr:grid_rectangles>
</gml:featureMember>
<gml:featureMember>
<ogr:grid_rectangles fid="grid_rectangles.9">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>9.0,3.5 14.0,3.5 14.0,0.5 9.0,0.5 9.0,3.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:left>9.0000000000000000</ogr:left>
<ogr:top>3.5000000000000000</ogr:top>
<ogr:right>14.0000000000000000</ogr:right>
<ogr:bottom>0.5000000000000000</ogr:bottom>
<ogr:id>10</ogr:id>
</ogr:grid_rectangles>
</gml:featureMember>
<gml:featureMember>
<ogr:grid_rectangles fid="grid_rectangles.10">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>9.0,0.5 14.0,0.5 14.0,-2.5 9.0,-2.5 9.0,0.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:left>9.0000000000000000</ogr:left>
<ogr:top>0.5000000000000000</ogr:top>
<ogr:right>14.0000000000000000</ogr:right>
<ogr:bottom>-2.5000000000000000</ogr:bottom>
<ogr:id>11</ogr:id>
</ogr:grid_rectangles>
</gml:featureMember>
<gml:featureMember>
<ogr:grid_rectangles fid="grid_rectangles.11">
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>9.0,-2.5 14.0,-2.5 14.0,-5.5 9.0,-5.5 9.0,-2.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
<ogr:left>9.0000000000000000</ogr:left>
<ogr:top>-2.5000000000000000</ogr:top>
<ogr:right>14.0000000000000000</ogr:right>
<ogr:bottom>-5.5000000000000000</ogr:bottom>
<ogr:id>12</ogr:id>
</ogr:grid_rectangles>
</gml:featureMember>
</ogr:FeatureCollection>