[OpenLayers-Commits] r1989 - in sandbox/vector/examples: . geometry_testcase

commits at openlayers.org commits at openlayers.org
Fri Dec 1 12:44:01 EST 2006


Author: pgiraud
Date: 2006-12-01 12:44:00 -0500 (Fri, 01 Dec 2006)
New Revision: 1989

Added:
   sandbox/vector/examples/geometry_testcase/
   sandbox/vector/examples/geometry_testcase/line.xml
   sandbox/vector/examples/geometry_testcase/multipoint.xml
   sandbox/vector/examples/geometry_testcase/multipolygon.xml
   sandbox/vector/examples/geometry_testcase/point.xml
   sandbox/vector/examples/geometry_testcase/polygon.xml
Modified:
   sandbox/vector/examples/GML.html
Log:
new test case for gml layers

Modified: sandbox/vector/examples/GML.html
===================================================================
--- sandbox/vector/examples/GML.html	2006-12-01 14:37:39 UTC (rev 1988)
+++ sandbox/vector/examples/GML.html	2006-12-01 17:44:00 UTC (rev 1989)
@@ -17,14 +17,26 @@
             layer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
                 "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} );
             map.addLayer(layer);
-
-            vector = new OpenLayers.Layer.GML("US Interstate","us_interstate.xml");
-            map.addLayer(vector);
+/*
+            point = new OpenLayers.Layer.GML("Point","geometry_testcase/point.xml");
+            map.addLayer(point);
             
+            multipoint = new OpenLayers.Layer.GML("MultiPoint","geometry_testcase/multipoint.xml");
+            map.addLayer(multipoint);
+            
+            line = new OpenLayers.Layer.GML("Line","geometry_testcase/line.xml");
+            map.addLayer(line);
+*/
+            polygon = new OpenLayers.Layer.GML("Polygon","geometry_testcase/polygon.xml");
+            map.addLayer(polygon);
+/*            
+            multipolygon = new OpenLayers.Layer.GML("MultiPolygon","geometry_testcase/multipolygon.xml");
+            map.addLayer(multipolygon);
+*/            
             //var results = OpenLayers.loadURL("us_interstate.xml", null, this, requestSuccess, requestFailure);
 
             map.addControl(new OpenLayers.Control.LayerSwitcher());
-            map.setCenter(new OpenLayers.LonLat(-100, 60), 3);
+            map.setCenter(new OpenLayers.LonLat(0, 45), 5);
         }
         // -->
     </script>

Added: sandbox/vector/examples/geometry_testcase/line.xml
===================================================================
--- sandbox/vector/examples/geometry_testcase/line.xml	                        (rev 0)
+++ sandbox/vector/examples/geometry_testcase/line.xml	2006-12-01 17:44:00 UTC (rev 1989)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd                         http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=line&amp;OUTPUTFORMAT=XMLSCHEMA">
+      <gml:boundedBy>
+      	<gml:Box srsName="EPSG:4326">
+      		<gml:coordinates>-3.924027,46.037889 2.193186,47.897181</gml:coordinates>
+      	</gml:Box>
+      </gml:boundedBy>
+    <gml:featureMember>
+      <ms:line fid="1">
+        <gml:boundedBy>
+        	<gml:Box srsName="EPSG:4326">
+        		<gml:coordinates>-0.631235,46.037889 2.193186,46.704963</gml:coordinates>
+        	</gml:Box>
+        </gml:boundedBy>
+        <ms:msGeometry>
+        <gml:LineString srsName="EPSG:4326">
+          <gml:coordinates>-0.631235,46.307557 -0.262215,46.577225 0.106805,46.477874 0.220349,46.293364 0.475824,46.406909 0.887424,46.350136 1.029354,46.563032 1.213864,46.648191 1.526112,46.421102 1.795780,46.066275 2.108028,46.037889 2.178993,46.250785 2.193186,46.492067 2.193186,46.492067 2.051255,46.704963 2.051255,46.704963 </gml:coordinates>
+        </gml:LineString>
+        </ms:msGeometry>
+        <ms:ogc_fid>1</ms:ogc_fid>
+        <ms:name/>
+        <ms:id>0</ms:id>
+      </ms:line>
+    </gml:featureMember>
+    <gml:featureMember>
+      <ms:line fid="2">
+        <gml:boundedBy>
+        	<gml:Box srsName="EPSG:4326">
+        		<gml:coordinates>-3.924027,46.279171 -1.127992,47.897181</gml:coordinates>
+        	</gml:Box>
+        </gml:boundedBy>
+        <ms:msGeometry>
+        <gml:LineString srsName="EPSG:4326">
+          <gml:coordinates>-1.127992,46.279171 -1.369275,46.364329 -1.624750,46.406909 -1.866032,46.492067 -1.993770,46.704963 -2.178280,46.846894 -1.979577,47.059790 -2.164087,47.144948 -2.135700,47.215914 -2.093121,47.357844 -2.277631,47.258493 -2.391176,47.301072 -2.490527,47.315265 -2.476334,47.443003 -2.575686,47.599127 -2.703423,47.542354 -2.873740,47.471389 -3.285339,47.670092 -3.597587,47.769443 -3.824676,47.840409 -3.924027,47.897181 </gml:coordinates>
+        </gml:LineString>
+        </ms:msGeometry>
+        <ms:ogc_fid>2</ms:ogc_fid>
+        <ms:name/>
+        <ms:id>0</ms:id>
+      </ms:line>
+    </gml:featureMember>
+</wfs:FeatureCollection>
\ No newline at end of file

