diff --git a/doc/authors.txt b/doc/authors.txt index 8c803e595f..44842b2f89 100644 --- a/doc/authors.txt +++ b/doc/authors.txt @@ -3,6 +3,7 @@ Howard Butler Bertil Chaupis John Cole Jeff Dege +Roald de Wit Schuyler Erle Christian López Espínola John Frank diff --git a/lib/OpenLayers/Format/GML.js b/lib/OpenLayers/Format/GML.js index 5b22f68033..87bcc7cfb6 100644 --- a/lib/OpenLayers/Format/GML.js +++ b/lib/OpenLayers/Format/GML.js @@ -71,6 +71,13 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { */ extractAttributes: true, + /** + * APIProperty: xy + * {Boolean} Order of the GML coordinate true:(x,y) or false:(y,x) + * Changing is not recommended, a new Format should be instantiated. + */ + xy: true, + /** * Constructor: OpenLayers.Format.GML * Create a new parser for GML. @@ -130,7 +137,7 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { // only accept on geometry per feature - look for highest "order" var order = ["MultiPolygon", "Polygon", "MultiLineString", "LineString", - "MultiPoint", "Point"]; + "MultiPoint", "Point", "Envelope"]; var type, nodeList, geometry, parser; for(var i=0; ix, y, z * 3) xy */ - var nodeList; + var nodeList, coordString; var coords = []; // look for var nodeList = this.getElementsByTagNameNS(node, this.gmlns, "pos"); if(nodeList.length > 0) { - var coordString = nodeList[0].firstChild.nodeValue; + coordString = nodeList[0].firstChild.nodeValue; coordString = coordString.replace(this.regExes.trimSpace, ""); coords = coordString.split(this.regExes.splitSpace); } @@ -240,8 +247,15 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { if(coords.length == 2) { coords[2] = null; } - return new OpenLayers.Geometry.Point(coords[0], coords[1], + + if (this.xy) { + return new OpenLayers.Geometry.Point(coords[0], coords[1], coords[2]); + } + else{ + return new OpenLayers.Geometry.Point(coords[1], coords[0], + coords[2]); + } }, /** @@ -305,7 +319,11 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { x = coords[j]; y = coords[j+1]; z = (dim == 2) ? null : coords[j+2]; - points.push(new OpenLayers.Geometry.Point(x, y, z)); + if (this.xy) { + points.push(new OpenLayers.Geometry.Point(x, y, z)); + } else { + points.push(new OpenLayers.Geometry.Point(y, x, z)); + } } } @@ -325,9 +343,15 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { if(coords.length == 2) { coords[2] = null; } - points.push(new OpenLayers.Geometry.Point(coords[0], + if (this.xy) { + points.push(new OpenLayers.Geometry.Point(coords[0], coords[1], coords[2])); + } else { + points.push(new OpenLayers.Geometry.Point(coords[1], + coords[0], + coords[2])); + } } } } @@ -426,6 +450,64 @@ OpenLayers.Format.GML = OpenLayers.Class(OpenLayers.Format.XML, { } } return new OpenLayers.Geometry.MultiPolygon(components); + }, + + envelope: function(node) { + var components = []; + var coordString; + var envelope; + + var lpoint = this.getElementsByTagNameNS(node, this.gmlns, "lowerCorner"); + if (lpoint.length > 0) { + var coords = []; + + if(lpoint.length > 0) { + coordString = lpoint[0].firstChild.nodeValue; + coordString = coordString.replace(this.regExes.trimSpace, ""); + coords = coordString.split(this.regExes.splitSpace); + } + + if(coords.length == 2) { + coords[2] = null; + } + if (this.xy) { + var lowerPoint = new OpenLayers.Geometry.Point(coords[0], coords[1],coords[2]); + } else { + var lowerPoint = new OpenLayers.Geometry.Point(coords[1], coords[0],coords[2]); + } + } + + var upoint = this.getElementsByTagNameNS(node, this.gmlns, "upperCorner"); + if (upoint.length > 0) { + var coords = []; + + if(upoint.length > 0) { + coordString = upoint[0].firstChild.nodeValue; + coordString = coordString.replace(this.regExes.trimSpace, ""); + coords = coordString.split(this.regExes.splitSpace); + } + + if(coords.length == 2) { + coords[2] = null; + } + if (this.xy) { + var upperPoint = new OpenLayers.Geometry.Point(coords[0], coords[1],coords[2]); + } else { + var upperPoint = new OpenLayers.Geometry.Point(coords[1], coords[0],coords[2]); + } + } + + if (lowerPoint && upperPoint) { + components.push(new OpenLayers.Geometry.Point(lowerPoint.x, lowerPoint.y)); + components.push(new OpenLayers.Geometry.Point(upperPoint.x, lowerPoint.y)); + components.push(new OpenLayers.Geometry.Point(upperPoint.x, upperPoint.y)); + components.push(new OpenLayers.Geometry.Point(lowerPoint.x, upperPoint.y)); + components.push(new OpenLayers.Geometry.Point(lowerPoint.x, lowerPoint.y)); + + var ring = new OpenLayers.Geometry.LinearRing(components); + envelope = new OpenLayers.Geometry.Polygon([ring]); + } + return envelope; } }, diff --git a/lib/OpenLayers/Format/GeoRSS.js b/lib/OpenLayers/Format/GeoRSS.js index 05cae5925f..0e96bc3b0d 100644 --- a/lib/OpenLayers/Format/GeoRSS.js +++ b/lib/OpenLayers/Format/GeoRSS.js @@ -58,6 +58,20 @@ OpenLayers.Format.GeoRSS = OpenLayers.Class(OpenLayers.Format.XML, { */ featureDescription: "No Description", + /** + * Property: gmlParse + * {Object} GML Format object for parsing features + * Non-API and only created if necessary + */ + gmlParser: null, + + /** + * APIProperty: xy + * {Boolean} Order of the GML coordinate: true:(x,y) or false:(y,x) + * For GeoRSS the default is (y,x), therefore: false + */ + xy: false, + /** * Constructor: OpenLayers.Format.GeoRSS * Create a new parser for GeoRSS. @@ -91,38 +105,52 @@ OpenLayers.Format.GeoRSS = OpenLayers.Class(OpenLayers.Format.XML, { var polygon = this.getElementsByTagNameNS(item, this.georssns, "polygon"); - + var where = this.getElementsByTagNameNS(item, + this.georssns, + "where"); if (point.length > 0 || (lat.length > 0 && lon.length > 0)) { + var location; if (point.length > 0) { - var location = OpenLayers.String.trim( + location = OpenLayers.String.trim( point[0].firstChild.nodeValue).split(/\s+/); - if (location.length !=2) { - var location = OpenLayers.String.trim( + location = OpenLayers.String.trim( point[0].firstChild.nodeValue).split(/\s*,\s*/); } } else { - var location = [parseFloat(lat[0].firstChild.nodeValue), + location = [parseFloat(lat[0].firstChild.nodeValue), parseFloat(lon[0].firstChild.nodeValue)]; } + var geometry = new OpenLayers.Geometry.Point(parseFloat(location[1]), - parseFloat(location[0])); + parseFloat(location[0])); + } else if (line.length > 0) { var coords = OpenLayers.String.trim(line[0].firstChild.nodeValue).split(/\s+/); var components = []; + var point; for (var i=0; i < coords.length; i+=2) { - var point = new OpenLayers.Geometry.Point(parseFloat(coords[i+1]), parseFloat(coords[i])); + point = new OpenLayers.Geometry.Point(parseFloat(coords[i+1]), + parseFloat(coords[i])); components.push(point); } geometry = new OpenLayers.Geometry.LineString(components); } else if (polygon.length > 0) { var coords = OpenLayers.String.trim(polygon[0].firstChild.nodeValue).split(/\s+/); var components = []; + var point; for (var i=0; i < coords.length; i+=2) { - var point = new OpenLayers.Geometry.Point(parseFloat(coords[i+1]), parseFloat(coords[i])); + point = new OpenLayers.Geometry.Point(parseFloat(coords[i+1]), + parseFloat(coords[i])); components.push(point); } geometry = new OpenLayers.Geometry.Polygon([new OpenLayers.Geometry.LinearRing(components)]); + } else if (where.length > 0) { + if (!this.gmlParser) { + this.gmlParser = new OpenLayers.Format.GML({'xy': this.xy}); + } + var feature = this.gmlParser.parseFeature(where[0]); + geometry = feature.geometry; } return geometry; }, @@ -139,6 +167,7 @@ OpenLayers.Format.GeoRSS = OpenLayers.Class(OpenLayers.Format.XML, { */ createFeatureFromItem: function(item) { var geometry = this.createGeometryFromItem(item); + /* Provide defaults for title and description */ var title = this.getChildValue(item, "*", "title", this.featureTitle); @@ -340,7 +369,7 @@ OpenLayers.Format.GeoRSS = OpenLayers.Class(OpenLayers.Format.XML, { } path = parts.join(" "); } else { - path = geometry.y + " " + geometry.x; + path = geometry.y + " " + geometry.x; } return this.createTextNode(path); }, diff --git a/tests/Format/test_GML.html b/tests/Format/test_GML.html index 601e9c7dc7..e8f13fb910 100644 --- a/tests/Format/test_GML.html +++ b/tests/Format/test_GML.html @@ -73,7 +73,7 @@ t.eq(data[0].geometry.CLASS_NAME, "OpenLayers.Geometry.Point", "Point GML returns correct classname"); t.eq(data[0].geometry.x, 1, "x coord correct"); t.eq(data[0].geometry.y, 2, "y coord correct"); - } + } function test_Format_GML_read_linestring_geom(t) { t.plan(5); @@ -152,7 +152,169 @@ data = parser.read(test_content[0]); t.eq(data[0].attributes['NAME'], "WY", "Simple Attribute data is read correctly."); t.eq(data[0].attributes['LONGNAME'], "Wyoming", "Attribute data is read from CDATA node correctly."); - } + } + function test_Format_GML_read_envelope_geom(t) { + t.plan(13); + + var envelope = shell_start + geoms['envelope'] + shell_end; + var parser = new OpenLayers.Format.GML(); + data = parser.read(envelope); + t.eq(data[0].geometry.CLASS_NAME, "OpenLayers.Geometry.Polygon", "Envelope GML returns correct classname"); + t.eq(data[0].geometry.components[0].components[0].x, 0, "first x coord correct"); + t.eq(data[0].geometry.components[0].components[0].y, 1, "first y coord correct"); + t.eq(data[0].geometry.components[0].components[1].x, 20, "second x coord correct"); + t.eq(data[0].geometry.components[0].components[1].y, 1, "second y coord correct"); + t.eq(data[0].geometry.components[0].components[2].x, 20, "third x coord correct"); + t.eq(data[0].geometry.components[0].components[2].y, 21, "third y coord correct"); + t.eq(data[0].geometry.components[0].components[3].x, 0, "fouth x coord correct"); + t.eq(data[0].geometry.components[0].components[3].y, 21, "fourth y coord correct"); + t.eq(data[0].geometry.components[0].components[4].x, 0, "fifth x coord correct"); + t.eq(data[0].geometry.components[0].components[4].y, 1, "fifth y coord correct"); + t.eq(data[0].geometry.components[0].components.length, 5, "coords length correct"); + t.eq(data[0].geometry.components.length, 1, "rings length correct"); + } + /////////////////////////////////////////////////////////////// + // tests the y x order of gml point + ///////////////////////////////////////////////////////////// + function test_Format_GML_read_point_geom_yx(t) { + t.plan(3); + + var point = shell_start + geoms_yx['point'] + shell_end; + var parser = new OpenLayers.Format.GML({'xy':false}); + data = parser.read(point); + t.eq(data[0].geometry.CLASS_NAME, "OpenLayers.Geometry.Point", "Point GML returns correct classname"); + t.eq(data[0].geometry.x, 1, "x coord correct"); + t.eq(data[0].geometry.y, 2, "y coord correct"); + } + function test_Format_GML_read_linestring_geom_yx(t) { + t.plan(5); + + var line = shell_start + geoms_yx['linestring'] + shell_end; + var parser = new OpenLayers.Format.GML({'xy':false}); + data = parser.read(line); + t.eq(data[0].geometry.CLASS_NAME, "OpenLayers.Geometry.LineString", "LineString GML returns correct classname"); + t.eq(data[0].geometry.components[0].x, 1, "first x coord correct"); + t.eq(data[0].geometry.components[0].y, 2, "first y coord correct"); + t.eq(data[0].geometry.components[1].x, 4, "second x coord correct"); + t.eq(data[0].geometry.components[1].y, 5, "second y coord correct"); + } + function test_Format_GML_read_polygon_geom_yx(t) { + t.plan(7); + + var polygon = shell_start + geoms_yx['polygon'] + shell_end; + var parser = new OpenLayers.Format.GML({'xy':false}); + data = parser.read(polygon); + t.eq(data[0].geometry.CLASS_NAME, "OpenLayers.Geometry.Polygon", "Polygon GML returns correct classname"); + t.eq(data[0].geometry.components[0].components[0].x, 1, "first x coord correct"); + t.eq(data[0].geometry.components[0].components[0].y, 2, "first y coord correct"); + t.eq(data[0].geometry.components[0].components[1].x, 4, "second x coord correct"); + t.eq(data[0].geometry.components[0].components[1].y, 5, "second y coord correct"); + t.eq(data[0].geometry.components[0].components.length, 4, "coords length correct"); + t.eq(data[0].geometry.components.length, 1, "rings length correct"); + } + function test_Format_GML_read_multipoint_geom_yx(t) { + t.plan(6); + + var multipoint = shell_start + geoms_yx['multipoint'] + shell_end; + var parser = new OpenLayers.Format.GML({'xy':false}); + data = parser.read(multipoint); + t.eq(data[0].geometry.CLASS_NAME, "OpenLayers.Geometry.MultiPoint", "MultiPoint GML returns correct classname"); + t.eq(data[0].geometry.components[0].x, 1, "x coord correct"); + t.eq(data[0].geometry.components[0].y, 2, "y coord correct"); + t.eq(data[0].geometry.components.length, 2, "length correct"); + t.eq(data[0].geometry.components[1].x, 4, "x coord correct"); + t.eq(data[0].geometry.components[1].y, 5, "y coord correct"); + } + function test_Format_GML_read_multilinestring_geom_yx(t) { + t.plan(6); + + var multilinestring = shell_start + geoms_yx['multilinestring'] + shell_end; + var parser = new OpenLayers.Format.GML({'xy':false}); + data = parser.read(multilinestring); + t.eq(data[0].geometry.CLASS_NAME, "OpenLayers.Geometry.MultiLineString", "MultiLineString GML returns correct classname"); + t.eq(data[0].geometry.components[0].components[0].x, 1, "x coord correct"); + t.eq(data[0].geometry.components[0].components[0].y, 2, "y coord correct"); + t.eq(data[0].geometry.components[0].components.length, 2, "length correct"); + t.eq(data[0].geometry.components[0].components[1].x, 4, "x coord correct"); + t.eq(data[0].geometry.components[0].components[1].y, 5, "y coord correct"); + + } + function test_Format_GML_read_polygon_with_holes_geom_yx(t) { + t.plan(12); + + var polygon_with_holes = shell_start + geoms_yx['polygon_with_holes'] + shell_end; + var parser = new OpenLayers.Format.GML({'xy':false}); + data = parser.read(polygon_with_holes); + t.eq(data[0].geometry.CLASS_NAME, "OpenLayers.Geometry.Polygon", "Polygon GML returns correct classname"); + t.eq(data[0].geometry.components[0].components[0].x, 1, "first x coord correct"); + t.eq(data[0].geometry.components[0].components[0].y, 2, "first y coord correct"); + t.eq(data[0].geometry.components[0].components[1].x, 4, "second x coord correct"); + t.eq(data[0].geometry.components[0].components[1].y, 5, "second y coord correct"); + t.eq(data[0].geometry.components[0].components.length, 4, "coords length correct"); + t.eq(data[0].geometry.components[1].components[0].x, 11, "first x coord correct"); + t.eq(data[0].geometry.components[1].components[0].y, 12, "first y coord correct"); + t.eq(data[0].geometry.components[1].components[1].x, 14, "second x coord correct"); + t.eq(data[0].geometry.components[1].components[1].y, 15, "second y coord correct"); + t.eq(data[0].geometry.components[1].components.length, 4, "coords length correct"); + t.eq(data[0].geometry.components.length, 2, "rings length correct"); + } + + function test_Format_GML_read_envelope_geom_yx(t) { + t.plan(13); + + var envelope = shell_start + geoms_yx['envelope'] + shell_end; + var parser = new OpenLayers.Format.GML({'xy':false}); + data = parser.read(envelope); + t.eq(data[0].geometry.CLASS_NAME, "OpenLayers.Geometry.Polygon", "Envelope GML returns correct classname"); + t.eq(data[0].geometry.components[0].components[0].x, 0, "first x coord correct"); + t.eq(data[0].geometry.components[0].components[0].y, 1, "first y coord correct"); + t.eq(data[0].geometry.components[0].components[1].x, 20, "second x coord correct"); + t.eq(data[0].geometry.components[0].components[1].y, 1, "second y coord correct"); + t.eq(data[0].geometry.components[0].components[2].x, 20, "third x coord correct"); + t.eq(data[0].geometry.components[0].components[2].y, 21, "third y coord correct"); + t.eq(data[0].geometry.components[0].components[3].x, 0, "fouth x coord correct"); + t.eq(data[0].geometry.components[0].components[3].y, 21, "fourth y coord correct"); + t.eq(data[0].geometry.components[0].components[4].x, 0, "fifth x coord correct"); + t.eq(data[0].geometry.components[0].components[4].y, 1, "fifth y coord correct"); + t.eq(data[0].geometry.components[0].components.length, 5, "coords length correct"); + t.eq(data[0].geometry.components.length, 1, "rings length correct"); + } + + function test_Format_GML_write_geoms_yx(t) { + t.plan(5); + var parser = new OpenLayers.Format.GML({'xy':false}); + + var point_xy = shell_start + serialize_geoms['point'] + shell_end; + var point = shell_start + serialize_geoms_yx['point'] + shell_end; + data = parser.read(point); + var output = parser.write(data); + t.eq(output, point_xy, "Point geometry round trips correctly."); + + var linestring_xy = shell_start + serialize_geoms['linestring'] + shell_end; + var linestring = shell_start + serialize_geoms_yx['linestring'] + shell_end; + data = parser.read(linestring); + var output = parser.write(data); + t.eq(output, linestring_xy, "Line geometry round trips correctly."); + + var polygon_xy = shell_start + serialize_geoms['polygon'] + shell_end; + var polygon = shell_start + serialize_geoms_yx['polygon'] + shell_end; + data = parser.read(polygon); + var output = parser.write(data); + t.eq(output, polygon_xy, "Poly geometry round trips correctly."); + + var multipoint_xy = shell_start + serialize_geoms['multipoint'] + shell_end; + var multipoint = shell_start + serialize_geoms_yx['multipoint'] + shell_end; + data = parser.read(multipoint); + var output = parser.write(data); + t.eq(output, multipoint_xy, "MultiPoint geometry round trips correctly."); + + var multilinestring_xy = shell_start + serialize_geoms['multilinestring'] + shell_end; + var multilinestring = shell_start + serialize_geoms_yx['multilinestring'] + shell_end; + data = parser.read(multilinestring); + var output = parser.write(data); + t.eq(output, multilinestring_xy, "MultiLine geometry round trips correctly."); + } + var test_content = ['\n\n \n \n -1254041.389711702250906.9515983529\n -634517.1199908922762236.2940800377\n \n \n \n \n -634517.11999089224,691849.77929356066,0 -653761.64509297756,471181.53429472551,0 -673343.60852865304,250906.9515983529,0 -1088825.734430399,299284.85108220269,0 -1254041.3897117018,324729.27754874947,0 -1235750.4212498858,434167.33911316615,0 -1190777.7803201093,704392.96327195223,0 -1181607.835811228,762236.29408003774,0 -634517.11999089224,691849.77929356066,0\n WY\n \n \n \n\n', '1,2 4,5 3,6 1,2', 'polygon_with_holes': '1,2 4,5 3,6 1,211,12 14,15 13,16 11,12', 'multipoint': '1,2,34,5,6', - 'multilinestring': '1,2,3 4,5,611,12,13 14,15,16' // , + 'multilinestring': '1,2,3 4,5,611,12,13 14,15,16', + 'envelope': '0 120 21' // , // 'multipolygon_with_holes': '1,2 4,5 3,6 1,211,12 14,15 13,16 11,12101,102 104,105 103,106 101,102111,112 114,115 113,116 111,112' - }; + }; + + +// +// The following data has the (x y) reordered to (y x), in 3 dimensions it goes from (x y z) to (y x z) +// + + var serialize_geoms_yx = { + 'point': '2,1', + 'linestring': '2,1 5,4', + 'polygon': '2,1 5,4 6,3 2,1', + 'multipoint': '2,15,4', + 'multilinestring': '2,1 5,412,11 15,14' + }; + var geoms_yx = { + 'point': '2,1,3', + 'linestring': '2,1,3 5,4,6', + 'polygon': '2,1 5,4 6,3 2,1', + 'polygon_with_holes': '2,1 5,4 6,3 2,112,11 15,14 16,13 12,11', + 'multipoint': '2,1,35,4,6', + 'multilinestring': '2,1,3 5,4,612,11,13 15,14,16', + 'envelope': '1 021 20' + }; + diff --git a/tests/Format/test_GeoRSS.html b/tests/Format/test_GeoRSS.html index 3a579efb01..a90e864af3 100644 --- a/tests/Format/test_GeoRSS.html +++ b/tests/Format/test_GeoRSS.html @@ -43,6 +43,16 @@ var out = parser.write(data); t.eq(out, output[i], "Output gave expected value"); } + } + function test_Format_GeoRSS_gml_roundtrip(t) { + t.plan(input_gml.length); + var parser = new OpenLayers.Format.GeoRSS(); + for(var i=0; i < input_gml.length; i++) { + var feed = shell_start_gml+input_gml[i]+shell_end_gml; + var data = parser.read(feed); + var out = parser.write(data); + t.eq(out, output_gml[i], "Output gave expected value"); + } } var shell_start = '\n scribble\n http://featureserver.org/featureserver.cgi/scribble?format=atom\n FeatureServer\n'; @@ -52,8 +62,22 @@ 'http://featureserver.org/featureserver.cgi/scribble/794.atomFeature 5<b>strokeColor</b>: red<br /><b>title</b>: Feature 5<br /><b>author</b>: Your Name Here28.828125 32.6953125 49.921875 34.8046875 39.375 58.0078125 39.375 58.0078125 40.078125 58.0078125 41.484375 58.0078125 43.59375 58.0078125 45.703125 58.7109375 47.8125 58.7109375 49.21875 58.7109375 51.328125 59.4140625 52.03125 59.4140625 54.140625 60.8203125 56.25 61.5234375 56.25 62.2265625 57.65625 62.2265625 57.65625 62.9296875 58.359375 63.6328125 58.359375 65.0390625 58.359375 65.7421875 59.0625 66.4453125 59.0625 67.1484375 59.0625 68.5546875 59.765625 69.9609375 59.765625 72.0703125 59.765625 73.4765625 59.765625 76.2890625 59.765625 78.3984375 59.765625 79.8046875 59.765625 81.9140625 59.765625 83.3203125 59.0625 84.7265625 59.0625 86.8359375 58.359375 87.5390625 58.359375 88.2421875 56.953125 89.6484375 56.25 91.0546875 54.84375 93.8671875 52.03125 96.6796875 51.328125 98.7890625 50.625 100.1953125 49.21875 102.3046875 48.515625 103.7109375 47.8125 104.4140625 47.109375 105.8203125 46.40625 106.5234375 46.40625 107.9296875 45.703125 109.3359375 45 110.7421875 43.59375 112.8515625 43.59375 114.2578125 43.59375 114.9609375 42.890625 117.0703125 42.890625 117.7734375 42.1875 118.4765625 42.1875 119.1796875 42.1875 119.8828125' ]; var output= ['Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/562.atom-5.9765625 -131.484375 -58.0078125 -112.5 -50.2734375 -32.34375 52.3828125 -114.609375 -35.5078125 -167.34375 -57.3046875 -146.953125 -34.1015625 -139.921875 -5.9765625 -131.484375', - 'Feature 2<b>strokeColor</b>: 00ccff<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/796.atom75.5859375 15.46875', - 'Feature 5<b>strokeColor</b>: red<br /><b>title</b>: Feature 5<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/794.atom28.828125 32.6953125 49.921875 34.8046875 39.375 58.0078125 39.375 58.0078125 40.078125 58.0078125 41.484375 58.0078125 43.59375 58.0078125 45.703125 58.7109375 47.8125 58.7109375 49.21875 58.7109375 51.328125 59.4140625 52.03125 59.4140625 54.140625 60.8203125 56.25 61.5234375 56.25 62.2265625 57.65625 62.2265625 57.65625 62.9296875 58.359375 63.6328125 58.359375 65.0390625 58.359375 65.7421875 59.0625 66.4453125 59.0625 67.1484375 59.0625 68.5546875 59.765625 69.9609375 59.765625 72.0703125 59.765625 73.4765625 59.765625 76.2890625 59.765625 78.3984375 59.765625 79.8046875 59.765625 81.9140625 59.765625 83.3203125 59.0625 84.7265625 59.0625 86.8359375 58.359375 87.5390625 58.359375 88.2421875 56.953125 89.6484375 56.25 91.0546875 54.84375 93.8671875 52.03125 96.6796875 51.328125 98.7890625 50.625 100.1953125 49.21875 102.3046875 48.515625 103.7109375 47.8125 104.4140625 47.109375 105.8203125 46.40625 106.5234375 46.40625 107.9296875 45.703125 109.3359375 45 110.7421875 43.59375 112.8515625 43.59375 114.2578125 43.59375 114.9609375 42.890625 117.0703125 42.890625 117.7734375 42.1875 118.4765625 42.1875 119.1796875 42.1875 119.8828125']; + 'Feature 2<b>strokeColor</b>: 00ccff<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/796.atom75.5859375 15.46875', + 'Feature 5<b>strokeColor</b>: red<br /><b>title</b>: Feature 5<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/794.atom28.828125 32.6953125 49.921875 34.8046875 39.375 58.0078125 39.375 58.0078125 40.078125 58.0078125 41.484375 58.0078125 43.59375 58.0078125 45.703125 58.7109375 47.8125 58.7109375 49.21875 58.7109375 51.328125 59.4140625 52.03125 59.4140625 54.140625 60.8203125 56.25 61.5234375 56.25 62.2265625 57.65625 62.2265625 57.65625 62.9296875 58.359375 63.6328125 58.359375 65.0390625 58.359375 65.7421875 59.0625 66.4453125 59.0625 67.1484375 59.0625 68.5546875 59.765625 69.9609375 59.765625 72.0703125 59.765625 73.4765625 59.765625 76.2890625 59.765625 78.3984375 59.765625 79.8046875 59.765625 81.9140625 59.765625 83.3203125 59.0625 84.7265625 59.0625 86.8359375 58.359375 87.5390625 58.359375 88.2421875 56.953125 89.6484375 56.25 91.0546875 54.84375 93.8671875 52.03125 96.6796875 51.328125 98.7890625 50.625 100.1953125 49.21875 102.3046875 48.515625 103.7109375 47.8125 104.4140625 47.109375 105.8203125 46.40625 106.5234375 46.40625 107.9296875 45.703125 109.3359375 45 110.7421875 43.59375 112.8515625 43.59375 114.2578125 43.59375 114.9609375 42.890625 117.0703125 42.890625 117.7734375 42.1875 118.4765625 42.1875 119.1796875 42.1875 119.8828125' + ]; + + var shell_start_gml = ' scribblehttp://featureserver.org/featureserver.cgi/scribble?format=atomFeatureServer'; + var shell_end_gml = ''; + var input_gml = ['http://featureserver.org/featureserver.cgi/scribble/111.atomFeature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Here0 10', + 'http://featureserver.org/featureserver.cgi/scribble/111.atomFeature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Here110,-50 110,-10 155,-10 155,-50 110,-50', + 'http://featureserver.org/featureserver.cgi/scribble/111.atomFeature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Here0,10 10,20', + 'http://featureserver.org/featureserver.cgi/scribble/111.atomFeature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Here0 120 21' + ]; + var output_gml = ['Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/111.atom0 10', + 'Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/111.atom110 -50 110 -10 155 -10 155 -50 110 -50', + 'Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/111.atom0 10 10 20', + 'Feature 2<b>strokeColor</b>: red<br /><b>title</b>: Feature 2<br /><b>author</b>: Your Name Herehttp://featureserver.org/featureserver.cgi/scribble/111.atom0 1 0 21 20 21 20 1 0 1' + ];