mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-01 00:46:20 -05:00
Condenses the duplicate grid algorithms into single algorithms (one for line, one for polygon), taking the best bits from both and adding tests
215 lines
12 KiB
XML
215 lines
12 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>-7</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_diamond fid="grid_diamond.0">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-1,5 1.5,6.5 4,5 1.5,3.5 -1,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_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.1">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-1,2 1.5,3.5 4,2 1.5,0.5 -1,2</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_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.2">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-1,-1 1.5,0.5 4,-1 1.5,-2.5 -1,-1</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_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.3">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>-1,-4 1.5,-2.5 4,-4 1.5,-5.5 -1,-4</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_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.4">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1.5,3.5 4,5 6.5,3.5 4,2 1.5,3.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
|
<ogr:left>1.5000000000000000</ogr:left>
|
|
<ogr:top>5.0000000000000000</ogr:top>
|
|
<ogr:right>6.5000000000000000</ogr:right>
|
|
<ogr:bottom>2.0000000000000000</ogr:bottom>
|
|
<ogr:id>5</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.5">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1.5,0.5 4,2 6.5,0.5 4,-1 1.5,0.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
|
<ogr:left>1.5000000000000000</ogr:left>
|
|
<ogr:top>2.0000000000000000</ogr:top>
|
|
<ogr:right>6.5000000000000000</ogr:right>
|
|
<ogr:bottom>-1.0000000000000000</ogr:bottom>
|
|
<ogr:id>6</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.6">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1.5,-2.5 4,-1 6.5,-2.5 4,-4 1.5,-2.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
|
<ogr:left>1.5000000000000000</ogr:left>
|
|
<ogr:top>-1.0000000000000000</ogr:top>
|
|
<ogr:right>6.5000000000000000</ogr:right>
|
|
<ogr:bottom>-4.0000000000000000</ogr:bottom>
|
|
<ogr:id>7</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.7">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>1.5,-5.5 4,-4 6.5,-5.5 4,-7 1.5,-5.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
|
<ogr:left>1.5000000000000000</ogr:left>
|
|
<ogr:top>-4.0000000000000000</ogr:top>
|
|
<ogr:right>6.5000000000000000</ogr:right>
|
|
<ogr:bottom>-7.0000000000000000</ogr:bottom>
|
|
<ogr:id>8</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.8">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4,5 6.5,6.5 9,5 6.5,3.5 4,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>9</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.9">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4,2 6.5,3.5 9,2 6.5,0.5 4,2</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>10</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.10">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4,-1 6.5,0.5 9,-1 6.5,-2.5 4,-1</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>11</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.11">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>4,-4 6.5,-2.5 9,-4 6.5,-5.5 4,-4</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>12</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.12">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>6.5,3.5 9,5 11.5,3.5 9,2 6.5,3.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
|
<ogr:left>6.5000000000000000</ogr:left>
|
|
<ogr:top>5.0000000000000000</ogr:top>
|
|
<ogr:right>11.5000000000000000</ogr:right>
|
|
<ogr:bottom>2.0000000000000000</ogr:bottom>
|
|
<ogr:id>13</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.13">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>6.5,0.5 9,2 11.5,0.5 9,-1 6.5,0.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
|
<ogr:left>6.5000000000000000</ogr:left>
|
|
<ogr:top>2.0000000000000000</ogr:top>
|
|
<ogr:right>11.5000000000000000</ogr:right>
|
|
<ogr:bottom>-1.0000000000000000</ogr:bottom>
|
|
<ogr:id>14</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.14">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>6.5,-2.5 9,-1 11.5,-2.5 9,-4 6.5,-2.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
|
<ogr:left>6.5000000000000000</ogr:left>
|
|
<ogr:top>-1.0000000000000000</ogr:top>
|
|
<ogr:right>11.5000000000000000</ogr:right>
|
|
<ogr:bottom>-4.0000000000000000</ogr:bottom>
|
|
<ogr:id>15</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.15">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>6.5,-5.5 9,-4 11.5,-5.5 9,-7 6.5,-5.5</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></ogr:geometryProperty>
|
|
<ogr:left>6.5000000000000000</ogr:left>
|
|
<ogr:top>-4.0000000000000000</ogr:top>
|
|
<ogr:right>11.5000000000000000</ogr:right>
|
|
<ogr:bottom>-7.0000000000000000</ogr:bottom>
|
|
<ogr:id>16</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.16">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>9,5 11.5,6.5 14,5 11.5,3.5 9,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>17</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.17">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>9,2 11.5,3.5 14,2 11.5,0.5 9,2</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>18</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.18">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>9,-1 11.5,0.5 14,-1 11.5,-2.5 9,-1</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>19</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
<gml:featureMember>
|
|
<ogr:grid_diamond fid="grid_diamond.19">
|
|
<ogr:geometryProperty><gml:Polygon srsName="EPSG:4326"><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>9,-4 11.5,-2.5 14,-4 11.5,-5.5 9,-4</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>20</ogr:id>
|
|
</ogr:grid_diamond>
|
|
</gml:featureMember>
|
|
</ogr:FeatureCollection>
|