Added: sandbox/vector/examples/geometry_testcase/multipoint.xml
===================================================================
--- sandbox/vector/examples/geometry_testcase/multipoint.xml	                        (rev 0)
+++ sandbox/vector/examples/geometry_testcase/multipoint.xml	2006-12-01 17:44:00 UTC (rev 1989)
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd                         http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=multipoint&amp;OUTPUTFORMAT=XMLSCHEMA">
+      <gml:boundedBy>
+      	<gml:Box srsName="EPSG:4326">
+      		<gml:coordinates>0.490018,45.001795 3.016384,45.839186</gml:coordinates>
+      	</gml:Box>
+      </gml:boundedBy>
+    <gml:featureMember>
+      <ms:multipoint fid="1">
+        <gml:boundedBy>
+        	<gml:Box srsName="EPSG:4326">
+        		<gml:coordinates>0.930003,45.001795 3.016384,45.541131</gml:coordinates>
+        	</gml:Box>
+        </gml:boundedBy>
+        <ms:msGeometry>
+        <gml:MultiPoint srsName="EPSG:4326">
+          <gml:pointMember>
+            <gml:Point>
+              <gml:coordinates>2.079641,45.001795</gml:coordinates>
+            </gml:Point>
+          </gml:pointMember>
+          <gml:pointMember>
+            <gml:Point>
+              <gml:coordinates>2.718330,45.541131</gml:coordinates>
+            </gml:Point>
+          </gml:pointMember>
+          <gml:pointMember>
+            <gml:Point>
+              <gml:coordinates>3.016384,45.143725</gml:coordinates>
+            </gml:Point>
+          </gml:pointMember>
+          <gml:pointMember>
+            <gml:Point>
+              <gml:coordinates>0.930003,45.001795</gml:coordinates>
+            </gml:Point>
+          </gml:pointMember>
+        </gml:MultiPoint>
+        </ms:msGeometry>
+        <ms:ogc_fid>1</ms:ogc_fid>
+        <ms:name>4 points</ms:name>
+        <ms:id>1</ms:id>
+      </ms:multipoint>
+    </gml:featureMember>
+    <gml:featureMember>
+      <ms:multipoint fid="2">
+        <gml:boundedBy>
+        	<gml:Box srsName="EPSG:4326">
+        		<gml:coordinates>0.490018,45.654676 1.157092,45.839186</gml:coordinates>
+        	</gml:Box>
+        </gml:boundedBy>
+        <ms:msGeometry>
+        <gml:MultiPoint srsName="EPSG:4326">
+          <gml:pointMember>
+            <gml:Point>
+              <gml:coordinates>0.490018,45.654676</gml:coordinates>
+            </gml:Point>
+          </gml:pointMember>
+          <gml:pointMember>
+            <gml:Point>
+              <gml:coordinates>1.157092,45.839186</gml:coordinates>
+            </gml:Point>
+          </gml:pointMember>
+        </gml:MultiPoint>
+        </ms:msGeometry>
+        <ms:ogc_fid>2</ms:ogc_fid>
+        <ms:name>2 points</ms:name>
+        <ms:id>2</ms:id>
+      </ms:multipoint>
+    </gml:featureMember>
+</wfs:FeatureCollection>
\ No newline at end of file

