diff --git a/src/ol/format/gmlformat.js b/src/ol/format/gmlformat.js index ab422f6352..e1224a83cf 100644 --- a/src/ol/format/gmlformat.js +++ b/src/ol/format/gmlformat.js @@ -22,16 +22,6 @@ goog.require('ol.proj'); goog.require('ol.xml'); -/** - * @const - * @type {string} - * @private - */ -ol.format.GML.schemaLocation_ = 'http://www.opengis.net/gml ' + - 'http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/' + - '1.0.0/gmlsf.xsd'; - - /** * @constructor @@ -102,6 +92,16 @@ ol.format.GML = function(opt_options) { goog.inherits(ol.format.GML, ol.format.XMLFeature); +/** + * @const + * @type {string} + * @private + */ +ol.format.GML.schemaLocation_ = 'http://www.opengis.net/gml ' + + 'http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/' + + '1.0.0/gmlsf.xsd'; + + /** * @param {Node} node Node. * @param {Array.<*>} objectStack Object stack. @@ -1060,9 +1060,26 @@ ol.format.GML.writePos_ = function(node, value, objectStack) { }; +/** + * @param {Array.} point Point geometry. + * @param {string=} opt_srsName Optional srsName + * @return {string} + * @private + */ +ol.format.GML.getCoords_ = function(point, opt_srsName) { + var axisOrientation = 'enu'; + if (goog.isDefAndNotNull(opt_srsName)) { + axisOrientation = ol.proj.get(opt_srsName).getAxisOrientation(); + } + return ((axisOrientation.substr(0, 2) === 'en') ? + point[0] + ' ' + point[1] : + point[1] + ' ' + point[0]); +}; + + /** * @param {Node} node Node. - * @param {ol.geom.Point} value Point geometry. + * @param {ol.geom.LineString|ol.geom.LinearRing} value Geometry. * @param {Array.<*>} objectStack Node stack. * @private */ @@ -1070,10 +1087,6 @@ ol.format.GML.writePosList_ = function(node, value, objectStack) { var context = objectStack[objectStack.length - 1]; goog.asserts.assert(goog.isObject(context)); var srsName = goog.object.get(context, 'srsName'); - var axisOrientation = 'enu'; - if (goog.isDefAndNotNull(srsName)) { - axisOrientation = ol.proj.get(srsName).getAxisOrientation(); - } // only 2d for simple features profile var points = value.getCoordinates(); var len = points.length; @@ -1081,50 +1094,12 @@ ol.format.GML.writePosList_ = function(node, value, objectStack) { var point; for (var i = 0; i < len; ++i) { point = points[i]; - if (axisOrientation.substr(0, 2) === 'en') { - parts[i] = point[0] + ' ' + point[1]; - } else { - parts[i] = point[1] + ' ' + point[0]; - } + parts[i] = ol.format.GML.getCoords_(point, srsName); } ol.format.XSD.writeStringTextNode(node, parts.join(' ')); }; -/** - * @const - * @param {*} value Value. - * @param {Array.<*>} objectStack Object stack. - * @param {string=} opt_nodeName Node name. - * @return {Node|undefined} Node. - * @private - */ -ol.format.GML.POS_NODE_FACTORY_ = ol.xml.makeSimpleNodeFactory('pos'); - - -/** - * @const - * @param {*} value Value. - * @param {Array.<*>} objectStack Object stack. - * @param {string=} opt_nodeName Node name. - * @return {Node|undefined} Node. - * @private - */ -ol.format.GML.POSLIST_NODE_FACTORY_ = ol.xml.makeSimpleNodeFactory('posList'); - - -/** - * @type {Object.>} - * @private - */ -ol.format.GML.FLAT_COORDINATES_SERIALIZERS_ = { - 'http://www.opengis.net/gml': { - 'pos': ol.xml.makeChildAppender(ol.format.GML.writePos_), - 'posList': ol.xml.makeChildAppender(ol.format.GML.writePosList_) - } -}; - - /** * @param {Node} node Node. * @param {ol.geom.Point} geometry Point geometry. @@ -1135,33 +1110,12 @@ ol.format.GML.writePoint_ = function(node, geometry, objectStack) { var context = objectStack[objectStack.length - 1]; goog.asserts.assert(goog.isObject(context)); var srsName = goog.object.get(context, 'srsName'); - var writeSrsName = goog.object.get(context, 'writeSrsName'); - if (goog.isDefAndNotNull(srsName) && writeSrsName !== false) { + if (goog.isDefAndNotNull(srsName)) { node.setAttribute('srsName', srsName); } - ol.xml.pushSerializeAndPop({node: node, srsName: srsName}, - ol.format.GML.FLAT_COORDINATES_SERIALIZERS_, - ol.format.GML.POS_NODE_FACTORY_, [geometry], []); -}; - - -/** - * @param {Node} node Node. - * @param {ol.geom.LineString} geometry LineString geometry. - * @param {Array.<*>} objectStack Node stack. - * @private - */ -ol.format.GML.writeLineString_ = function(node, geometry, objectStack) { - var context = objectStack[objectStack.length - 1]; - goog.asserts.assert(goog.isObject(context)); - var srsName = goog.object.get(context, 'srsName'); - var writeSrsName = goog.object.get(context, 'writeSrsName'); - if (goog.isDefAndNotNull(srsName) && writeSrsName !== false) { - node.setAttribute('srsName', srsName); - } - ol.xml.pushSerializeAndPop({node: node, srsName: srsName}, - ol.format.GML.FLAT_COORDINATES_SERIALIZERS_, - ol.format.GML.POSLIST_NODE_FACTORY_, [geometry], []); + var pos = ol.xml.createElementNS(node.namespaceURI, 'pos'); + node.appendChild(pos); + ol.format.GML.writePos_(pos, geometry, objectStack); }; @@ -1175,13 +1129,32 @@ ol.format.GML.writeLinearRing_ = function(node, geometry, objectStack) { var context = objectStack[objectStack.length - 1]; goog.asserts.assert(goog.isObject(context)); var srsName = goog.object.get(context, 'srsName'); - var writeSrsName = goog.object.get(context, 'writeSrsName'); - if (writeSrsName !== false && goog.isDefAndNotNull(srsName)) { + if (goog.isDefAndNotNull(srsName)) { node.setAttribute('srsName', srsName); } - ol.xml.pushSerializeAndPop({node: node, srsName: srsName}, - ol.format.GML.FLAT_COORDINATES_SERIALIZERS_, - ol.format.GML.POSLIST_NODE_FACTORY_, [geometry], []); + var posList = ol.xml.createElementNS(node.namespaceURI, 'posList'); + node.appendChild(posList); + ol.format.GML.writePosList_(posList, geometry, objectStack); +}; + + +/** + * @param {*} value Value. + * @param {Array.<*>} objectStack Object stack. + * @param {string=} opt_nodeName Node name. + * @return {Node} Node. + * @private + */ +ol.format.GML.RING_NODE_FACTORY_ = function(value, objectStack, opt_nodeName) { + var context = objectStack[objectStack.length - 1]; + var parentNode = context.node; + goog.asserts.assert(goog.isObject(context)); + var exteriorWritten = goog.object.get(context, 'exteriorWritten'); + if (!goog.isDef(exteriorWritten)) { + goog.object.set(context, 'exteriorWritten', true); + } + return ol.xml.createElementNS(parentNode.namespaceURI, + goog.isDef(exteriorWritten) ? 'interior' : 'exterior'); }; @@ -1195,22 +1168,14 @@ ol.format.GML.writePolygon_ = function(node, geometry, objectStack) { var context = objectStack[objectStack.length - 1]; goog.asserts.assert(goog.isObject(context)); var srsName = goog.object.get(context, 'srsName'); - var writeSrsName = goog.object.get(context, 'writeSrsName'); - if (writeSrsName !== false && goog.isDefAndNotNull(srsName)) { + if (node.nodeName !== 'PolygonPatch' && goog.isDefAndNotNull(srsName)) { node.setAttribute('srsName', srsName); } var rings = geometry.getLinearRings(); - for (var i = 0, ii = rings.length; i < ii; ++i) { - if (i === 0) { - ol.xml.pushSerializeAndPop({node: node, srsName: srsName, - writeSrsName: false}, ol.format.GML.RING_SERIALIZERS_, - ol.xml.makeSimpleNodeFactory('exterior'), [rings[i]], objectStack); - } else { - ol.xml.pushSerializeAndPop({node: node, srsName: srsName, - writeSrsName: false}, ol.format.GML.RING_SERIALIZERS_, - ol.xml.makeSimpleNodeFactory('interior'), [rings[i]], objectStack); - } - } + ol.xml.pushSerializeAndPop( + {node: node, srsName: srsName}, + ol.format.GML.RING_SERIALIZERS_, ol.format.GML.RING_NODE_FACTORY_, + rings, objectStack); }; @@ -1224,14 +1189,12 @@ ol.format.GML.writeSurface_ = function(node, geometry, objectStack) { var context = objectStack[objectStack.length - 1]; goog.asserts.assert(goog.isObject(context)); var srsName = goog.object.get(context, 'srsName'); - var writeSrsName = goog.object.get(context, 'writeSrsName'); - if (goog.isDefAndNotNull(srsName) && writeSrsName !== false) { + if (goog.isDefAndNotNull(srsName)) { node.setAttribute('srsName', srsName); } - ol.xml.pushSerializeAndPop({node: node, srsName: srsName}, - ol.format.GML.PATCH_SERIALIZERS_, - ol.xml.makeSimpleNodeFactory('patches'), [geometry], - objectStack); + var patches = ol.xml.createElementNS(node.namespaceURI, 'patches'); + node.appendChild(patches); + ol.format.GML.writeSurfacePatches_(patches, geometry, objectStack); }; @@ -1245,14 +1208,31 @@ ol.format.GML.writeCurve_ = function(node, geometry, objectStack) { var context = objectStack[objectStack.length - 1]; goog.asserts.assert(goog.isObject(context)); var srsName = goog.object.get(context, 'srsName'); - var writeSrsName = goog.object.get(context, 'writeSrsName'); - if (goog.isDefAndNotNull(srsName) && writeSrsName !== false) { + if (goog.isDefAndNotNull(srsName)) { node.setAttribute('srsName', srsName); } - ol.xml.pushSerializeAndPop({node: node, srsName: srsName}, - ol.format.GML.SEGMENT_SERIALIZERS_, - ol.xml.makeSimpleNodeFactory('segments'), [geometry], - objectStack); + var segments = ol.xml.createElementNS(node.namespaceURI, 'segments'); + node.appendChild(segments); + ol.format.GML.writeCurveSegments_(segments, geometry, objectStack); +}; + + +/** + * @param {Node} node Node. + * @param {ol.geom.LineString} geometry LineString geometry. + * @param {Array.<*>} objectStack Node stack. + * @private + */ +ol.format.GML.writeLineString_ = function(node, geometry, objectStack) { + var context = objectStack[objectStack.length - 1]; + goog.asserts.assert(goog.isObject(context)); + var srsName = goog.object.get(context, 'srsName'); + if (node.nodeName !== 'LineStringSegment' && goog.isDefAndNotNull(srsName)) { + node.setAttribute('srsName', srsName); + } + var posList = ol.xml.createElementNS(node.namespaceURI, 'posList'); + node.appendChild(posList); + ol.format.GML.writePosList_(posList, geometry, objectStack); }; @@ -1272,12 +1252,10 @@ ol.format.GML.writeMultiSurfaceOrPolygon_ = function(node, geometry, node.setAttribute('srsName', srsName); } var polygons = geometry.getPolygons(); - for (var i = 0, ii = polygons.length; i < ii; ++i) { - ol.xml.pushSerializeAndPop({node: node, srsName: srsName, surface: surface}, - ol.format.GML.SURFACEORPOLYGONMEMBER_SERIALIZERS_, - ol.format.GML.MULTISURFACEORPOLYGON_NODE_FACTORY_, [polygons[i]], - objectStack); - } + ol.xml.pushSerializeAndPop({node: node, srsName: srsName, surface: surface}, + ol.format.GML.SURFACEORPOLYGONMEMBER_SERIALIZERS_, + ol.format.GML.MULTISURFACEORPOLYGON_NODE_FACTORY_, polygons, + objectStack); }; @@ -1296,12 +1274,10 @@ ol.format.GML.writeMultiPoint_ = function(node, geometry, node.setAttribute('srsName', srsName); } var points = geometry.getPoints(); - for (var i = 0, ii = points.length; i < ii; ++i) { - ol.xml.pushSerializeAndPop({node: node, srsName: srsName}, - ol.format.GML.POINTMEMBER_SERIALIZERS_, - ol.xml.makeSimpleNodeFactory('pointMember'), [points[i]], - objectStack); - } + ol.xml.pushSerializeAndPop({node: node, srsName: srsName}, + ol.format.GML.POINTMEMBER_SERIALIZERS_, + ol.xml.makeSimpleNodeFactory('pointMember'), points, + objectStack); }; @@ -1321,12 +1297,10 @@ ol.format.GML.writeMultiCurveOrLineString_ = function(node, geometry, node.setAttribute('srsName', srsName); } var lines = geometry.getLineStrings(); - for (var i = 0, ii = lines.length; i < ii; ++i) { - ol.xml.pushSerializeAndPop({node: node, srsName: srsName, curve: curve}, - ol.format.GML.LINESTRINGORCURVEMEMBER_SERIALIZERS_, - ol.format.GML.MULTICURVELINESTRING_NODE_FACTORY_, [lines[i]], - objectStack); - } + ol.xml.pushSerializeAndPop({node: node, srsName: srsName, curve: curve}, + ol.format.GML.LINESTRINGORCURVEMEMBER_SERIALIZERS_, + ol.format.GML.MULTICURVELINESTRING_NODE_FACTORY_, lines, + objectStack); }; @@ -1337,14 +1311,9 @@ ol.format.GML.writeMultiCurveOrLineString_ = function(node, geometry, * @private */ ol.format.GML.writeRing_ = function(node, ring, objectStack) { - var context = objectStack[objectStack.length - 1]; - goog.asserts.assert(goog.isObject(context)); - var srsName = goog.object.get(context, 'srsName'); - var writeSrsName = goog.object.get(context, 'writeSrsName'); - ol.xml.pushSerializeAndPop(/** @type {ol.xml.NodeStackItem} */ - ({node: node, srsName: srsName, writeSrsName: writeSrsName}), - ol.format.GML.GEOMETRY_SERIALIZERS_, - ol.format.GML.GEOMETRY_NODE_FACTORY_, [ring], []); + var linearRing = ol.xml.createElementNS(node.namespaceURI, 'LinearRing'); + node.appendChild(linearRing); + ol.format.GML.writeLinearRing_(linearRing, ring, objectStack); }; @@ -1359,11 +1328,15 @@ ol.format.GML.writeSurfaceOrPolygonMember_ = function(node, polygon, var context = objectStack[objectStack.length - 1]; goog.asserts.assert(goog.isObject(context)); var surface = goog.object.get(context, 'surface'); - var srsName = goog.object.get(context, 'srsName'); - ol.xml.pushSerializeAndPop(/** @type {ol.xml.NodeStackItem} */ - ({node: node, srsName: srsName, writeSrsName: false, surface: surface}), - ol.format.GML.GEOMETRY_SERIALIZERS_, - ol.format.GML.GEOMETRY_NODE_FACTORY_, [polygon], []); + var child = ol.format.GML.GEOMETRY_NODE_FACTORY_(polygon, objectStack); + if (goog.isDef(child)) { + node.appendChild(child); + if (surface === true) { + ol.format.GML.writeSurface_(child, polygon, objectStack); + } else { + ol.format.GML.writePolygon_(child, polygon, objectStack); + } + } }; @@ -1374,13 +1347,9 @@ ol.format.GML.writeSurfaceOrPolygonMember_ = function(node, polygon, * @private */ ol.format.GML.writePointMember_ = function(node, point, objectStack) { - var context = objectStack[objectStack.length - 1]; - goog.asserts.assert(goog.isObject(context)); - var srsName = goog.object.get(context, 'srsName'); - ol.xml.pushSerializeAndPop(/** @type {ol.xml.NodeStackItem} */ - ({node: node, srsName: srsName, writeSrsName: false}), - ol.format.GML.GEOMETRY_SERIALIZERS_, - ol.format.GML.GEOMETRY_NODE_FACTORY_, [point], []); + var child = ol.xml.createElementNS(node.namespaceURI, 'Point'); + node.appendChild(child); + ol.format.GML.writePoint_(child, point, objectStack); }; @@ -1395,11 +1364,15 @@ ol.format.GML.writeLineStringOrCurveMember_ = function(node, line, var context = objectStack[objectStack.length - 1]; goog.asserts.assert(goog.isObject(context)); var curve = goog.object.get(context, 'curve'); - var srsName = goog.object.get(context, 'srsName'); - ol.xml.pushSerializeAndPop(/** @type {ol.xml.NodeStackItem} */ - ({node: node, srsName: srsName, writeSrsName: false, curve: curve}), - ol.format.GML.GEOMETRY_SERIALIZERS_, - ol.format.GML.GEOMETRY_NODE_FACTORY_, [line], []); + var child = ol.format.GML.GEOMETRY_NODE_FACTORY_(line, objectStack); + if (goog.isDef(child)) { + node.appendChild(child); + if (curve === true) { + ol.format.GML.writeCurve_(child, line, objectStack); + } else { + ol.format.GML.writeLineString_(child, line, objectStack); + } + } }; @@ -1410,13 +1383,9 @@ ol.format.GML.writeLineStringOrCurveMember_ = function(node, line, * @private */ ol.format.GML.writeSurfacePatches_ = function(node, polygon, objectStack) { - var context = objectStack[objectStack.length - 1]; - goog.asserts.assert(goog.isObject(context)); - var srsName = goog.object.get(context, 'srsName'); - ol.xml.pushSerializeAndPop(/** @type {ol.xml.NodeStackItem} */ - ({node: node, srsName: srsName, writeSrsName: false}), - ol.format.GML.SURFACE_SERIALIZERS_, - ol.xml.makeSimpleNodeFactory('PolygonPatch'), [polygon], []); + var child = ol.xml.createElementNS(node.namespaceURI, 'PolygonPatch'); + node.appendChild(child); + ol.format.GML.writePolygon_(child, polygon, objectStack); }; @@ -1427,13 +1396,9 @@ ol.format.GML.writeSurfacePatches_ = function(node, polygon, objectStack) { * @private */ ol.format.GML.writeCurveSegments_ = function(node, line, objectStack) { - var context = objectStack[objectStack.length - 1]; - goog.asserts.assert(goog.isObject(context)); - var srsName = goog.object.get(context, 'srsName'); - ol.xml.pushSerializeAndPop(/** @type {ol.xml.NodeStackItem} */ - ({node: node, srsName: srsName, writeSrsName: false}), - ol.format.GML.CURVE_SERIALIZERS_, - ol.xml.makeSimpleNodeFactory('LineStringSegment'), [line], []); + var child = ol.xml.createElementNS(node.namespaceURI, 'LineStringSegment'); + node.appendChild(child); + ol.format.GML.writeLineString_(child, line, objectStack); }; @@ -1450,7 +1415,7 @@ ol.format.GML.writeGeometry_ = function(node, geometry, objectStack) { goog.object.set(item, 'node', node); ol.xml.pushSerializeAndPop(/** @type {ol.xml.NodeStackItem} */ (item), ol.format.GML.GEOMETRY_SERIALIZERS_, - ol.format.GML.GEOMETRY_NODE_FACTORY_, [geometry], []); + ol.format.GML.GEOMETRY_NODE_FACTORY_, [geometry], objectStack); }; @@ -1514,7 +1479,8 @@ ol.format.GML.writeFeatureMembers_ = function(node, features, objectStack) { ol.xml.pushSerializeAndPop(/** @type {ol.xml.NodeStackItem} */ (item), serializers, - ol.xml.makeSimpleNodeFactory(featureType, featureNS), features, []); + ol.xml.makeSimpleNodeFactory(featureType, featureNS), features, + objectStack); }; @@ -1557,28 +1523,6 @@ ol.format.GML.LINESTRINGORCURVEMEMBER_SERIALIZERS_ = { }; -/** - * @type {Object.>} - * @private - */ -ol.format.GML.PATCH_SERIALIZERS_ = { - 'http://www.opengis.net/gml': { - 'patches': ol.xml.makeChildAppender(ol.format.GML.writeSurfacePatches_) - } -}; - - -/** - * @type {Object.>} - * @private - */ -ol.format.GML.SEGMENT_SERIALIZERS_ = { - 'http://www.opengis.net/gml': { - 'segments': ol.xml.makeChildAppender(ol.format.GML.writeCurveSegments_) - } -}; - - /** * @type {Object.>} * @private @@ -1591,29 +1535,6 @@ ol.format.GML.RING_SERIALIZERS_ = { }; -/** - * @type {Object.>} - * @private - */ -ol.format.GML.SURFACE_SERIALIZERS_ = { - 'http://www.opengis.net/gml': { - 'PolygonPatch': ol.xml.makeChildAppender(ol.format.GML.writePolygon_) - } -}; - - -/** - * @type {Object.>} - * @private - */ -ol.format.GML.CURVE_SERIALIZERS_ = { - 'http://www.opengis.net/gml': { - 'LineStringSegment': ol.xml.makeChildAppender( - ol.format.GML.writeLineString_) - } -}; - - /** * @type {Object.>} * @private diff --git a/test/spec/ol/format/gml/topp-states-gml.xml b/test/spec/ol/format/gml/topp-states-gml.xml index 33eb7c684e..2090909512 100644 --- a/test/spec/ol/format/gml/topp-states-gml.xml +++ b/test/spec/ol/format/gml/topp-states-gml.xml @@ -7,9 +7,9 @@ - + - + 37.5101 -88.0711 37.5831 -88.1341 37.6281 -88.1571 37.6601 -88.1591 37.7001 -88.1331 37.7351 -88.0721 37.8051 -88.0351 37.8171 -88.0861 37.8311 -88.0891 37.8271 -88.0421 @@ -138,9 +138,9 @@ - + - + 38.9661 -77.0081 38.9931 -77.0421 38.9321 -77.1221 38.9151 -77.0781 38.8861 -77.0671 38.8621 -77.0391 38.8381 -77.0401 38.8291 -77.0451 38.8131 -77.0351 38.7881 -77.0451 @@ -179,9 +179,9 @@ - + - + 38.5571 -75.7071 38.4631 -75.6991 38.4551 -75.3501 38.4501 -75.0931 38.4491 -75.0681 38.4491 -75.0451 38.7991 -75.0831 38.8081 -75.1901 38.9451 -75.3071 39.0121 -75.3241 @@ -227,9 +227,9 @@ - + - + 38.4801 -79.2311 38.6581 -79.1271 38.6631 -79.1211 38.6591 -79.0881 38.7071 -79.0871 38.7611 -79.0561 38.7901 -79.0551 38.7991 -79.0331 38.8461 -78.9871 38.7631 -78.8661 @@ -378,9 +378,9 @@ - + - + 38.6491 -75.7111 38.8301 -75.7241 39.1411 -75.7521 39.2471 -75.7611 39.2951 -75.7641 39.3831 -75.7721 39.7231 -75.7911 39.7221 -76.1391 39.7211 -76.2331 39.7201 -76.5701 @@ -456,9 +456,9 @@ - + - + 38.9071 -76.2931 38.9491 -76.2731 38.9231 -76.2461 38.9781 -76.2481 39.0401 -76.2991 38.9581 -76.3561 38.8541 -76.3751 38.8751 -76.3291 38.9241 -76.3421 38.9121 -76.3221 @@ -469,9 +469,9 @@ - + - + 38.4491 -75.0681 38.3221 -75.0871 38.4491 -75.0451 38.4491 -75.0681 @@ -479,9 +479,9 @@ - + - + 38.0271 -75.2701 38.0281 -75.2421 38.1241 -75.1731 38.3201 -75.0941 38.2041 -75.1641 38.0941 -75.2091 38.0371 -75.2441 38.0271 -75.2701 @@ -519,9 +519,9 @@ - + - + 37.6411 -102.0431 37.7341 -102.0431 38.2531 -102.0451 38.2631 -102.0451 38.6151 -102.0471 38.6921 -102.0471 39.0361 -102.0481 39.1261 -102.0471 39.5621 -102.0481 39.5681 -102.0481 @@ -573,9 +573,9 @@ - + - + 36.6551 -86.5101 36.6501 -86.4151 36.6431 -86.1991 36.6331 -85.9801 36.6261 -85.7851 36.6181 -85.4371 36.6261 -85.3001 36.6251 -85.2721 36.6201 -84.9981 36.6051 -84.7911 @@ -681,9 +681,9 @@ - + - + 36.4981 -89.5331 36.4981 -89.4751 36.5041 -89.4811 36.5251 -89.4711 36.5471 -89.4811 36.5591 -89.4931 36.5641 -89.5301 36.5571 -89.5561 36.5411 -89.5681 36.5181 -89.5661 @@ -722,9 +722,9 @@ - + - + 37.0011 -95.0711 37.0001 -95.0321 36.9961 -94.6201 37.0601 -94.6201 37.3271 -94.6181 37.3601 -94.6181 37.6501 -94.6181 37.6791 -94.6191 38.0301 -94.6161 38.0551 -94.6171 @@ -795,9 +795,9 @@ - + - + 36.5461 -79.1441 36.5431 -78.7961 36.5461 -78.7371 36.5411 -78.4581 36.5451 -78.3211 36.5521 -78.0511 36.5521 -77.8981 36.5531 -77.7631 36.5531 -77.3201 36.5561 -77.1771 @@ -907,9 +907,9 @@ - + - + 38.0271 -75.2701 37.9181 -75.3461 37.9001 -75.3781 37.9011 -75.3441 37.8751 -75.3861 37.8881 -75.3391 37.9621 -75.2981 38.0281 -75.2421 38.0271 -75.2701 @@ -918,9 +918,9 @@ - + - + 37.5521 -75.8671 37.5561 -75.9301 37.5211 -75.9541 37.4791 -75.9651 37.4841 -75.9341 37.3081 -76.0181 37.1261 -75.9701 37.1421 -75.9311 37.3671 -75.8971 37.4181 -75.8261 @@ -965,9 +965,9 @@ - + - + 36.9531 -89.1041 36.9771 -89.1071 36.9881 -89.1291 36.9861 -89.1931 37.0281 -89.2101 37.0411 -89.2371 37.0871 -89.2641 37.0911 -89.2841 37.0851 -89.3031 37.0601 -89.3091 diff --git a/test/spec/ol/format/gmlformat.test.js b/test/spec/ol/format/gmlformat.test.js index 93a075b19b..473fbcc9a6 100644 --- a/test/spec/ol/format/gmlformat.test.js +++ b/test/spec/ol/format/gmlformat.test.js @@ -88,9 +88,10 @@ describe('ol.format.GML', function() { '' + ' ' + - ' ' + + ' ' + ' ' + - ' ' + + ' ' + ' 38.9661 -77.0081 38.9931 -77.0421 ' + ' 38.9321 -77.1221 38.9151 -77.0781 38.8861 ' + ' -77.0671 38.8621 -77.0391 38.8381 -77.0401 ' + @@ -153,17 +154,17 @@ describe('ol.format.GML', function() { '' + ' ' + - ' ' + + ' ' + ' 1 2 3 2 3 4 1 2' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 2 3 2 5 4 5 2 3' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 3 4 3 6 5 6 3 4' + ' ' + ' ' + @@ -188,17 +189,17 @@ describe('ol.format.GML', function() { ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 1 2 3 2 3 4 1 2' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 2 3 2 5 4 5 2 3' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 3 4 3 6 5 6 3 4' + ' ' + ' ' + @@ -261,17 +262,17 @@ describe('ol.format.GML', function() { '' + ' ' + - ' ' + + ' ' + ' 1 2' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 2 3' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 3 4' + ' ' + ' ' + @@ -313,12 +314,12 @@ describe('ol.format.GML', function() { '' + ' ' + - ' ' + + ' ' + ' 1 2 2 3' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 3 4 4 5' + ' ' + ' ' + @@ -360,28 +361,28 @@ describe('ol.format.GML', function() { '' + ' ' + - ' ' + + ' ' + ' ' + - ' ' + + ' ' + ' 1 2 3 2 3 4 1 2' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 2 3 2 5 4 5 2 3' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 3 4 3 6 5 6 3 4' + ' ' + ' ' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' ' + - ' ' + + ' ' + ' 1 2 3 2 3 4 1 2' + ' ' + ' ' + @@ -450,12 +451,12 @@ describe('ol.format.GML', function() { '' + ' ' + - ' ' + + ' ' + ' 1 2 2 3' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 3 4 4 5' + ' ' + ' ' + @@ -473,7 +474,7 @@ describe('ol.format.GML', function() { '' + ' ' + - ' ' + + ' ' + ' ' + ' ' + ' 1 2 2 3' + @@ -482,7 +483,7 @@ describe('ol.format.GML', function() { ' ' + ' ' + ' ' + - ' ' + + ' ' + ' ' + ' ' + ' 3 4 4 5' + @@ -509,28 +510,28 @@ describe('ol.format.GML', function() { '' + ' ' + - ' ' + + ' ' + ' ' + - ' ' + + ' ' + ' 1 2 3 2 3 4 1 2' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 2 3 2 5 4 5 2 3' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 3 4 3 6 5 6 3 4' + ' ' + ' ' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' ' + - ' ' + + ' ' + ' 1 2 3 2 3 4 1 2' + ' ' + ' ' + @@ -595,21 +596,21 @@ describe('ol.format.GML', function() { '' + ' ' + - ' ' + + ' ' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 1 2 3 2 3 4 1 2' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 2 3 2 5 4 5 2 3' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 3 4 3 6 5 6 3 4' + ' ' + ' ' + @@ -618,11 +619,11 @@ describe('ol.format.GML', function() { ' ' + ' ' + ' ' + - ' ' + + ' ' + ' ' + ' ' + ' ' + - ' ' + + ' ' + ' 1 2 3 2 3 4 1 2' + ' ' + ' ' +