Added: sandbox/vector/examples/geometry_testcase/multipolygon.xml
===================================================================
--- sandbox/vector/examples/geometry_testcase/multipolygon.xml	                        (rev 0)
+++ sandbox/vector/examples/geometry_testcase/multipolygon.xml	2006-12-01 17:44:00 UTC (rev 1989)
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd                         http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=multipolygon&amp;OUTPUTFORMAT=XMLSCHEMA">
+      <gml:boundedBy>
+      	<gml:Box srsName="EPSG:4326">
+      		<gml:coordinates>-1.738295,46.307557 3.754424,47.244300</gml:coordinates>
+      	</gml:Box>
+      </gml:boundedBy>
+    <gml:featureMember>
+      <ms:multipolygon fid="1">
+        <gml:boundedBy>
+        	<gml:Box srsName="EPSG:4326">
+        		<gml:coordinates>-1.738295,46.605612 1.767394,47.244300</gml:coordinates>
+        	</gml:Box>
+        </gml:boundedBy>
+        <ms:msGeometry>
+        <gml:MultiPolygon srsName="EPSG:4326">
+        <gml:polygonMember>
+          <gml:Polygon>
+            <gml:outerBoundaryIs>
+              <gml:LinearRing>
+                <gml:coordinates>1.313216,46.690770 1.000968,46.861087 0.887424,47.059790 1.142899,47.244300 1.355795,47.244300 1.554498,47.017211 1.710622,47.059790 1.767394,46.747542 1.313216,46.690770 1.313216,46.690770 </gml:coordinates>
+              </gml:LinearRing>
+            </gml:outerBoundaryIs>
+          </gml:Polygon>
+        </gml:polygonMember>
+        <gml:polygonMember>
+          <gml:Polygon>
+            <gml:outerBoundaryIs>
+              <gml:LinearRing>
+                <gml:coordinates>0.731300,46.605612 -0.191250,46.704963 -0.191250,46.846894 0.177770,46.988824 0.447438,46.960438 0.589369,46.804315 0.688721,46.832701 0.731300,46.605612 0.731300,46.605612 </gml:coordinates>
+              </gml:LinearRing>
+            </gml:outerBoundaryIs>
+          </gml:Polygon>
+        </gml:polygonMember>
+        <gml:polygonMember>
+          <gml:Polygon>
+            <gml:outerBoundaryIs>
+              <gml:LinearRing>
+                <gml:coordinates>-1.610557,46.733349 -1.184765,46.704963 -1.198958,46.704963 -0.943483,46.619805 -0.915096,46.818508 -0.659621,46.775928 -0.688007,47.017211 -0.943483,47.003018 -1.127992,47.088176 -1.397661,47.102369 -1.624750,47.073983 -1.738295,46.917859 -1.610557,46.733349 </gml:coordinates>
+              </gml:LinearRing>
+            </gml:outerBoundaryIs>
+          </gml:Polygon>
+        </gml:polygonMember>
+        </gml:MultiPolygon>
+        </ms:msGeometry>
+        <ms:ogc_fid>1</ms:ogc_fid>
+        <ms:name/>
+        <ms:id>0</ms:id>
+      </ms:multipolygon>
+    </gml:featureMember>
+    <gml:featureMember>
+      <ms:multipolygon fid="2">
+        <gml:boundedBy>
+        	<gml:Box srsName="EPSG:4326">
+        		<gml:coordinates>2.789295,46.392716 3.754424,46.903666</gml:coordinates>
+        	</gml:Box>
+        </gml:boundedBy>
+        <ms:msGeometry>
+        <gml:Polygon srsName="EPSG:4326">
+          <gml:outerBoundaryIs>
+            <gml:LinearRing>
+              <gml:coordinates>2.959612,46.392716 2.789295,46.775928 3.172508,46.903666 3.498949,46.903666 3.498949,46.662384 3.754424,46.563032 2.959612,46.392716 </gml:coordinates>
+            </gml:LinearRing>
+          </gml:outerBoundaryIs>
+        </gml:Polygon>
+        </ms:msGeometry>
+        <ms:ogc_fid>2</ms:ogc_fid>
+        <ms:name/>
+        <ms:id>0</ms:id>
+      </ms:multipolygon>
+    </gml:featureMember>
+    <gml:featureMember>
+      <ms:multipolygon fid="3">
+        <gml:boundedBy>
+        	<gml:Box srsName="EPSG:4326">
+        		<gml:coordinates>2.207379,46.307557 2.803488,47.045597</gml:coordinates>
+        	</gml:Box>
+        </gml:boundedBy>
+        <ms:msGeometry>
+        <gml:MultiPolygon srsName="EPSG:4326">
+        <gml:polygonMember>
+          <gml:Polygon>
+            <gml:outerBoundaryIs>
+              <gml:LinearRing>
+                <gml:coordinates>2.292538,46.804315 2.207379,47.017211 2.391889,47.045597 2.562206,46.832701 2.292538,46.804315 </gml:coordinates>
+              </gml:LinearRing>
+            </gml:outerBoundaryIs>
+          </gml:Polygon>
+        </gml:polygonMember>
+        <gml:polygonMember>
+          <gml:Polygon>
+            <gml:outerBoundaryIs>
+              <gml:LinearRing>
+                <gml:coordinates>2.789295,46.307557 2.789295,46.307557 2.803488,46.506260 2.618978,46.676577 2.349310,46.633998 2.448661,46.392716 2.789295,46.307557 </gml:coordinates>
+              </gml:LinearRing>
+            </gml:outerBoundaryIs>
+          </gml:Polygon>
+        </gml:polygonMember>
+        </gml:MultiPolygon>
+        </ms:msGeometry>
+        <ms:ogc_fid>3</ms:ogc_fid>
+        <ms:name/>
+        <ms:id>0</ms:id>
+      </ms:multipolygon>
+    </gml:featureMember>
+</wfs:FeatureCollection>
\ No newline at end of file

Added: sandbox/vector/examples/geometry_testcase/point.xml
===================================================================
--- sandbox/vector/examples/geometry_testcase/point.xml	                        (rev 0)
+++ sandbox/vector/examples/geometry_testcase/point.xml	2006-12-01 17:44:00 UTC (rev 1989)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd                         http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=point&amp;OUTPUTFORMAT=XMLSCHEMA">
+      <gml:boundedBy>
+      	<gml:Box srsName="EPSG:4326">
+      		<gml:coordinates>-0.608315,44.857522 -0.021418,45.477577</gml:coordinates>
+      	</gml:Box>
+      </gml:boundedBy>
+    <gml:featureMember>
+      <ms:point fid="1">
+        <gml:boundedBy>
+        	<gml:Box srsName="EPSG:4326">
+        		<gml:coordinates>-0.608315,44.857522 -0.608315,44.857522</gml:coordinates>
+        	</gml:Box>
+        </gml:boundedBy>
+        <ms:msGeometry>
+        <gml:Point srsName="EPSG:4326">
+          <gml:coordinates>-0.608315,44.857522</gml:coordinates>
+        </gml:Point>
+        </ms:msGeometry>
+        <ms:ogc_fid>1</ms:ogc_fid>
+        <ms:name>Bordeaux</ms:name>
+        <ms:id>124</ms:id>
+      </ms:point>
+    </gml:featureMember>
+    <gml:featureMember>
+      <ms:point fid="2">
+        <gml:boundedBy>
+        	<gml:Box srsName="EPSG:4326">
+        		<gml:coordinates>-0.021418,45.477577 -0.021418,45.477577</gml:coordinates>
+        	</gml:Box>
+        </gml:boundedBy>
+        <ms:msGeometry>
+        <gml:Point srsName="EPSG:4326">
+          <gml:coordinates>-0.021418,45.477577</gml:coordinates>
+        </gml:Point>
+        </ms:msGeometry>
+        <ms:ogc_fid>2</ms:ogc_fid>
+        <ms:name>Barbezieux</ms:name>
+        <ms:id>0</ms:id>
+      </ms:point>
+    </gml:featureMember>
+</wfs:FeatureCollection>
\ No newline at end of file

Added: sandbox/vector/examples/geometry_testcase/polygon.xml
===================================================================
--- sandbox/vector/examples/geometry_testcase/polygon.xml	                        (rev 0)
+++ sandbox/vector/examples/geometry_testcase/polygon.xml	2006-12-01 17:44:00 UTC (rev 1989)
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<wfs:FeatureCollection xmlns:ms="http://mapserver.gis.umn.edu/mapserver" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.0.0/WFS-basic.xsd                         http://mapserver.gis.umn.edu/mapserver http://aneto.oco/cgi-bin/worldwfs?SERVICE=WFS&amp;VERSION=1.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=polygon&amp;OUTPUTFORMAT=XMLSCHEMA">
+      <gml:boundedBy>
+      	<gml:Box srsName="EPSG:4326">
+      		<gml:coordinates>-0.768746,47.003018 3.002191,47.925567</gml:coordinates>
+      	</gml:Box>
+      </gml:boundedBy>
+    <gml:featureMember>
+      <ms:polygon fid="1">
+        <gml:boundedBy>
+        	<gml:Box srsName="EPSG:4326">
+        		<gml:coordinates>-0.768746,47.003018 0.532597,47.925567</gml:coordinates>
+        	</gml:Box>
+        </gml:boundedBy>
+        <ms:msGeometry>
+        <gml:MultiPolygon srsName="EPSG:4326">
+        <gml:polygonMember>
+          <gml:Polygon>
+            <gml:outerBoundaryIs>
+              <gml:LinearRing>
+                <gml:coordinates>-0.318987,47.003018 -0.768746,47.358268 -0.574463,47.684285 -0.347374,47.854602 -0.006740,47.925567 0.135191,47.726864 0.149384,47.599127 0.419052,47.670092 0.532597,47.428810 0.305508,47.443003 0.475824,47.144948 0.064225,47.201721 -0.318987,47.003018 </gml:coordinates>
+              </gml:LinearRing>
+            </gml:outerBoundaryIs>
+            <gml:innerBoundaryIs>
+              <gml:LinearRing>
+                <gml:coordinates>-0.035126,47.485582 -0.035126,47.485582 -0.049319,47.641706 -0.233829,47.655899 -0.375760,47.457196 -0.276408,47.286879 -0.035126,47.485582 </gml:coordinates>
+              </gml:LinearRing>
+            </gml:innerBoundaryIs>
+          </gml:Polygon>
+        </gml:polygonMember>
+        </gml:MultiPolygon>
+        </ms:msGeometry>
+        <ms:ogc_fid>1</ms:ogc_fid>
+        <ms:name/>
+        <ms:id>0</ms:id>
+      </ms:polygon>
+    </gml:featureMember>
+    <gml:featureMember>
+      <ms:polygon fid="2">
+        <gml:boundedBy>
+        	<gml:Box srsName="EPSG:4326">
+        		<gml:coordinates>1.511919,47.088176 3.002191,47.882988</gml:coordinates>
+        	</gml:Box>
+        </gml:boundedBy>
+        <ms:msGeometry>
+        <gml:Polygon srsName="EPSG:4326">
+          <gml:outerBoundaryIs>
+            <gml:LinearRing>
+              <gml:coordinates>1.625463,47.357844 1.511919,47.741057 1.880938,47.882988 2.420275,47.797830 2.789295,47.485582 3.002191,47.457196 2.874453,47.088176 2.178993,47.343651 1.625463,47.357844 </gml:coordinates>
+            </gml:LinearRing>
+          </gml:outerBoundaryIs>
+        </gml:Polygon>
+        </ms:msGeometry>
+        <ms:ogc_fid>2</ms:ogc_fid>
+        <ms:name/>
+        <ms:id>0</ms:id>
+      </ms:polygon>
+    </gml:featureMember>
+</wfs:FeatureCollection>
\ No newline at end of file



More information about the Commits mailing list