commit
32ea32521d
56 files changed
+2681
-4
No files matched your search
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wfs:FeatureCollection numberOfFeatures="3" timeStamp="2008-09-12T00:24:21.013-04:00" xsi:schemaLocation="http://www.openplans.org/topp http://sigma.openplans.org:80/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=topp:states http://www.opengis.net/wfs http://sigma.openplans.org:80/geoserver/schemas/wfs/1.1.0/wfs.xsd" xmlns:ogc="http://www.opengis.net/ogc" xmlns:opengeo="http://open-geo.com" xmlns:tiger="http://www.census.gov" xmlns:wfs="http://www.opengis.net/wfs" xmlns:topp="http://www.openplans.org/topp" xmlns:seb="http://seb.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink"><gml:featureMembers><topp:states gml:id="states.1"><gml:boundedBy><gml:Envelope srsName="urn:x-ogc:def:crs:EPSG:4326"><gml:lowerCorner>36.986 -91.516</gml:lowerCorner><gml:upperCorner>42.509 -87.507</gml:upperCorner></gml:Envelope></gml:boundedBy><topp:the_geom><gml:MultiSurface srsName="urn:x-ogc:def:crs:EPSG:4326"><gml:surfaceMember><gml:Polygon><gml:exterior><gml:LinearRing><gml:posList>37.511 -88.071 37.476 -88.087 37.442 -88.311 37.409 -88.359 37.421 -88.419 37.401 -88.467 37.296 -88.511 37.257 -88.501 37.205 -88.451 37.156 -88.422 37.098 -88.451 37.072 -88.476 37.068 -88.491 37.064 -88.517 37.072 -88.559 37.109 -88.614 37.135 -88.688 37.141 -88.739 37.152 -88.746 37.202 -88.863 37.218 -88.932 37.221 -88.993 37.185 -89.065 37.112 -89.116 37.093 -89.146 37.064 -89.169 37.025 -89.174 36.998 -89.151 36.988 -89.129 36.986 -89.193 37.028 -89.211 37.041 -89.237 37.087 -89.264 37.091 -89.284 37.085 -89.303 37.061 -89.309 37.027 -89.264 37.008 -89.262 36.999 -89.282 37.009 -89.311 37.049 -89.382 37.099 -89.379 37.137 -89.423 37.165 -89.441 37.224 -89.468 37.253 -89.465 37.256 -89.489 37.276 -89.513 37.304 -89.513 37.329 -89.501 37.339 -89.468 37.355 -89.435 37.411 -89.427 37.453 -89.453 37.491 -89.494 37.571 -89.524 37.615 -89.513 37.651 -89.519 37.679 -89.513 37.694 -89.521 37.706 -89.581 37.745 -89.666 37.783 -89.675 37.804 -89.691 37.841 -89.728 37.905 -89.851 37.905 -89.861 37.891 -89.866 37.875 -89.901 37.878 -89.937 37.911 -89.978 37.963 -89.958 37.969 -90.011 37.993 -90.041 38.032 -90.119 38.053 -90.134 38.088 -90.207 38.122 -90.254 38.166 -90.289 38.188 -90.336 38.234 -90.364 38.323 -90.369 38.365 -90.358 38.391 -90.339 38.427 -90.301 38.518 -90.265 38.532 -90.261 38.562 -90.241 38.611 -90.183 38.658 -90.183 38.701 -90.202 38.723 -90.196 38.773 -90.163 38.785 -90.135 38.801 -90.121 38.831 -90.113 38.853 -90.132 38.914 -90.243 38.924 -90.278 38.924 -90.319 38.962 -90.413 38.959 -90.469 38.891 -90.531 38.871 -90.571 38.881 -90.627 38.935 -90.668 39.037 -90.706 39.058 -90.707 39.093 -90.691 39.144 -90.716 39.195 -90.718 39.224 -90.732 39.247 -90.738 39.296 -90.779 39.351 -90.851 39.401 -90.947 39.444 -91.036 39.473 -91.064 39.528 -91.093 39.552 -91.156 39.601 -91.203 39.685 -91.317 39.724 -91.367 39.761 -91.373 39.803 -91.381 39.863 -91.449 39.885 -91.451 39.901 -91.434 39.921 -91.431 39.946 -91.447 40.005 -91.487 40.066 -91.504 40.134 -91.516 40.201 -91.506 40.251 -91.498 40.309 -91.486 40.371 -91.448 40.386 -91.418 40.392 -91.385 40.402 -91.372 40.447 -91.385 40.503 -91.374 40.528 -91.382 40.547 -91.412 40.572 -91.411 40.603 -91.375 40.639 -91.262 40.643 -91.214 40.656 -91.162 40.682 -91.129 40.705 -91.119 40.761 -91.092 40.833 -91.088 40.879 -91.049 40.923 -90.983 40.951 -90.961 41.071 -90.954 41.104 -90.957 41.144 -90.991 41.165 -91.018 41.176 -91.056 41.231 -91.101 41.267 -91.102 41.334 -91.073 41.401 -91.055 41.423 -91.027 41.431 -91.001 41.421 -90.949 41.444 -90.844 41.449 -90.779 41.451 -90.708 41.462 -90.658 41.509 -90.601 41.525 -90.541 41.527 -90.454 41.543 -90.434 41.567 -90.423 41.586 -90.348 41.602 -90.339 41.649 -90.341 41.722 -90.326 41.756 -90.304 41.781 -90.255 41.806 -90.195 41.931 -90.154 41.983 -90.142 42.033 -90.151 42.061 -90.168 42.103 -90.166 42.121 -90.176 42.122 -90.191 42.159 -90.231 42.197 -90.323 42.211 -90.367 42.242 -90.407 42.263 -90.417 42.341 -90.427 42.361 -90.441 42.388 -90.491 42.421 -90.563 42.461 -90.605 42.475 -90.648 42.494 -90.651 42.509 -90.638 42.508 -90.419 42.504 -89.923 42.503 -89.834 42.497 -89.401 42.497 -89.359 42.491 -88.939 42.491 -88.764 42.489 -88.706 42.491 -88.297 42.489 -88.194 42.489 -87.797 42.314 -87.836 42.156 -87.761 42.059 -87.671 41.847 -87.612 41.723 -87.529 41.469 -87.532 41.301 -87.532 41.173 -87.531 41.009 -87.532 40.745 -87.532 40.494 -87.537 40.483 -87.535 40.166 -87.535 39.887 -87.535 39.609 -87.535 39.477 -87.538 39.351 -87.541 39.338 -87.597 39.307 -87.625 39.297 -87.611 39.281 -87.615 39.258 -87.606 39.248 -87.584 39.208 -87.588 39.198 -87.594 39.196 -87.607 39.168 -87.644 39.146 -87.671 39.131 -87.659 39.113 -87.662 39.103 -87.631 39.088 -87.631 39.084 -87.612 39.062 -87.585 38.995 -87.581 38.994 -87.591 38.977 -87.547 38.963 -87.533 38.931 -87.531 38.904 -87.539 38.869 -87.559 38.857 -87Line truncated
|
||||
@@ -0,0 +1,55 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="chrome=1">
|
||||
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
|
||||
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="../resources/layout.css" type="text/css">
|
||||
<link rel="stylesheet" href="../resources/bootstrap/css/bootstrap-responsive.min.css" type="text/css">
|
||||
<title>GML example</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="navbar navbar-inverse navbar-fixed-top">
|
||||
<div class="navbar-inner">
|
||||
<div class="container">
|
||||
<a class="brand" href="./">OpenLayers 3 Examples</a>
|
||||
<ul class="nav pull-right">
|
||||
<li><iframe class="github-watch-button" src="http://ghbtns.com/github-btn.html?user=openlayers&repo=ol3&type=watch&count=true"
|
||||
allowtransparency="true" frameborder="0" scrolling="0" height="20" width="90"></iframe></li>
|
||||
<li><a href="https://twitter.com/share" class="twitter-share-button" data-count="none" data-hashtags="openlayers"> </a></li>
|
||||
<li><div class="g-plusone-wrapper"><div class="g-plusone" data-size="medium" data-annotation="none"></div></div></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="row-fluid">
|
||||
<div class="span12">
|
||||
<div id="map" class="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row-fluid">
|
||||
|
||||
<div class="span4">
|
||||
<h4 id="title">GML example</h4>
|
||||
<p id="shortdesc">Example of using the GML parser.</p>
|
||||
<div id="docs">
|
||||
<p>See the <a href="gml.js" target="_blank">gml.js source</a> to see how this is done.</p>
|
||||
</div>
|
||||
<div id="tags">GML</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<script src="loader.js?id=gml" type="text/javascript"></script>
|
||||
<script src="../resources/social-links.js" type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,61 @@
|
||||
goog.require('ol.Collection');
|
||||
goog.require('ol.Map');
|
||||
goog.require('ol.RendererHint');
|
||||
goog.require('ol.View2D');
|
||||
goog.require('ol.layer.TileLayer');
|
||||
goog.require('ol.layer.Vector');
|
||||
goog.require('ol.parser.ogc.GML_v3');
|
||||
goog.require('ol.projection');
|
||||
goog.require('ol.source.MapQuestOpenAerial');
|
||||
goog.require('ol.source.Vector');
|
||||
goog.require('ol.style.Polygon');
|
||||
goog.require('ol.style.Rule');
|
||||
goog.require('ol.style.Style');
|
||||
|
||||
var raster = new ol.layer.TileLayer({
|
||||
source: new ol.source.MapQuestOpenAerial()
|
||||
});
|
||||
|
||||
var vector = new ol.layer.Vector({
|
||||
source: new ol.source.Vector({
|
||||
projection: ol.projection.get('EPSG:4326')
|
||||
}),
|
||||
style: new ol.style.Style({rules: [
|
||||
new ol.style.Rule({
|
||||
symbolizers: [
|
||||
new ol.style.Polygon({
|
||||
strokeColor: '#bada55'
|
||||
})
|
||||
]
|
||||
})
|
||||
]})
|
||||
});
|
||||
|
||||
var map = new ol.Map({
|
||||
layers: new ol.Collection([raster, vector]),
|
||||
renderer: ol.RendererHint.CANVAS,
|
||||
target: 'map',
|
||||
view: new ol.View2D({
|
||||
center: [-10997171.194994785, 5206335.565590534],
|
||||
zoom: 4
|
||||
})
|
||||
});
|
||||
|
||||
var gml = new ol.parser.ogc.GML_v3({axisOrientation: 'neu'});
|
||||
|
||||
var url = 'data/gml/topp-states-wfs.xml';
|
||||
var xhr = new XMLHttpRequest();
|
||||
xhr.open('GET', url, true);
|
||||
|
||||
|
||||
/**
|
||||
* onload handler for the XHR request.
|
||||
*/
|
||||
xhr.onload = function() {
|
||||
if (xhr.status == 200) {
|
||||
// this is silly to have to tell the layer the destination projection
|
||||
var projection = map.getView().getProjection();
|
||||
vector.parseFeatures(xhr.responseText, gml, projection);
|
||||
}
|
||||
};
|
||||
xhr.send();
|
||||
@@ -305,6 +305,44 @@
|
||||
* Default is 0, which means we don't follow network links at all.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} ol.parser.GML2Options
|
||||
* @property {boolean|undefined} extractAttributes Should we extract attributes
|
||||
* from the GML? Default is `true´.
|
||||
* @property {string|undefined} featureNS The feature namespace. If not set it
|
||||
* will be automatically configured from the GML.
|
||||
* @property {Array.<string>|string|undefined} featureType The local
|
||||
* (without prefix) feature typeName(s).
|
||||
* @property {string|undefined} geometryName Geometry element name.
|
||||
* @property {string|undefined} axisOrientation The axis orientation as
|
||||
* specified in Proj4. The default is 'enu'.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} ol.parser.GML3Options
|
||||
* @property {boolean|undefined} extractAttributes Should we extract attributes
|
||||
* from the GML? Default is `true´.
|
||||
* @property {string|undefined} featureNS The feature namespace. If not set it
|
||||
* will be automatically configured from the GML.
|
||||
* @property {Array.<string>|string|undefined} featureType The local
|
||||
* (without prefix) feature typeName(s).
|
||||
* @property {string|undefined} geometryName Geometry element name.
|
||||
* @property {string|undefined} axisOrientation The axis orientation as
|
||||
* specified in Proj4. The default is 'enu'.
|
||||
* @property {boolean|undefined} surface Write gml:Surface instead of
|
||||
* gml:Polygon elements. This also affects the elements in multi-part
|
||||
* geometries. Default is `false´.
|
||||
* @property {boolean|undefined} curve Write gml:Curve instead of
|
||||
* gml:LineString elements. This also affects the elements in multi-part
|
||||
* geometries. Default is `false´.
|
||||
* @property {boolean|undefined} multiCurve Write gml:MultiCurve instead of
|
||||
* gml:MultiLineString. Since the latter is deprecated in GML 3, the
|
||||
* default is `true´.
|
||||
* @property {boolean|undefined} multiSurface Write gml:multiSurface instead
|
||||
* of gml:MultiPolygon. Since the latter is deprecated in GML 3, the
|
||||
* default is `true´.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @typedef {Object} ol.source.BingMapsOptions
|
||||
* @property {string|undefined} culture Culture.
|
||||
|
||||
@@ -349,24 +349,25 @@ ol.layer.Vector.prototype.parseFeatures = function(data, parser, projection) {
|
||||
this.addFeatures(features);
|
||||
};
|
||||
|
||||
var options = {callback: callback};
|
||||
if (goog.isString(data)) {
|
||||
if (goog.isFunction(parser.readFeaturesFromStringAsync)) {
|
||||
parser.readFeaturesFromStringAsync(data, goog.bind(addFeatures, this),
|
||||
{callback: callback});
|
||||
options);
|
||||
} else {
|
||||
goog.asserts.assert(goog.isFunction(parser.readFeaturesFromString),
|
||||
'Expected a parser with readFeaturesFromString method.');
|
||||
features = parser.readFeaturesFromString(data, {callback: callback});
|
||||
features = parser.readFeaturesFromString(data, options);
|
||||
addFeatures.call(this, features);
|
||||
}
|
||||
} else if (goog.isObject(data)) {
|
||||
if (goog.isFunction(parser.readFeaturesFromObjectAsync)) {
|
||||
parser.readFeaturesFromObjectAsync(data, goog.bind(addFeatures, this),
|
||||
{callback: callback});
|
||||
options);
|
||||
} else {
|
||||
goog.asserts.assert(goog.isFunction(parser.readFeaturesFromObject),
|
||||
'Expected a parser with a readFeaturesFromObject method.');
|
||||
features = parser.readFeaturesFromObject(data, {callback: callback});
|
||||
features = parser.readFeaturesFromObject(data, options);
|
||||
addFeatures.call(this, features);
|
||||
}
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
@exportSymbol ol.parser.ogc.GML_v2
|
||||
@exportProperty ol.parser.ogc.GML_v2.prototype.read
|
||||
@exportProperty ol.parser.ogc.GML_v2.prototype.write
|
||||
@exportSymbol ol.parser.ogc.GML_v3
|
||||
@exportProperty ol.parser.ogc.GML_v3.prototype.read
|
||||
@exportProperty ol.parser.ogc.GML_v3.prototype.write
|
||||
@@ -0,0 +1,556 @@
|
||||
goog.provide('ol.parser.ogc.GML');
|
||||
goog.require('goog.array');
|
||||
goog.require('goog.dom.xml');
|
||||
goog.require('goog.object');
|
||||
goog.require('ol.Feature');
|
||||
goog.require('ol.geom.Geometry');
|
||||
goog.require('ol.geom.GeometryCollection');
|
||||
goog.require('ol.geom.GeometryType');
|
||||
goog.require('ol.geom.LineString');
|
||||
goog.require('ol.geom.LinearRing');
|
||||
goog.require('ol.geom.MultiLineString');
|
||||
goog.require('ol.geom.MultiPoint');
|
||||
goog.require('ol.geom.MultiPolygon');
|
||||
goog.require('ol.geom.Point');
|
||||
goog.require('ol.geom.Polygon');
|
||||
goog.require('ol.parser.StringFeatureParser');
|
||||
goog.require('ol.parser.XML');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @implements {ol.parser.StringFeatureParser}
|
||||
* @param {ol.parser.GML2Options|ol.parser.GML3Options=} opt_options
|
||||
* Optional configuration object.
|
||||
* @extends {ol.parser.XML}
|
||||
*/
|
||||
ol.parser.ogc.GML = function(opt_options) {
|
||||
if (goog.isDef(opt_options)) {
|
||||
goog.object.extend(this, opt_options);
|
||||
}
|
||||
if (!goog.isDef(this.axisOrientation)) {
|
||||
this.axisOrientation = 'enu';
|
||||
}
|
||||
if (!goog.isDef(this.extractAttributes)) {
|
||||
this.extractAttributes = true;
|
||||
}
|
||||
this.singleFeatureType = !goog.isDef(opt_options) ||
|
||||
goog.isString(opt_options.featureType);
|
||||
this.defaultNamespaceURI = 'http://www.opengis.net/gml';
|
||||
this.readers = {
|
||||
'http://www.opengis.net/wfs': {
|
||||
'FeatureCollection': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
}
|
||||
},
|
||||
'http://www.opengis.net/gml': {
|
||||
'_inherit': function(node, obj, container) {
|
||||
// To be implemented by version specific parsers
|
||||
},
|
||||
'name': function(node, obj) {
|
||||
obj.name = this.getChildValue(node);
|
||||
},
|
||||
'featureMember': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'featureMembers': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'GeometryCollection': function(node, container) {
|
||||
var parts = [];
|
||||
this.readers[this.defaultNamespaceURI]['_inherit'].apply(this,
|
||||
[node, parts, container]);
|
||||
this.readChildNodes(node, parts);
|
||||
container.geometry = {
|
||||
type: ol.geom.GeometryType.GEOMETRYCOLLECTION,
|
||||
parts: parts
|
||||
};
|
||||
},
|
||||
'geometryMember': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'MultiPoint': function(node, container) {
|
||||
var parts = [];
|
||||
this.readers[this.defaultNamespaceURI]['_inherit'].apply(this,
|
||||
[node, parts, container]);
|
||||
this.readChildNodes(node, parts);
|
||||
container.geometry = {
|
||||
type: ol.geom.GeometryType.MULTIPOINT,
|
||||
parts: parts
|
||||
};
|
||||
},
|
||||
'pointMember': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'MultiLineString': function(node, container) {
|
||||
var parts = [];
|
||||
this.readers[this.defaultNamespaceURI]['_inherit'].apply(this,
|
||||
[node, parts, container]);
|
||||
this.readChildNodes(node, parts);
|
||||
container.geometry = {
|
||||
type: ol.geom.GeometryType.MULTILINESTRING,
|
||||
parts: parts
|
||||
};
|
||||
},
|
||||
'lineStringMember': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'MultiPolygon': function(node, container) {
|
||||
var parts = [];
|
||||
this.readers[this.defaultNamespaceURI]['_inherit'].apply(this,
|
||||
[node, parts, container]);
|
||||
this.readChildNodes(node, parts);
|
||||
container.geometry = {
|
||||
type: ol.geom.GeometryType.MULTIPOLYGON,
|
||||
parts: parts
|
||||
};
|
||||
},
|
||||
'polygonMember': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'Point': function(node, container) {
|
||||
var coordinates = [];
|
||||
this.readChildNodes(node, coordinates);
|
||||
var point = {
|
||||
type: ol.geom.GeometryType.POINT,
|
||||
coordinates: coordinates[0][0]
|
||||
};
|
||||
// in the case of a multi geometry this is parts
|
||||
if (goog.isArray(container)) {
|
||||
container.push(point);
|
||||
} else {
|
||||
container.geometry = point;
|
||||
}
|
||||
},
|
||||
'LineString': function(node, container) {
|
||||
var coordinates = [];
|
||||
this.readers[this.defaultNamespaceURI]['_inherit'].apply(this,
|
||||
[node, coordinates, container]);
|
||||
this.readChildNodes(node, coordinates);
|
||||
var linestring = {
|
||||
type: ol.geom.GeometryType.LINESTRING,
|
||||
coordinates: coordinates[0]
|
||||
};
|
||||
// in the case of a multi geometry this is parts
|
||||
if (goog.isArray(container)) {
|
||||
container.push(linestring);
|
||||
} else {
|
||||
container.geometry = linestring;
|
||||
}
|
||||
},
|
||||
'Polygon': function(node, container) {
|
||||
var obj = {outer: null, inner: []};
|
||||
this.readers[this.defaultNamespaceURI]['_inherit'].apply(this,
|
||||
[node, obj, container]);
|
||||
this.readChildNodes(node, obj);
|
||||
obj.inner.unshift(obj.outer);
|
||||
var polygon = {
|
||||
type: ol.geom.GeometryType.POLYGON,
|
||||
coordinates: obj.inner
|
||||
};
|
||||
// in the case of a multi geometry this is parts
|
||||
if (goog.isArray(container)) {
|
||||
container.push(polygon);
|
||||
} else {
|
||||
container.geometry = polygon;
|
||||
}
|
||||
},
|
||||
'LinearRing': function(node, container) {
|
||||
var coordinates = [];
|
||||
this.readers[this.defaultNamespaceURI]['_inherit'].apply(this,
|
||||
[node, coordinates, container]);
|
||||
this.readChildNodes(node, coordinates);
|
||||
if (goog.isArray(container)) {
|
||||
container.push(coordinates);
|
||||
} else {
|
||||
container.geometry = {
|
||||
type: ol.geom.GeometryType.LINEARRING,
|
||||
coordinates: coordinates[0]
|
||||
};
|
||||
}
|
||||
},
|
||||
'coordinates': function(node, coordinates) {
|
||||
var str = this.getChildValue(node).replace(
|
||||
this.regExes.trimSpace, '');
|
||||
str = str.replace(this.regExes.trimComma, ',');
|
||||
var coords;
|
||||
var cs = node.getAttribute('cs') || ',';
|
||||
var ts = node.getAttribute('ts') || this.regExes.splitSpace;
|
||||
var pointList = str.split(ts);
|
||||
var numPoints = pointList.length;
|
||||
var points = new Array(numPoints);
|
||||
for (var i = 0; i < numPoints; ++i) {
|
||||
coords = pointList[i].split(cs).map(parseFloat);
|
||||
if (this.axisOrientation.substr(0, 2) === 'en') {
|
||||
points[i] = coords;
|
||||
} else {
|
||||
if (coords.length === 2) {
|
||||
points[i] = coords.reverse();
|
||||
} else if (coords.length === 3) {
|
||||
points[i] = [coords[1], coords[0], coords[2]];
|
||||
}
|
||||
}
|
||||
}
|
||||
coordinates.push(points);
|
||||
},
|
||||
'coord': function(node, coordinates) {
|
||||
var coord = {};
|
||||
if (coordinates.length === 0) {
|
||||
coordinates.push([]);
|
||||
}
|
||||
this.readChildNodes(node, coord);
|
||||
if (goog.isDef(coord.z)) {
|
||||
coordinates.push([coord.x, coord.y, coord.z]);
|
||||
} else {
|
||||
coordinates[0].push([coord.x, coord.y]);
|
||||
}
|
||||
},
|
||||
'X': function(node, coord) {
|
||||
coord.x = parseFloat(this.getChildValue(node));
|
||||
},
|
||||
'Y': function(node, coord) {
|
||||
coord.y = parseFloat(this.getChildValue(node));
|
||||
},
|
||||
'Z': function(node, coord) {
|
||||
coord.z = parseFloat(this.getChildValue(node));
|
||||
}
|
||||
}
|
||||
};
|
||||
this.featureNSReaders_ = {
|
||||
'*': function(node, obj) {
|
||||
// The node can either be named like the featureType, or it
|
||||
// can be a child of the feature:featureType. Children can be
|
||||
// geometry or attributes.
|
||||
var name;
|
||||
var local = node.localName || node.nodeName.split(':').pop();
|
||||
// Since an attribute can have the same name as the feature type
|
||||
// we only want to read the node as a feature if the parent
|
||||
// node can have feature nodes as children. In this case, the
|
||||
// obj.features property is set.
|
||||
if (obj.features) {
|
||||
if (!this.singleFeatureType &&
|
||||
(goog.array.indexOf(this.featureType, local) !== -1)) {
|
||||
name = '_typeName';
|
||||
} else if (local === this.featureType) {
|
||||
name = '_typeName';
|
||||
}
|
||||
} else {
|
||||
// Assume attribute elements have one child node and that the child
|
||||
// is a text node. Otherwise assume it is a geometry node.
|
||||
if (node.childNodes.length === 0 ||
|
||||
(node.childNodes.length === 1 &&
|
||||
node.firstChild.nodeType === 3)) {
|
||||
if (this.extractAttributes) {
|
||||
name = '_attribute';
|
||||
}
|
||||
} else {
|
||||
name = '_geometry';
|
||||
}
|
||||
}
|
||||
if (name) {
|
||||
this.readers[this.featureNS][name].apply(this, [node, obj]);
|
||||
}
|
||||
},
|
||||
'_typeName': function(node, obj) {
|
||||
var container = {properties: {}};
|
||||
this.readChildNodes(node, container);
|
||||
// look for common gml namespaced elements
|
||||
if (container.name) {
|
||||
container.properties.name = container.name;
|
||||
}
|
||||
var feature = new ol.Feature(container.properties);
|
||||
var geom = container.geometry;
|
||||
if (geom) {
|
||||
var sharedVertices = undefined;
|
||||
if (this.readFeaturesOptions_) {
|
||||
var callback = this.readFeaturesOptions_.callback;
|
||||
if (callback) {
|
||||
sharedVertices = callback(feature, geom.type);
|
||||
}
|
||||
}
|
||||
var geometry = this.createGeometry_({geometry: geom},
|
||||
sharedVertices);
|
||||
if (goog.isDef(geometry)) {
|
||||
feature.setGeometry(geometry);
|
||||
}
|
||||
}
|
||||
// TODO set feature.type and feature.namespace
|
||||
// TODO set fid
|
||||
obj.features.push(feature);
|
||||
},
|
||||
'_geometry': function(node, obj) {
|
||||
if (!this.geometryName) {
|
||||
this.geometryName = node.nodeName.split(':').pop();
|
||||
}
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'_attribute': function(node, obj) {
|
||||
var local = node.localName || node.nodeName.split(':').pop();
|
||||
var value = this.getChildValue(node);
|
||||
obj.properties[local] = value;
|
||||
}
|
||||
};
|
||||
if (goog.isDef(this.featureNS)) {
|
||||
this.readers[this.featureNS] = this.featureNSReaders_;
|
||||
}
|
||||
this.writers = {
|
||||
'http://www.opengis.net/gml': {
|
||||
'featureMember': function(feature) {
|
||||
var node = this.createElementNS('gml:featureMember');
|
||||
this.writeNode('_typeName', feature, this.featureNS, node);
|
||||
return node;
|
||||
},
|
||||
'MultiPoint': function(geometry) {
|
||||
var node = this.createElementNS('gml:MultiPoint');
|
||||
for (var i = 0, ii = geometry.components.length; i < ii; ++i) {
|
||||
this.writeNode('pointMember', geometry.components[i], null, node);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'pointMember': function(geometry) {
|
||||
var node = this.createElementNS('gml:pointMember');
|
||||
this.writeNode('Point', geometry, null, node);
|
||||
return node;
|
||||
},
|
||||
'MultiLineString': function(geometry) {
|
||||
var node = this.createElementNS('gml:MultiLineString');
|
||||
for (var i = 0, ii = geometry.components.length; i < ii; ++i) {
|
||||
this.writeNode('lineStringMember', geometry.components[i], null,
|
||||
node);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'lineStringMember': function(geometry) {
|
||||
var node = this.createElementNS('gml:lineStringMember');
|
||||
this.writeNode('LineString', geometry, null, node);
|
||||
return node;
|
||||
},
|
||||
'MultiPolygon': function(geometry) {
|
||||
var node = this.createElementNS('gml:MultiPolygon');
|
||||
for (var i = 0, ii = geometry.components.length; i < ii; ++i) {
|
||||
this.writeNode('polygonMember', geometry.components[i], null, node);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'polygonMember': function(geometry) {
|
||||
var node = this.createElementNS('gml:polygonMember');
|
||||
this.writeNode('Polygon', geometry, null, node);
|
||||
return node;
|
||||
},
|
||||
'GeometryCollection': function(geometry) {
|
||||
var node = this.createElementNS('gml:GeometryCollection');
|
||||
for (var i = 0, ii = geometry.components.length; i < ii; ++i) {
|
||||
this.writeNode('geometryMember', geometry.components[i], null, node);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'geometryMember': function(geometry) {
|
||||
var node = this.createElementNS('gml:geometryMember');
|
||||
var child = this.writeNode('_geometry', geometry, this.featureNS);
|
||||
node.appendChild(child.firstChild);
|
||||
return node;
|
||||
}
|
||||
},
|
||||
'http://www.opengis.net/wfs': {
|
||||
'FeatureCollection': function(features) {
|
||||
/**
|
||||
* This is only here because GML2 only describes abstract
|
||||
* feature collections. Typically, you would not be using
|
||||
* the GML format to write wfs elements. This just provides
|
||||
* some way to write out lists of features. GML3 defines the
|
||||
* featureMembers element, so that is used by default instead.
|
||||
*/
|
||||
var node = this.createElementNS('wfs:FeatureCollection',
|
||||
'http://www.opengis.net/wfs');
|
||||
for (var i = 0, ii = features.length; i < ii; ++i) {
|
||||
this.writeNode('featureMember', features[i], null, node);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
}
|
||||
};
|
||||
this.featureNSWiters_ = {
|
||||
'_typeName': function(feature) {
|
||||
var node = this.createElementNS('feature:' + this.featureType,
|
||||
this.featureNS);
|
||||
// TODO: https://github.com/openlayers/ol3/issues/558
|
||||
// this.setAttributeNS(node, null, 'fid', feature.fid);
|
||||
if (feature.getGeometry() !== null) {
|
||||
this.writeNode('_geometry', feature.getGeometry(), this.featureNS,
|
||||
node);
|
||||
}
|
||||
var attributes = feature.getAttributes();
|
||||
for (var name in attributes) {
|
||||
var value = attributes[name];
|
||||
if (goog.isDefAndNotNull(value) && !(value instanceof
|
||||
ol.geom.Geometry)) {
|
||||
this.writeNode('_attribute', {name: name, value: value},
|
||||
this.featureNS, node);
|
||||
}
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'_geometry': function(geometry) {
|
||||
var node = this.createElementNS('feature:' + this.geometryName,
|
||||
this.featureNS);
|
||||
var type = geometry.getType(), child;
|
||||
if (type === ol.geom.GeometryType.POINT) {
|
||||
child = this.writeNode('Point', geometry, null, node);
|
||||
} else if (type === ol.geom.GeometryType.MULTIPOINT) {
|
||||
child = this.writeNode('MultiPoint', geometry, null, node);
|
||||
} else if (type === ol.geom.GeometryType.LINEARRING) {
|
||||
child = this.writeNode('LinearRing', geometry.getCoordinates(), null,
|
||||
node);
|
||||
} else if (type === ol.geom.GeometryType.LINESTRING) {
|
||||
child = this.writeNode('LineString', geometry, null, node);
|
||||
} else if (type === ol.geom.GeometryType.MULTILINESTRING) {
|
||||
child = this.writeNode('MultiLineString', geometry, null, node);
|
||||
} else if (type === ol.geom.GeometryType.POLYGON) {
|
||||
child = this.writeNode('Polygon', geometry, null, node);
|
||||
} else if (type === ol.geom.GeometryType.MULTIPOLYGON) {
|
||||
child = this.writeNode('MultiPolygon', geometry, null, node);
|
||||
} else if (type === ol.geom.GeometryType.GEOMETRYCOLLECTION) {
|
||||
child = this.writeNode('GeometryCollection', geometry, null, node);
|
||||
}
|
||||
if (goog.isDef(this.srsName)) {
|
||||
this.setAttributeNS(child, null, 'srsName', this.srsName);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'_attribute': function(obj) {
|
||||
var node = this.createElementNS('feature:' + obj.name, this.featureNS);
|
||||
node.appendChild(this.createTextNode(obj.value));
|
||||
return node;
|
||||
}
|
||||
};
|
||||
this.writers[this.featureNS] = this.featureNSWiters_;
|
||||
goog.base(this);
|
||||
};
|
||||
goog.inherits(ol.parser.ogc.GML, ol.parser.XML);
|
||||
|
||||
|
||||
/**
|
||||
* @param {string|Document|Element|Object} data Data to read.
|
||||
* @return {Object} An object representing the document.
|
||||
*/
|
||||
ol.parser.ogc.GML.prototype.read = function(data) {
|
||||
if (typeof data == 'string') {
|
||||
data = goog.dom.xml.loadXml(data);
|
||||
}
|
||||
if (data && data.nodeType == 9) {
|
||||
data = data.documentElement;
|
||||
}
|
||||
var obj = {features: []};
|
||||
this.readNode(data, obj, true);
|
||||
return obj;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @param {Element|Document} node The node to be read.
|
||||
* @param {Object} obj The object to be modified.
|
||||
* @param {boolean=} opt_first Should be set to true for the first node read.
|
||||
* This is usually the readNode call in the read method. Without this being
|
||||
* set, auto-configured properties will stick on subsequent reads.
|
||||
* @return {Object} The input object, modified (or a new one if none was
|
||||
* provided).
|
||||
*/
|
||||
ol.parser.ogc.GML.prototype.readNode = function(node, obj, opt_first) {
|
||||
// on subsequent calls of this.read(), we want to reset auto-
|
||||
// configured properties and auto-configure again.
|
||||
if (opt_first === true && this.autoConfig === true) {
|
||||
this.featureType = null;
|
||||
delete this.readers[this.featureNS];
|
||||
delete this.writers[this.featureNS];
|
||||
this.featureNS = null;
|
||||
}
|
||||
// featureType auto-configuration
|
||||
if (!this.featureNS && (!(node.namespaceURI in this.readers) &&
|
||||
node.parentNode.namespaceURI == this.defaultNamespaceURI &&
|
||||
(/^(.*:)?featureMembers?$/).test(node.parentNode.nodeName))) {
|
||||
this.featureType = node.nodeName.split(':').pop();
|
||||
this.readers[node.namespaceURI] = this.featureNSReaders_;
|
||||
this.writers[node.namespaceURI] = this.featureNSWiters_;
|
||||
this.featureNS = node.namespaceURI;
|
||||
this.autoConfig = true;
|
||||
}
|
||||
return ol.parser.XML.prototype.readNode.apply(this, [node, obj]);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @param {Object} container Geometry container.
|
||||
* @param {ol.geom.SharedVertices=} opt_vertices Shared vertices.
|
||||
* @return {ol.geom.Geometry} The geometry created.
|
||||
*/
|
||||
// TODO use a mixin since this is also used in the KML parser
|
||||
ol.parser.ogc.GML.prototype.createGeometry_ = function(container,
|
||||
opt_vertices) {
|
||||
var geometry = null, coordinates, i, ii;
|
||||
switch (container.geometry.type) {
|
||||
case ol.geom.GeometryType.POINT:
|
||||
geometry = new ol.geom.Point(container.geometry.coordinates,
|
||||
opt_vertices);
|
||||
break;
|
||||
case ol.geom.GeometryType.LINEARRING:
|
||||
geometry = new ol.geom.LinearRing(container.geometry.coordinates,
|
||||
opt_vertices);
|
||||
break;
|
||||
case ol.geom.GeometryType.LINESTRING:
|
||||
geometry = new ol.geom.LineString(container.geometry.coordinates,
|
||||
opt_vertices);
|
||||
break;
|
||||
case ol.geom.GeometryType.POLYGON:
|
||||
geometry = new ol.geom.Polygon(container.geometry.coordinates,
|
||||
opt_vertices);
|
||||
break;
|
||||
case ol.geom.GeometryType.MULTIPOINT:
|
||||
coordinates = [];
|
||||
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
||||
coordinates.push(container.geometry.parts[i].coordinates);
|
||||
}
|
||||
geometry = new ol.geom.MultiPoint(coordinates, opt_vertices);
|
||||
break;
|
||||
case ol.geom.GeometryType.MULTILINESTRING:
|
||||
coordinates = [];
|
||||
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
||||
coordinates.push(container.geometry.parts[i].coordinates);
|
||||
}
|
||||
geometry = new ol.geom.MultiLineString(coordinates, opt_vertices);
|
||||
break;
|
||||
case ol.geom.GeometryType.MULTIPOLYGON:
|
||||
coordinates = [];
|
||||
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
||||
coordinates.push(container.geometry.parts[i].coordinates);
|
||||
}
|
||||
geometry = new ol.geom.MultiPolygon(coordinates, opt_vertices);
|
||||
break;
|
||||
case ol.geom.GeometryType.GEOMETRYCOLLECTION:
|
||||
var geometries = [];
|
||||
for (i = 0, ii = container.geometry.parts.length; i < ii; i++) {
|
||||
geometries.push(this.createGeometry_({
|
||||
geometry: container.geometry.parts[i]
|
||||
}, opt_vertices));
|
||||
}
|
||||
geometry = new ol.geom.GeometryCollection(geometries);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return geometry;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Parse a GML document provided as a string.
|
||||
* @param {string} str GML document.
|
||||
* @param {ol.parser.ReadFeaturesOptions=} opt_options Reader options.
|
||||
* @return {Array.<ol.Feature>} Array of features.
|
||||
*/
|
||||
ol.parser.ogc.GML.prototype.readFeaturesFromString =
|
||||
function(str, opt_options) {
|
||||
this.readFeaturesOptions_ = opt_options;
|
||||
return this.read(str).features;
|
||||
};
|
||||
@@ -0,0 +1,118 @@
|
||||
goog.provide('ol.parser.ogc.GML_v2');
|
||||
|
||||
goog.require('goog.array');
|
||||
goog.require('goog.object');
|
||||
goog.require('ol.parser.ogc.GML');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {ol.parser.GML2Options=} opt_options Optional configuration object.
|
||||
* @extends {ol.parser.ogc.GML}
|
||||
*/
|
||||
ol.parser.ogc.GML_v2 = function(opt_options) {
|
||||
this.schemaLocation = 'http://www.opengis.net/gml ' +
|
||||
'http://schemas.opengis.net/gml/2.1.2/feature.xsd';
|
||||
goog.base(this, opt_options);
|
||||
goog.object.extend(this.readers['http://www.opengis.net/gml'], {
|
||||
'outerBoundaryIs': function(node, container) {
|
||||
var coordinates = [];
|
||||
this.readChildNodes(node, coordinates);
|
||||
container['outer'] = coordinates[0][0];
|
||||
},
|
||||
'innerBoundaryIs': function(node, container) {
|
||||
var coordinates = [];
|
||||
this.readChildNodes(node, coordinates);
|
||||
container.inner.push(coordinates[0][0]);
|
||||
},
|
||||
'Box': function(node, container) {
|
||||
var coordinates = [];
|
||||
this.readChildNodes(node, coordinates);
|
||||
container.bounds = [coordinates[0][0][0], coordinates[0][1][0],
|
||||
coordinates[0][0][1], coordinates[0][1][1]];
|
||||
}
|
||||
});
|
||||
goog.object.extend(this.writers['http://www.opengis.net/gml'], {
|
||||
'Point': function(geometry) {
|
||||
var node = this.createElementNS('gml:Point');
|
||||
this.writeNode('coordinates', [geometry.getCoordinates()], null, node);
|
||||
return node;
|
||||
},
|
||||
'coordinates': function(coordinates) {
|
||||
var numCoordinates = coordinates.length;
|
||||
var parts = new Array(numCoordinates);
|
||||
for (var i = 0; i < numCoordinates; ++i) {
|
||||
var coord = coordinates[i];
|
||||
var part = goog.array.concat(coord);
|
||||
if (this.axisOrientation.substr(0, 2) !== 'en') {
|
||||
part[0] = coord[1];
|
||||
part[1] = coord[0];
|
||||
}
|
||||
parts[i] = part.join(',');
|
||||
}
|
||||
var value = parts.join(' ');
|
||||
var node = this.createElementNS('gml:coordinates');
|
||||
this.setAttributeNS(node, null, 'decimal', '.');
|
||||
this.setAttributeNS(node, null, 'cs', ',');
|
||||
this.setAttributeNS(node, null, 'ts', ' ');
|
||||
node.appendChild(this.createTextNode(value));
|
||||
return node;
|
||||
},
|
||||
'LineString': function(geometry) {
|
||||
var node = this.createElementNS('gml:LineString');
|
||||
this.writeNode('coordinates', geometry.getCoordinates(), null, node);
|
||||
return node;
|
||||
},
|
||||
'Polygon': function(geometry) {
|
||||
var node = this.createElementNS('gml:Polygon');
|
||||
var coordinates = geometry.getCoordinates();
|
||||
this.writeNode('outerBoundaryIs', coordinates[0], null, node);
|
||||
for (var i = 1; i < coordinates.length; ++i) {
|
||||
this.writeNode('innerBoundaryIs', coordinates[i], null, node);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'outerBoundaryIs': function(ring) {
|
||||
var node = this.createElementNS('gml:outerBoundaryIs');
|
||||
this.writeNode('LinearRing', ring, null, node);
|
||||
return node;
|
||||
},
|
||||
'innerBoundaryIs': function(ring) {
|
||||
var node = this.createElementNS('gml:innerBoundaryIs');
|
||||
this.writeNode('LinearRing', ring, null, node);
|
||||
return node;
|
||||
},
|
||||
'LinearRing': function(ring) {
|
||||
var node = this.createElementNS('gml:LinearRing');
|
||||
this.writeNode('coordinates', ring, null, node);
|
||||
return node;
|
||||
},
|
||||
'Box': function(extent) {
|
||||
var node = this.createElementNS('gml:Box');
|
||||
this.writeNode('coordinates', [[extent.minX, extent.minY],
|
||||
[extent.maxX, extent.maxY]], null, node);
|
||||
// srsName attribute is optional for gml:Box
|
||||
if (goog.isDef(this.srsName)) {
|
||||
// TODO setAttribute or this.setAttributeNS
|
||||
node.setAttribute('srsName', this.srsName);
|
||||
}
|
||||
return node;
|
||||
}
|
||||
});
|
||||
};
|
||||
goog.inherits(ol.parser.ogc.GML_v2, ol.parser.ogc.GML);
|
||||
|
||||
|
||||
/**
|
||||
* @param {Object} obj Object structure to write out as XML.
|
||||
* @return {string} An string representing the XML document.
|
||||
*/
|
||||
ol.parser.ogc.GML_v2.prototype.write = function(obj) {
|
||||
var root = this.writeNode('FeatureCollection', obj.features,
|
||||
'http://www.opengis.net/wfs');
|
||||
this.setAttributeNS(
|
||||
root, 'http://www.w3.org/2001/XMLSchema-instance',
|
||||
'xsi:schemaLocation', this.schemaLocation);
|
||||
return this.serialize(root);
|
||||
};
|
||||
@@ -0,0 +1,423 @@
|
||||
goog.provide('ol.parser.ogc.GML_v3');
|
||||
|
||||
goog.require('goog.dom.xml');
|
||||
goog.require('goog.object');
|
||||
goog.require('ol.geom.GeometryType');
|
||||
goog.require('ol.parser.ogc.GML');
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @param {ol.parser.GML3Options=} opt_options Optional configuration object.
|
||||
* @extends {ol.parser.ogc.GML}
|
||||
*/
|
||||
ol.parser.ogc.GML_v3 = function(opt_options) {
|
||||
this.schemaLocation = 'http://www.opengis.net/gml ' +
|
||||
'http://schemas.opengis.net/gml/3.1.1/profiles/gmlsfProfile/' +
|
||||
'1.0.0/gmlsf.xsd';
|
||||
goog.base(this, opt_options);
|
||||
if (!goog.isDef(this.surface)) {
|
||||
this.surface = false;
|
||||
}
|
||||
if (!goog.isDef(this.curve)) {
|
||||
this.curve = false;
|
||||
}
|
||||
if (!goog.isDef(this.multiCurve)) {
|
||||
this.multiCurve = true;
|
||||
}
|
||||
if (!goog.isDef(this.multiSurface)) {
|
||||
this.multiSurface = true;
|
||||
}
|
||||
this.featureNSWiters_['_geometry'] = function(geometry) {
|
||||
var node = this.createElementNS('feature:' + this.geometryName,
|
||||
this.featureNS);
|
||||
var type = geometry.getType(), child;
|
||||
if (type === ol.geom.GeometryType.POINT) {
|
||||
child = this.writeNode('Point', geometry, null, node);
|
||||
} else if (type === ol.geom.GeometryType.MULTIPOINT) {
|
||||
child = this.writeNode('MultiPoint', geometry, null, node);
|
||||
} else if (type === ol.geom.GeometryType.LINESTRING) {
|
||||
if (this.curve === true) {
|
||||
child = this.writeNode('Curve', geometry, null, node);
|
||||
} else {
|
||||
child = this.writeNode('LineString', geometry, null, node);
|
||||
}
|
||||
} else if (type === ol.geom.GeometryType.LINEARRING) {
|
||||
child = this.writeNode('LinearRing', geometry.getCoordinates(), null,
|
||||
node);
|
||||
} else if (type === ol.geom.GeometryType.MULTILINESTRING) {
|
||||
if (this.multiCurve === false) {
|
||||
child = this.writeNode('MultiLineString', geometry, null, node);
|
||||
} else {
|
||||
child = this.writeNode('MultiCurve', geometry, null, node);
|
||||
}
|
||||
} else if (type === ol.geom.GeometryType.POLYGON) {
|
||||
if (this.surface === true) {
|
||||
child = this.writeNode('Surface', geometry, null, node);
|
||||
} else {
|
||||
child = this.writeNode('Polygon', geometry, null, node);
|
||||
}
|
||||
} else if (type === ol.geom.GeometryType.MULTIPOLYGON) {
|
||||
if (this.multiSurface === false) {
|
||||
child = this.writeNode('MultiPolygon', geometry, null, node);
|
||||
} else {
|
||||
child = this.writeNode('MultiSurface', geometry, null, node);
|
||||
}
|
||||
} else if (type === ol.geom.GeometryType.GEOMETRYCOLLECTION) {
|
||||
child = this.writeNode('MultiGeometry', geometry, null, node);
|
||||
}
|
||||
if (goog.isDef(this.srsName)) {
|
||||
this.setAttributeNS(child, null, 'srsName', this.srsName);
|
||||
}
|
||||
return node;
|
||||
};
|
||||
goog.object.extend(this.readers['http://www.opengis.net/gml'], {
|
||||
'_inherit': function(node, obj, container) {
|
||||
// SRSReferenceGroup attributes
|
||||
var dim = parseInt(node.getAttribute('srsDimension'), 10) ||
|
||||
(container && container.srsDimension);
|
||||
if (dim) {
|
||||
obj.srsDimension = dim;
|
||||
}
|
||||
},
|
||||
'featureMembers': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'Curve': function(node, container) {
|
||||
var coordinates = [];
|
||||
this.readers[this.defaultNamespaceURI]['_inherit'].apply(this,
|
||||
[node, coordinates, container]);
|
||||
this.readChildNodes(node, coordinates);
|
||||
var linestring = {
|
||||
type: ol.geom.GeometryType.LINESTRING,
|
||||
coordinates: coordinates[0]
|
||||
};
|
||||
// in the case of a multi geometry this is parts
|
||||
if (goog.isArray(container)) {
|
||||
container.push(linestring);
|
||||
} else {
|
||||
container.geometry = linestring;
|
||||
}
|
||||
},
|
||||
'segments': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'LineStringSegment': function(node, container) {
|
||||
var coordinates = [];
|
||||
this.readChildNodes(node, coordinates);
|
||||
container.push(coordinates[0]);
|
||||
},
|
||||
'pos': function(node, obj) {
|
||||
var str = this.getChildValue(node).replace(
|
||||
this.regExes.trimSpace, '');
|
||||
var coords = str.split(this.regExes.splitSpace).map(parseFloat);
|
||||
if (this.axisOrientation.substr(0, 2) === 'en') {
|
||||
obj.push([coords]);
|
||||
} else {
|
||||
if (coords.length === 2) {
|
||||
obj.push([coords.reverse()]);
|
||||
} else if (coords.length === 3) {
|
||||
obj.push([coords[1], coords[0], coords[2]]);
|
||||
}
|
||||
}
|
||||
},
|
||||
'posList': function(node, obj) {
|
||||
var str = this.getChildValue(node).replace(
|
||||
this.regExes.trimSpace, '');
|
||||
var coords = str.split(this.regExes.splitSpace);
|
||||
// The "dimension" attribute is from the GML 3.0.1 spec.
|
||||
var dim = obj.srsDimension ||
|
||||
parseInt(node.getAttribute('srsDimension') ||
|
||||
node.getAttribute('dimension'), 10) || 2;
|
||||
var j, x, y, z;
|
||||
var numPoints = coords.length / dim;
|
||||
var points = new Array(numPoints);
|
||||
for (var i = 0, ii = coords.length; i < ii; i += dim) {
|
||||
x = parseFloat(coords[i]);
|
||||
y = parseFloat(coords[i + 1]);
|
||||
var xy = this.axisOrientation.substr(0, 2) === 'en';
|
||||
if (dim === 3) {
|
||||
if (xy) {
|
||||
points[i / dim] = [x, y, parseFloat(coords[i + 2])];
|
||||
} else {
|
||||
points[i / dim] = [y, x, parseFloat(coords[i + 2])];
|
||||
}
|
||||
} else if (dim === 2) {
|
||||
if (xy) {
|
||||
points[i / dim] = [x, y];
|
||||
} else {
|
||||
points[i / dim] = [y, x];
|
||||
}
|
||||
}
|
||||
}
|
||||
obj.push(points);
|
||||
},
|
||||
'Surface': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'patches': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'PolygonPatch': function(node, obj) {
|
||||
this.readers[this.defaultNamespaceURI]['Polygon'].apply(this,
|
||||
[node, obj]);
|
||||
},
|
||||
'exterior': function(node, container) {
|
||||
var coordinates = [];
|
||||
this.readChildNodes(node, coordinates);
|
||||
container.outer = coordinates[0][0];
|
||||
},
|
||||
'interior': function(node, container) {
|
||||
var coordinates = [];
|
||||
this.readChildNodes(node, coordinates);
|
||||
container.inner.push(coordinates[0][0]);
|
||||
},
|
||||
'MultiCurve': function(node, container) {
|
||||
var parts = [];
|
||||
this.readers[this.defaultNamespaceURI]['_inherit'].apply(this,
|
||||
[node, parts, container]);
|
||||
this.readChildNodes(node, parts);
|
||||
container.geometry = {
|
||||
type: ol.geom.GeometryType.MULTILINESTRING,
|
||||
parts: parts
|
||||
};
|
||||
},
|
||||
'curveMember': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'MultiSurface': function(node, container) {
|
||||
var parts = [];
|
||||
this.readers[this.defaultNamespaceURI]['_inherit'].apply(this,
|
||||
[node, parts, container]);
|
||||
this.readChildNodes(node, parts);
|
||||
container.geometry = {
|
||||
type: ol.geom.GeometryType.MULTIPOLYGON,
|
||||
parts: parts
|
||||
};
|
||||
},
|
||||
'surfaceMember': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'surfaceMembers': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'pointMembers': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'lineStringMembers': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'polygonMembers': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'geometryMembers': function(node, obj) {
|
||||
this.readChildNodes(node, obj);
|
||||
},
|
||||
'Envelope': function(node, container) {
|
||||
var coordinates = [];
|
||||
this.readChildNodes(node, coordinates);
|
||||
container.bounds = [coordinates[0][0][0][0], coordinates[1][0][0][0],
|
||||
coordinates[0][0][0][1], coordinates[1][0][0][1]];
|
||||
},
|
||||
'lowerCorner': function(node, envelope) {
|
||||
var coordinates = [];
|
||||
this.readers[this.defaultNamespaceURI]['pos'].apply(this,
|
||||
[node, coordinates]);
|
||||
envelope.push(coordinates);
|
||||
},
|
||||
'upperCorner': function(node, envelope) {
|
||||
var coordinates = [];
|
||||
this.readers[this.defaultNamespaceURI]['pos'].apply(this,
|
||||
[node, coordinates]);
|
||||
envelope.push(coordinates);
|
||||
}
|
||||
});
|
||||
goog.object.extend(this.writers['http://www.opengis.net/gml'], {
|
||||
'featureMembers': function(features) {
|
||||
var node = this.createElementNS('gml:featureMembers');
|
||||
for (var i = 0, ii = features.length; i < ii; ++i) {
|
||||
this.writeNode('_typeName', features[i], this.featureNS, node);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'Point': function(geometry) {
|
||||
var node = this.createElementNS('gml:Point');
|
||||
this.writeNode('pos', geometry.getCoordinates(), null, node);
|
||||
return node;
|
||||
},
|
||||
'pos': function(point) {
|
||||
// only 2d for simple features profile
|
||||
var pos;
|
||||
if (this.axisOrientation.substr(0, 2) === 'en') {
|
||||
pos = (point[0] + ' ' + point[1]);
|
||||
} else {
|
||||
pos = (point[1] + ' ' + point[0]);
|
||||
}
|
||||
var node = this.createElementNS('gml:pos');
|
||||
node.appendChild(this.createTextNode(pos));
|
||||
return node;
|
||||
},
|
||||
'LineString': function(geometry) {
|
||||
var node = this.createElementNS('gml:LineString');
|
||||
this.writeNode('posList', geometry.getCoordinates(), null, node);
|
||||
return node;
|
||||
},
|
||||
'Curve': function(geometry) {
|
||||
var node = this.createElementNS('gml:Curve');
|
||||
this.writeNode('segments', geometry, null, node);
|
||||
return node;
|
||||
},
|
||||
'segments': function(geometry) {
|
||||
var node = this.createElementNS('gml:segments');
|
||||
this.writeNode('LineStringSegment', geometry, null, node);
|
||||
return node;
|
||||
},
|
||||
'LineStringSegment': function(geometry) {
|
||||
var node = this.createElementNS('gml:LineStringSegment');
|
||||
this.writeNode('posList', geometry.getCoordinates(), null, node);
|
||||
return node;
|
||||
},
|
||||
'posList': function(points) {
|
||||
// only 2d for simple features profile
|
||||
var len = points.length;
|
||||
var parts = new Array(len);
|
||||
var point;
|
||||
for (var i = 0; i < len; ++i) {
|
||||
point = points[i];
|
||||
if (this.axisOrientation.substr(0, 2) === 'en') {
|
||||
parts[i] = point[0] + ' ' + point[1];
|
||||
} else {
|
||||
parts[i] = point[1] + ' ' + point[0];
|
||||
}
|
||||
}
|
||||
var node = this.createElementNS('gml:posList');
|
||||
node.appendChild(this.createTextNode(parts.join(' ')));
|
||||
return node;
|
||||
},
|
||||
'Surface': function(geometry) {
|
||||
var node = this.createElementNS('gml:Surface');
|
||||
this.writeNode('patches', geometry, null, node);
|
||||
return node;
|
||||
},
|
||||
'patches': function(geometry) {
|
||||
var node = this.createElementNS('gml:patches');
|
||||
this.writeNode('PolygonPatch', geometry, null, node);
|
||||
return node;
|
||||
},
|
||||
'PolygonPatch': function(geometry) {
|
||||
var node = this.createElementNS('gml:PolygonPatch');
|
||||
node.setAttribute('interpolation', 'planar');
|
||||
var coordinates = geometry.getCoordinates();
|
||||
this.writeNode('exterior', coordinates[0], null, node);
|
||||
for (var i = 1, len = coordinates.length; i < len; ++i) {
|
||||
this.writeNode('interior', coordinates[i], null, node);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'Polygon': function(geometry) {
|
||||
var node = this.createElementNS('gml:Polygon');
|
||||
var coordinates = geometry.getCoordinates();
|
||||
this.writeNode('exterior', coordinates[0], null, node);
|
||||
for (var i = 1, len = coordinates.length; i < len; ++i) {
|
||||
this.writeNode('interior', coordinates[i], null, node);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'exterior': function(ring) {
|
||||
var node = this.createElementNS('gml:exterior');
|
||||
this.writeNode('LinearRing', ring, null, node);
|
||||
return node;
|
||||
},
|
||||
'interior': function(ring) {
|
||||
var node = this.createElementNS('gml:interior');
|
||||
this.writeNode('LinearRing', ring, null, node);
|
||||
return node;
|
||||
},
|
||||
'LinearRing': function(ring) {
|
||||
var node = this.createElementNS('gml:LinearRing');
|
||||
this.writeNode('posList', ring, null, node);
|
||||
return node;
|
||||
},
|
||||
'MultiCurve': function(geometry) {
|
||||
var node = this.createElementNS('gml:MultiCurve');
|
||||
for (var i = 0, len = geometry.components.length; i < len; ++i) {
|
||||
this.writeNode('curveMember', geometry.components[i], null, node);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'curveMember': function(geometry) {
|
||||
var node = this.createElementNS('gml:curveMember');
|
||||
if (this.curve) {
|
||||
this.writeNode('Curve', geometry, null, node);
|
||||
} else {
|
||||
this.writeNode('LineString', geometry, null, node);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'MultiSurface': function(geometry) {
|
||||
var node = this.createElementNS('gml:MultiSurface');
|
||||
for (var i = 0, len = geometry.components.length; i < len; ++i) {
|
||||
this.writeNode('surfaceMember', geometry.components[i], null, node);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'surfaceMember': function(polygon) {
|
||||
var node = this.createElementNS('gml:surfaceMember');
|
||||
if (this.surface) {
|
||||
this.writeNode('Surface', polygon, null, node);
|
||||
} else {
|
||||
this.writeNode('Polygon', polygon, null, node);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'Envelope': function(bounds) {
|
||||
var node = this.createElementNS('gml:Envelope');
|
||||
this.writeNode('lowerCorner', bounds, null, node);
|
||||
this.writeNode('upperCorner', bounds, null, node);
|
||||
// srsName attribute is required for gml:Envelope
|
||||
if (this.srsName) {
|
||||
node.setAttribute('srsName', this.srsName);
|
||||
}
|
||||
return node;
|
||||
},
|
||||
'lowerCorner': function(bounds) {
|
||||
// only 2d for simple features profile
|
||||
var pos;
|
||||
if (this.axisOrientation.substr(0, 2) === 'en') {
|
||||
pos = (bounds.left + ' ' + bounds.bottom);
|
||||
} else {
|
||||
pos = (bounds.bottom + ' ' + bounds.left);
|
||||
}
|
||||
var node = this.createElementNS('gml:lowerCorner');
|
||||
node.appendChild(this.createTextNode(pos));
|
||||
return node;
|
||||
},
|
||||
'upperCorner': function(bounds) {
|
||||
// only 2d for simple features profile
|
||||
var pos;
|
||||
if (this.axisOrientation.substr(0, 2) === 'en') {
|
||||
pos = (bounds.right + ' ' + bounds.top);
|
||||
} else {
|
||||
pos = (bounds.top + ' ' + bounds.right);
|
||||
}
|
||||
var node = this.createElementNS('gml:upperCorner');
|
||||
node.appendChild(this.createTextNode(pos));
|
||||
return node;
|
||||
}
|
||||
});
|
||||
};
|
||||
goog.inherits(ol.parser.ogc.GML_v3, ol.parser.ogc.GML);
|
||||
|
||||
|
||||
/**
|
||||
* @param {Object} obj Object structure to write out as XML.
|
||||
* @return {string} An string representing the XML document.
|
||||
*/
|
||||
ol.parser.ogc.GML_v3.prototype.write = function(obj) {
|
||||
var root = this.writeNode('featureMembers', obj.features);
|
||||
this.setAttributeNS(
|
||||
root, 'http://www.w3.org/2001/XMLSchema-instance',
|
||||
'xsi:schemaLocation', this.schemaLocation);
|
||||
return this.serialize(root);
|
||||
};
|
||||
@@ -1,5 +1,6 @@
|
||||
goog.provide('ol.parser.XML');
|
||||
|
||||
goog.require('goog.dom.xml');
|
||||
goog.require('ol.parser.Parser');
|
||||
|
||||
|
||||
@@ -246,3 +247,27 @@ ol.parser.XML.prototype.setAttributeNS = function(node, uri, name, value) {
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Serializes a node.
|
||||
*
|
||||
* @param {Element} node Element node to serialize.
|
||||
* @return {string} The serialized XML string.
|
||||
*/
|
||||
ol.parser.XML.prototype.serialize = function(node) {
|
||||
if (node.nodeType == 1) {
|
||||
// Add nodes to a document before serializing. Everything else
|
||||
// is serialized as is. This is also needed to get all namespaces
|
||||
// defined in some browsers such as Chrome (xmlns attributes).
|
||||
var doc = document.implementation.createDocument('', '', null);
|
||||
if (doc.importNode) {
|
||||
doc.appendChild(doc.importNode(node, true));
|
||||
} else {
|
||||
doc.appendChild(node);
|
||||
}
|
||||
return goog.dom.xml.serialize(doc);
|
||||
} else {
|
||||
return goog.dom.xml.serialize(node);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,314 @@
|
||||
goog.provide('ol.test.parser.gml_v2');
|
||||
|
||||
describe('ol.parser.gml_v2', function() {
|
||||
|
||||
var parser = new ol.parser.ogc.GML_v2();
|
||||
|
||||
describe('Test GML v2 parser', function() {
|
||||
it('Point read correctly from coord', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/point-coord.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.geometry.type).to.eql('point');
|
||||
expect(obj.geometry.coordinates).to.eql([1, 2]);
|
||||
});
|
||||
});
|
||||
it('Point read / written correctly from coordinates', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/point-coordinates.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
parser.srsName = 'foo';
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
delete parser.srsName;
|
||||
expect(obj.geometry.type).to.eql('point');
|
||||
expect(obj.geometry.coordinates).to.eql([1, 2]);
|
||||
});
|
||||
});
|
||||
it('MultiPoint read correctly from coord', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/multipoint-coord.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.geometry.type).to.eql('multipoint');
|
||||
expect(obj.geometry.parts.length).to.eql(3);
|
||||
expect(obj.geometry.parts[0].type).to.eql('point');
|
||||
expect(obj.geometry.parts[0].coordinates).to.eql([1, 2]);
|
||||
expect(obj.geometry.parts[1].coordinates).to.eql([2, 3]);
|
||||
expect(obj.geometry.parts[2].coordinates).to.eql([3, 4]);
|
||||
});
|
||||
});
|
||||
it('MultiPoint read / written correctly from coordinates', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/multipoint-coordinates.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
parser.srsName = 'foo';
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
delete parser.srsName;
|
||||
expect(obj.geometry.type).to.eql('multipoint');
|
||||
expect(obj.geometry.parts.length).to.eql(3);
|
||||
expect(obj.geometry.parts[0].type).to.eql('point');
|
||||
expect(obj.geometry.parts[0].coordinates).to.eql([1, 2]);
|
||||
expect(obj.geometry.parts[1].coordinates).to.eql([2, 3]);
|
||||
expect(obj.geometry.parts[2].coordinates).to.eql([3, 4]);
|
||||
});
|
||||
});
|
||||
it('LineString read correctly from coord', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/linestring-coord.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.geometry.type).to.eql('linestring');
|
||||
expect(obj.geometry.coordinates.length).to.eql(2);
|
||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4]]);
|
||||
});
|
||||
});
|
||||
it('LineString read / written correctly from coordinates', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/linestring-coordinates.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
parser.srsName = 'foo';
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
delete parser.srsName;
|
||||
expect(obj.geometry.type).to.eql('linestring');
|
||||
expect(obj.geometry.coordinates.length).to.eql(2);
|
||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4]]);
|
||||
});
|
||||
});
|
||||
it('MultiLineString read correctly from coord', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/multilinestring-coord.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.geometry.type).to.eql('multilinestring');
|
||||
expect(obj.geometry.parts.length).to.eql(2);
|
||||
expect(obj.geometry.parts[0].type).to.eql('linestring');
|
||||
expect(obj.geometry.parts[0].coordinates).to.eql([[1, 2], [2, 3]]);
|
||||
expect(obj.geometry.parts[1].coordinates).to.eql([[3, 4], [4, 5]]);
|
||||
});
|
||||
});
|
||||
it('MultiLineString read / written correctly from coordinates', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/multilinestring-coordinates.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
parser.srsName = 'foo';
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
delete parser.srsName;
|
||||
expect(obj.geometry.type).to.eql('multilinestring');
|
||||
expect(obj.geometry.parts.length).to.eql(2);
|
||||
expect(obj.geometry.parts[0].type).to.eql('linestring');
|
||||
expect(obj.geometry.parts[0].coordinates).to.eql([[1, 2], [2, 3]]);
|
||||
expect(obj.geometry.parts[1].coordinates).to.eql([[3, 4], [4, 5]]);
|
||||
});
|
||||
});
|
||||
it('Polygon read correctly from coord', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/polygon-coord.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.geometry.type).to.eql('polygon');
|
||||
expect(obj.geometry.coordinates.length).to.eql(3);
|
||||
expect(obj.geometry.coordinates[0].length).to.eql(4);
|
||||
expect(obj.geometry.coordinates[0]).to.eql([[1, 2], [3, 4],
|
||||
[5, 6], [1, 2]]);
|
||||
expect(obj.geometry.coordinates[1]).to.eql([[2, 3], [4, 5],
|
||||
[6, 7], [2, 3]]);
|
||||
expect(obj.geometry.coordinates[2]).to.eql([[3, 4], [5, 6],
|
||||
[7, 8], [3, 4]]);
|
||||
});
|
||||
});
|
||||
it('Polygon read / written correctly from coordinates', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/polygon-coordinates.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
parser.srsName = 'foo';
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
delete parser.srsName;
|
||||
expect(obj.geometry.type).to.eql('polygon');
|
||||
expect(obj.geometry.coordinates.length).to.eql(3);
|
||||
expect(obj.geometry.coordinates[0].length).to.eql(4);
|
||||
expect(obj.geometry.coordinates[0]).to.eql([[1, 2], [3, 4],
|
||||
[5, 6], [1, 2]]);
|
||||
expect(obj.geometry.coordinates[1]).to.eql([[2, 3], [4, 5],
|
||||
[6, 7], [2, 3]]);
|
||||
expect(obj.geometry.coordinates[2]).to.eql([[3, 4], [5, 6],
|
||||
[7, 8], [3, 4]]);
|
||||
});
|
||||
});
|
||||
it('MultiPolygon read correctly from coord', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/multipolygon-coord.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.geometry.type).to.eql('multipolygon');
|
||||
expect(obj.geometry.parts.length).to.eql(2);
|
||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
||||
});
|
||||
});
|
||||
it('MultiPolygon read / written correctly from coordinates', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/multipolygon-coordinates.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
parser.srsName = 'foo';
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
delete parser.srsName;
|
||||
expect(obj.geometry.type).to.eql('multipolygon');
|
||||
expect(obj.geometry.parts.length).to.eql(2);
|
||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
||||
});
|
||||
});
|
||||
it('GeometryCollection r / w correctly from coordinates', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/' +
|
||||
'geometrycollection-coordinates.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var p = new ol.parser.ogc.GML_v2({srsName: 'foo',
|
||||
featureNS: 'http://foo'});
|
||||
var obj = p.read(xml);
|
||||
var geom = p.createGeometry_({geometry: obj.geometry});
|
||||
var node = p.featureNSWiters_['_geometry'].apply(p,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||
expect(obj.geometry.type).to.eql('geometrycollection');
|
||||
expect(obj.geometry.parts.length).to.eql(3);
|
||||
expect(obj.geometry.parts[0].type).to.eql('point');
|
||||
expect(obj.geometry.parts[1].type).to.eql('linestring');
|
||||
expect(obj.geometry.parts[2].type).to.eql('polygon');
|
||||
});
|
||||
});
|
||||
it('Box read correctly from coord', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/box-coord.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.bounds).to.eql([1, 3, 2, 4]);
|
||||
});
|
||||
});
|
||||
it('Box read correctly from coordinates', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/box-coordinates.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.bounds).to.eql([1, 3, 2, 4]);
|
||||
});
|
||||
});
|
||||
it('LinearRing read correctly from coord', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/linearring-coord.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.geometry.type).to.eql('linearring');
|
||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4], [5, 6],
|
||||
[1, 2]]);
|
||||
});
|
||||
});
|
||||
it('LinearRing read / written correctly from coordinates', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/linearring-coordinates.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
parser.srsName = 'foo';
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
delete parser.srsName;
|
||||
expect(obj.geometry.type).to.eql('linearring');
|
||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4], [5, 6],
|
||||
[1, 2]]);
|
||||
});
|
||||
});
|
||||
it('FeatureCollection read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/topp-states.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var srsName = 'http://www.opengis.net/gml/srs/epsg.xml#4326';
|
||||
var schemaLoc = 'http://www.openplans.org/topp ' +
|
||||
'http://demo.opengeo.org/geoserver/wfs?service=WFS&version=' +
|
||||
'1.0.0&request=DescribeFeatureType&typeName=topp:states ' +
|
||||
'http://www.opengis.net/wfs http://demo.opengeo.org/' +
|
||||
'geoserver/schemas/wfs/1.0.0/WFS-basic.xsd';
|
||||
var p = new ol.parser.ogc.GML_v2({srsName: srsName,
|
||||
featureType: 'states',
|
||||
featureNS: 'http://www.openplans.org/topp',
|
||||
schemaLocation: schemaLoc});
|
||||
var obj = p.read(xml);
|
||||
var output = p.write(obj);
|
||||
expect(goog.dom.xml.loadXml(output)).to.xmleql(xml);
|
||||
expect(obj.features.length).to.eql(3);
|
||||
var feature = obj.features[0];
|
||||
expect(feature.getGeometry() instanceof
|
||||
ol.geom.MultiPolygon).to.be.ok();
|
||||
var attributes = feature.getAttributes();
|
||||
// TODO test for fid
|
||||
expect(attributes['STATE_NAME']).to.eql('Illinois');
|
||||
expect(attributes['STATE_FIPS']).to.eql('17');
|
||||
expect(attributes['SUB_REGION']).to.eql('E N Cen');
|
||||
expect(attributes['STATE_ABBR']).to.eql('IL');
|
||||
expect(attributes['LAND_KM']).to.eql('143986.61');
|
||||
});
|
||||
});
|
||||
it('Auto configure works correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/topp-states.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var p = new ol.parser.ogc.GML_v2();
|
||||
var obj = p.read(xml);
|
||||
expect(obj.features.length).to.eql(3);
|
||||
expect(obj.features[0].getGeometry() instanceof
|
||||
ol.geom.MultiPolygon).to.be.ok();
|
||||
expect(p.featureType).to.eql('states');
|
||||
expect(p.featureNS).to.eql('http://www.openplans.org/topp');
|
||||
});
|
||||
});
|
||||
it('Test multiple typeNames', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/multipletypenames.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
// we should not go through autoConfig so specify featureNS
|
||||
var p = new ol.parser.ogc.GML_v2({
|
||||
featureNS: 'http://mapserver.gis.umn.edu/mapserver',
|
||||
featureType: ['LKUNSTWERK', 'PKUNSTWERK', 'VKUNSTWERK']});
|
||||
var obj = p.read(xml);
|
||||
var features = obj.features;
|
||||
expect(features.length).to.eql(3);
|
||||
expect(features[0].getGeometry() instanceof
|
||||
ol.geom.MultiPolygon).to.be.ok();
|
||||
expect(features[1].getGeometry() instanceof
|
||||
ol.geom.MultiLineString).to.be.ok();
|
||||
expect(features[2].getGeometry() instanceof
|
||||
ol.geom.MultiPoint).to.be.ok();
|
||||
});
|
||||
});
|
||||
it('Test no geometry', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/nogeom.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.features.length).to.eql(2);
|
||||
var feature = obj.features[0];
|
||||
expect(feature.getGeometry() === null).to.be.ok();
|
||||
// TODO test bounds on feature
|
||||
// see https://github.com/openlayers/ol3/issues/566
|
||||
});
|
||||
});
|
||||
it('Test boundedBy', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v2/boundedBy.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
// TODO test bounds on feature
|
||||
// see https://github.com/openlayers/ol3/issues/566
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
goog.require('goog.dom.xml');
|
||||
|
||||
goog.require('ol.parser.ogc.GML_v2');
|
||||
goog.require('ol.geom.MultiLineString');
|
||||
goog.require('ol.geom.MultiPoint');
|
||||
goog.require('ol.geom.MultiPolygon');
|
||||
@@ -0,0 +1,347 @@
|
||||
goog.provide('ol.test.parser.gml_v3');
|
||||
|
||||
describe('ol.parser.gml_v3', function() {
|
||||
|
||||
var parser = new ol.parser.ogc.GML_v3();
|
||||
|
||||
describe('Test GML v3 parser', function() {
|
||||
it('Envelope read correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/envelope.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.bounds).to.eql([1, 3, 2, 4]);
|
||||
});
|
||||
});
|
||||
it('LinearRing read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/linearring.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
parser.srsName = 'foo';
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
delete parser.srsName;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
expect(obj.geometry.type).to.eql('linearring');
|
||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4], [5, 6],
|
||||
[1, 2]]);
|
||||
});
|
||||
});
|
||||
it('Linestring read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/linestring.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
parser.srsName = 'foo';
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
delete parser.srsName;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
expect(obj.geometry.type).to.eql('linestring');
|
||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4]]);
|
||||
});
|
||||
});
|
||||
it('Linestring 3D read correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/linestring3d.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
// no write test since simple features only does 2D
|
||||
expect(obj.geometry.type).to.eql('linestring');
|
||||
expect(obj.geometry.coordinates).to.eql([[1, 2, 3], [4, 5, 6]]);
|
||||
});
|
||||
});
|
||||
it('Curve read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/curve.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var p = new ol.parser.ogc.GML_v3({curve: true, srsName: 'foo'});
|
||||
var obj = p.read(xml);
|
||||
var geom = p.createGeometry_({geometry: obj.geometry});
|
||||
var node = p.featureNSWiters_['_geometry'].apply(p,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||
expect(obj.geometry.type).to.eql('linestring');
|
||||
expect(obj.geometry.coordinates).to.eql([[1, 2], [3, 4]]);
|
||||
});
|
||||
});
|
||||
it('MultiLineString plural read correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multilinestring-plural.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
// no write test for plural, we only write singular
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.geometry.type).to.eql('multilinestring');
|
||||
expect(obj.geometry.parts.length).to.eql(2);
|
||||
expect(obj.geometry.parts[0].type).to.eql('linestring');
|
||||
});
|
||||
});
|
||||
it('MultiLineString singular read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multilinestring-singular.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var p = new ol.parser.ogc.GML_v3({multiCurve: false, srsName: 'foo'});
|
||||
var obj = p.read(xml);
|
||||
var geom = p.createGeometry_({geometry: obj.geometry});
|
||||
var node = p.featureNSWiters_['_geometry'].apply(p,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||
expect(obj.geometry.type).to.eql('multilinestring');
|
||||
expect(obj.geometry.parts.length).to.eql(2);
|
||||
expect(obj.geometry.parts[0].type).to.eql('linestring');
|
||||
});
|
||||
});
|
||||
it('MultiCurve singular read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multicurve-singular.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
parser.srsName = 'foo';
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
delete parser.srsName;
|
||||
expect(obj.geometry.type).to.eql('multilinestring');
|
||||
expect(obj.geometry.parts.length).to.eql(2);
|
||||
expect(obj.geometry.parts[0].type).to.eql('linestring');
|
||||
expect(obj.geometry.parts[0].coordinates).to.eql([[1, 2], [2, 3]]);
|
||||
});
|
||||
});
|
||||
it('MultiCurve curve read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multicurve-curve.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var p = new ol.parser.ogc.GML_v3({curve: true, srsName: 'foo'});
|
||||
var obj = p.read(xml);
|
||||
var geom = p.createGeometry_({geometry: obj.geometry});
|
||||
var node = p.featureNSWiters_['_geometry'].apply(p,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||
expect(obj.geometry.type).to.eql('multilinestring');
|
||||
expect(obj.geometry.parts.length).to.eql(2);
|
||||
expect(obj.geometry.parts[0].type).to.eql('linestring');
|
||||
expect(obj.geometry.parts[0].coordinates).to.eql([[1, 2], [2, 3]]);
|
||||
});
|
||||
});
|
||||
it('MultiPoint plural read correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multipoint-plural.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.geometry.type).to.eql('multipoint');
|
||||
expect(obj.geometry.parts.length).to.eql(3);
|
||||
expect(obj.geometry.parts[0].type).to.eql('point');
|
||||
expect(obj.geometry.parts[0].coordinates).to.eql([1, 2]);
|
||||
});
|
||||
});
|
||||
it('MultiPoint singular read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multipoint-singular.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
parser.srsName = 'foo';
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
delete parser.srsName;
|
||||
expect(obj.geometry.type).to.eql('multipoint');
|
||||
expect(obj.geometry.parts.length).to.eql(3);
|
||||
expect(obj.geometry.parts[0].type).to.eql('point');
|
||||
expect(obj.geometry.parts[0].coordinates).to.eql([1, 2]);
|
||||
});
|
||||
});
|
||||
it('MultiPolygon plural read correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multipolygon-plural.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.geometry.type).to.eql('multipolygon');
|
||||
expect(obj.geometry.parts.length).to.eql(2);
|
||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
||||
});
|
||||
});
|
||||
it('MultiPolygon singular read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multipolygon-singular.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var p = new ol.parser.ogc.GML_v3({multiSurface: false, srsName: 'foo'});
|
||||
var obj = p.read(xml);
|
||||
var geom = p.createGeometry_({geometry: obj.geometry});
|
||||
var node = p.featureNSWiters_['_geometry'].apply(p,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||
expect(obj.geometry.type).to.eql('multipolygon');
|
||||
expect(obj.geometry.parts.length).to.eql(2);
|
||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
||||
});
|
||||
});
|
||||
it('MultiSurface plural read correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multisurface-plural.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.geometry.type).to.eql('multipolygon');
|
||||
expect(obj.geometry.parts.length).to.eql(2);
|
||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
||||
});
|
||||
});
|
||||
it('MultiSurface singular read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multisurface-singular.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
parser.srsName = 'foo';
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
delete parser.srsName;
|
||||
expect(obj.geometry.type).to.eql('multipolygon');
|
||||
expect(obj.geometry.parts.length).to.eql(2);
|
||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
||||
});
|
||||
});
|
||||
it('MultiSurface surface read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/multisurface-surface.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var p = new ol.parser.ogc.GML_v3({surface: true, srsName: 'foo'});
|
||||
var obj = p.read(xml);
|
||||
var geom = p.createGeometry_({geometry: obj.geometry});
|
||||
var node = p.featureNSWiters_['_geometry'].apply(p,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||
expect(obj.geometry.type).to.eql('multipolygon');
|
||||
expect(obj.geometry.parts.length).to.eql(2);
|
||||
expect(obj.geometry.parts[0].type).to.eql('polygon');
|
||||
});
|
||||
});
|
||||
it('Point read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/point.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
parser.srsName = 'foo';
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
delete parser.srsName;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
expect(obj.geometry.type).to.eql('point');
|
||||
expect(obj.geometry.coordinates).to.eql([1, 2]);
|
||||
});
|
||||
});
|
||||
it('Polygon read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/polygon.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
var geom = parser.createGeometry_({geometry: obj.geometry});
|
||||
parser.srsName = 'foo';
|
||||
var node = parser.featureNSWiters_['_geometry'].apply(parser,
|
||||
[geom]).firstChild;
|
||||
delete parser.srsName;
|
||||
expect(goog.dom.xml.loadXml(parser.serialize(node))).to.xmleql(xml);
|
||||
expect(obj.geometry.type).to.eql('polygon');
|
||||
expect(obj.geometry.coordinates.length).to.eql(3);
|
||||
expect(obj.geometry.coordinates[0].length).to.eql(4);
|
||||
expect(obj.geometry.coordinates[0]).to.eql([[1, 2], [3, 4],
|
||||
[5, 6], [1, 2]]);
|
||||
expect(obj.geometry.coordinates[1]).to.eql([[2, 3], [4, 5],
|
||||
[6, 7], [2, 3]]);
|
||||
expect(obj.geometry.coordinates[2]).to.eql([[3, 4], [5, 6],
|
||||
[7, 8], [3, 4]]);
|
||||
});
|
||||
});
|
||||
it('Surface read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/surface.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var p = new ol.parser.ogc.GML_v3({surface: true, srsName: 'foo'});
|
||||
var obj = p.read(xml);
|
||||
var geom = p.createGeometry_({geometry: obj.geometry});
|
||||
var node = p.featureNSWiters_['_geometry'].apply(p,
|
||||
[geom]).firstChild;
|
||||
expect(goog.dom.xml.loadXml(p.serialize(node))).to.xmleql(xml);
|
||||
expect(obj.geometry.type).to.eql('polygon');
|
||||
expect(obj.geometry.coordinates.length).to.eql(3);
|
||||
expect(obj.geometry.coordinates[0].length).to.eql(4);
|
||||
expect(obj.geometry.coordinates[0]).to.eql([[1, 2], [3, 4],
|
||||
[5, 6], [1, 2]]);
|
||||
expect(obj.geometry.coordinates[1]).to.eql([[2, 3], [4, 5],
|
||||
[6, 7], [2, 3]]);
|
||||
expect(obj.geometry.coordinates[2]).to.eql([[3, 4], [5, 6],
|
||||
[7, 8], [3, 4]]);
|
||||
});
|
||||
});
|
||||
it('FeatureCollection from GML read / written correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/topp-states-gml.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var srsName = 'urn:x-ogc:def:crs:EPSG:4326';
|
||||
var schemaLoc = 'http://www.openplans.org/topp ' +
|
||||
'http://demo.opengeo.org/geoserver/wfs?service=WFS&version=' +
|
||||
'1.1.0&request=DescribeFeatureType&typeName=topp:states ' +
|
||||
'http://www.opengis.net/gml ' +
|
||||
'http://schemas.opengis.net/gml/3.2.1/gml.xsd';
|
||||
var p = new ol.parser.ogc.GML_v3({srsName: srsName,
|
||||
schemaLocation: schemaLoc});
|
||||
var obj = p.read(xml);
|
||||
var output = p.write(obj);
|
||||
expect(goog.dom.xml.loadXml(output)).to.xmleql(xml);
|
||||
expect(p.geometryName).to.eql('the_geom');
|
||||
expect(obj.features.length).to.eql(10);
|
||||
var feature = obj.features[0];
|
||||
expect(feature.getGeometry() instanceof
|
||||
ol.geom.MultiPolygon).to.be.ok();
|
||||
var attributes = feature.getAttributes();
|
||||
// TODO test for fid
|
||||
expect(attributes['STATE_NAME']).to.eql('Illinois');
|
||||
expect(attributes['STATE_FIPS']).to.eql('17');
|
||||
expect(attributes['SUB_REGION']).to.eql('E N Cen');
|
||||
expect(attributes['STATE_ABBR']).to.eql('IL');
|
||||
expect(attributes['LAND_KM']).to.eql('143986.61');
|
||||
});
|
||||
});
|
||||
it('FeatureCollection from WFS read correctly', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/topp-states-wfs.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.features.length).to.eql(3);
|
||||
var feature = obj.features[0];
|
||||
expect(feature.getGeometry() instanceof
|
||||
ol.geom.MultiPolygon).to.be.ok();
|
||||
var attributes = feature.getAttributes();
|
||||
// TODO test for fid
|
||||
expect(attributes['STATE_NAME']).to.eql('Illinois');
|
||||
expect(attributes['STATE_FIPS']).to.eql('17');
|
||||
expect(attributes['SUB_REGION']).to.eql('E N Cen');
|
||||
expect(attributes['STATE_ABBR']).to.eql('IL');
|
||||
expect(attributes['LAND_KM']).to.eql('143986.61');
|
||||
});
|
||||
});
|
||||
it('Read autoConfig', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/topp-states-wfs.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
var features = obj.features;
|
||||
expect(parser.featureType).to.eql('states');
|
||||
expect(parser.featureNS).to.eql('http://www.openplans.org/topp');
|
||||
expect(parser.autoConfig === true).to.be.ok();
|
||||
parser.autoConfig = false;
|
||||
parser.read(xml);
|
||||
expect(parser.autoConfig === false).to.be.ok();
|
||||
parser.autoConfig = true;
|
||||
});
|
||||
});
|
||||
it('Empty attribute', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/empty-attribute.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.features.length).to.eql(1);
|
||||
var attr = obj.features[0].getAttributes();
|
||||
expect(attr['name']).to.eql('Aflu');
|
||||
expect(attr['foo']).to.eql(undefined);
|
||||
expect(attr['empty']).to.eql('');
|
||||
});
|
||||
});
|
||||
it('Repeated name', function() {
|
||||
var url = 'spec/ol/parser/ogc/xml/gml_v3/repeated-name.xml';
|
||||
afterLoadXml(url, function(xml) {
|
||||
var obj = parser.read(xml);
|
||||
expect(obj.features.length).to.eql(1);
|
||||
var atts = obj.features[0].getAttributes();
|
||||
expect(atts['zoning']).to.eql('I-L');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
goog.require('goog.dom.xml');
|
||||
goog.require('ol.geom.MultiPolygon');
|
||||
goog.require('ol.parser.ogc.GML_v3');
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:topp="http://www.openplans.org/topp" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openplans.org/topp http://publicus.opengeo.org:80/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=topp:states http://www.opengis.net/wfs http://publicus.opengeo.org:80/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd"><gml:featureMember><topp:states fid="states.1"><gml:boundedBy><gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#4326"><gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">36.9861,-91.5161 42.5091,-87.5071</gml:coordinates></gml:Box></gml:boundedBy><topp:the_geom><gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#4326"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">37.5101,-88.0711 37.4761,-88.0871 37.4421,-88.3111 37.4091,-88.3591 37.4201,-88.4191 37.4001,-88.4671 37.2961,-88.5111 37.2571,-88.5011 37.2051,-88.4501 37.1561,-88.4221 37.0981,-88.4501 37.0721,-88.4761 37.0681,-88.4901 37.0641,-88.5171 37.0721,-88.5591 37.1091,-88.6141 37.1351,-88.6881 37.1411,-88.7391 37.1521,-88.7461 37.2021,-88.8631 37.2181,-88.9321 37.2201,-88.9931 37.1851,-89.0651 37.1121,-89.1161 37.0931,-89.1461 37.0641,-89.1691 37.0251,-89.1741 36.9981,-89.1501 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 37.0271,-89.2641 37.0081,-89.2621 36.9991,-89.2821 37.0091,-89.3101 37.0491,-89.3821 37.0991,-89.3791 37.1371,-89.4231 37.1651,-89.4401 37.2241,-89.4681 37.2531,-89.4651 37.2561,-89.4891 37.2761,-89.5131 37.3041,-89.5131 37.3291,-89.5001 37.3391,-89.4681 37.3551,-89.4351 37.4111,-89.4271 37.4531,-89.4531 37.4911,-89.4941 37.5711,-89.5241 37.6151,-89.5131 37.6501,-89.5191 37.6791,-89.5131 37.6941,-89.5211 37.7061,-89.5811 37.7451,-89.6661 37.7831,-89.6751 37.8041,-89.6911 37.8401,-89.7281 37.9051,-89.8511 37.9051,-89.8611 37.8911,-89.8661 37.8751,-89.9001 37.8781,-89.9371 37.9111,-89.9781 37.9631,-89.9581 37.9691,-90.0101 37.9931,-90.0411 38.0321,-90.1191 38.0531,-90.1341 38.0881,-90.2071 38.1221,-90.2541 38.1661,-90.2891 38.1881,-90.3361 38.2341,-90.3641 38.3231,-90.3691 38.3651,-90.3581 38.3901,-90.3391 38.4271,-90.3011 38.5181,-90.2651 38.5321,-90.2611 38.5621,-90.2401 38.6101,-90.1831 38.6581,-90.1831 38.7001,-90.2021 38.7231,-90.1961 38.7731,-90.1631 38.7851,-90.1351 38.8001,-90.1211 38.8301,-90.1131 38.8531,-90.1321 38.9141,-90.2431 38.9241,-90.2781 38.9241,-90.3191 38.9621,-90.4131 38.9591,-90.4691 38.8911,-90.5301 38.8711,-90.5701 38.8801,-90.6271 38.9351,-90.6681 39.0371,-90.7061 39.0581,-90.7071 39.0931,-90.6901 39.1441,-90.7161 39.1951,-90.7181 39.2241,-90.7321 39.2471,-90.7381 39.2961,-90.7791 39.3501,-90.8501 39.4001,-90.9471 39.4441,-91.0361 39.4731,-91.0641 39.5281,-91.0931 39.5521,-91.1561 39.6001,-91.2031 39.6851,-91.3171 39.7241,-91.3671 39.7611,-91.3731 39.8031,-91.3811 39.8631,-91.4491 39.8851,-91.4501 39.9011,-91.4341 39.9211,-91.4301 39.9461,-91.4471 40.0051,-91.4871 40.0661,-91.5041 40.1341,-91.5161 40.2001,-91.5061 40.2511,-91.4981 40.3091,-91.4861 40.3711,-91.4481 40.3861,-91.4181 40.3921,-91.3851 40.4021,-91.3721 40.4471,-91.3851 40.5031,-91.3741 40.5281,-91.3821 40.5471,-91.4121 40.5721,-91.4111 40.6031,-91.3751 40.6391,-91.2621 40.6431,-91.2141 40.6561,-91.1621 40.6821,-91.1291 40.7051,-91.1191 40.7611,-91.0921 40.8331,-91.0881 40.8791,-91.0491 40.9231,-90.9831 40.9501,-90.9601 41.0701,-90.9541 41.1041,-90.9571 41.1441,-90.9901 41.1651,-91.0181 41.1761,-91.0561 41.2311,-91.1011 41.2671,-91.1021 41.3341,-91.0731 41.4011,-91.0551 41.4231,-91.0271 41.4311,-91.0001 41.4211,-90.9491 41.4441,-90.8441 41.4491,-90.7791 41.4501,-90.7081 41.4621,-90.6581 41.5091,-90.6001 41.5251,-90.5401 41.5271,-90.4541 41.5431,-90.4341 41.5671,-90.4231 41.5861,-90.3481 41.6021,-90.3391 41.6491,-90.3411 41.7221,-90.3261 41.7561,-90.3041 41.7811,-90.2551 41.8061,-90.1951 41.9301,-90.1541 41.9831,-90.1421 42.0331,-90.1501 42.0611,-90.1681 42.1031,-90.1661 42.1201,-90.1761 42.1221,-90.1911 42.1591,-90.2301 42.1971,-90.3231 42.2101,-90.3671 42.2421,-90.4071 42.2631,-90.4171 42.3401,-90.4271 42.3601,-90.4411 42.3881,-90.4911 42.4211,-90.5631 42.4601,-90.6051 42.4751,-90.6481 42.4941,-90.6511 42.5091,-90.6381 42.5081,-90.4191 42.5041,-89.9231 42.5031,-89.8341 42.4971,-89.4001 42.4971,-89.3591 42.4901,-88.9391 42.4901,-88.7641 42.4891,-88.7061 42.4911,-88.2971 42.4891,-88.1941 42.4891,-87.7971 42.3141,-87.8361 42.1561,-87.7601 42.0591,-87.6701 41.8471,-87.6121 41.7231,-87.5291 41.4691,-87.5321 41.3011,-87.5321 41.1731,-87.5311 41.0091,-87.5321 40.7451,-87.5321 40.4941,-87.5371 40.4831,-87.5351 40.1661,-87.5351 39.8871,-87.5351 39.6091,-87.5351 39.4771,-87Line truncated
|
||||
@@ -0,0 +1,10 @@
|
||||
<gml:Box xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:coord>
|
||||
<gml:X>1</gml:X>
|
||||
<gml:Y>2</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>3</gml:X>
|
||||
<gml:Y>4</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:Box>
|
||||
@@ -0,0 +1,3 @@
|
||||
<gml:Box xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:coordinates decimal="." cs="," ts=" ">1,2 3,4</gml:coordinates>
|
||||
</gml:Box>
|
||||
@@ -0,0 +1,31 @@
|
||||
<gml:GeometryCollection xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:geometryMember>
|
||||
<gml:Point srsName="foo">
|
||||
<gml:coordinates decimal="." cs="," ts=" ">1,2</gml:coordinates>
|
||||
</gml:Point>
|
||||
</gml:geometryMember>
|
||||
<gml:geometryMember>
|
||||
<gml:LineString srsName="foo">
|
||||
<gml:coordinates decimal="." cs="," ts=" ">1,2 3,4</gml:coordinates>
|
||||
</gml:LineString>
|
||||
</gml:geometryMember>
|
||||
<gml:geometryMember>
|
||||
<gml:Polygon srsName="foo">
|
||||
<gml:outerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">1,2 3,4 5,6 1,2</gml:coordinates>
|
||||
</gml:LinearRing>
|
||||
</gml:outerBoundaryIs>
|
||||
<gml:innerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">2,3 4,5 6,7 2,3</gml:coordinates>
|
||||
</gml:LinearRing>
|
||||
</gml:innerBoundaryIs>
|
||||
<gml:innerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">3,4 5,6 7,8 3,4</gml:coordinates>
|
||||
</gml:LinearRing>
|
||||
</gml:innerBoundaryIs>
|
||||
</gml:Polygon>
|
||||
</gml:geometryMember>
|
||||
</gml:GeometryCollection>
|
||||
@@ -0,0 +1,18 @@
|
||||
<gml:LinearRing xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:coord>
|
||||
<gml:X>1</gml:X>
|
||||
<gml:Y>2</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>3</gml:X>
|
||||
<gml:Y>4</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>5</gml:X>
|
||||
<gml:Y>6</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>1</gml:X>
|
||||
<gml:Y>2</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:LinearRing>
|
||||
@@ -0,0 +1,3 @@
|
||||
<gml:LinearRing xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:coordinates decimal="." cs="," ts=" ">1,2 3,4 5,6 1,2</gml:coordinates>
|
||||
</gml:LinearRing>
|
||||
@@ -0,0 +1,10 @@
|
||||
<gml:LineString xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:coord>
|
||||
<gml:X>1</gml:X>
|
||||
<gml:Y>2</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>3</gml:X>
|
||||
<gml:Y>4</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:LineString>
|
||||
@@ -0,0 +1,3 @@
|
||||
<gml:LineString xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:coordinates decimal="." cs="," ts=" ">1,2 3,4</gml:coordinates>
|
||||
</gml:LineString>
|
||||
@@ -0,0 +1,26 @@
|
||||
<gml:MultiLineString xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:lineStringMember>
|
||||
<gml:LineString>
|
||||
<gml:coord>
|
||||
<gml:X>1</gml:X>
|
||||
<gml:Y>2</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>2</gml:X>
|
||||
<gml:Y>3</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:LineString>
|
||||
</gml:lineStringMember>
|
||||
<gml:lineStringMember>
|
||||
<gml:LineString>
|
||||
<gml:coord>
|
||||
<gml:X>3</gml:X>
|
||||
<gml:Y>4</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>4</gml:X>
|
||||
<gml:Y>5</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:LineString>
|
||||
</gml:lineStringMember>
|
||||
</gml:MultiLineString>
|
||||
@@ -0,0 +1,12 @@
|
||||
<gml:MultiLineString xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:lineStringMember>
|
||||
<gml:LineString>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">1,2 2,3</gml:coordinates>
|
||||
</gml:LineString>
|
||||
</gml:lineStringMember>
|
||||
<gml:lineStringMember>
|
||||
<gml:LineString>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">3,4 4,5</gml:coordinates>
|
||||
</gml:LineString>
|
||||
</gml:lineStringMember>
|
||||
</gml:MultiLineString>
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version='1.0' encoding="ISO-8859-1" ?><wfs:FeatureCollection xmlns:rws="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://intranet.rijkswaterstaat.nl/services/geoservices/kerngisnat_utre?SERVICE=WFS&VERSION=1.0.0&REQUEST=DescribeFeatureType&TYPENAME=VKUNSTWERK,LKUNSTWERK,PKUNSTWERK&OUTPUTFORMAT=XMLSCHEMA"> <gml:boundedBy> <gml:Box srsName="EPSG:28992"> <gml:coordinates>134503.789000,455332.337000 135149.909000,455893.926000</gml:coordinates> </gml:Box> </gml:boundedBy> <gml:featureMember> <rws:VKUNSTWERK fid="VKUNSTWERK.16"> <gml:boundedBy> <gml:Box srsName="EPSG:28992"> <gml:coordinates>134949.571000,455438.845000 134978.799000,455471.762000</gml:coordinates> </gml:Box> </gml:boundedBy> <rws:geometry> <gml:MultiPolygon srsName="EPSG:28992"> <gml:polygonMember> <gml:Polygon> <gml:outerBoundaryIs> <gml:LinearRing> <gml:coordinates>134974.191000,455471.587000 134973.974000,455471.762000 134973.558000,455471.248000 134973.579000,455471.230000 134963.143000,455458.768000 134962.787000,455458.653000 134960.514000,455456.003000 134960.440000,455455.539000 134950.207000,455443.320000 134950.158000,455443.360000 134949.571000,455442.638000 134949.810000,455442.462000 134951.417000,455441.223000 134951.435000,455441.209000 134954.158000,455439.108000 134954.507000,455438.845000 134955.000000,455439.420000 134954.954000,455439.458000 134965.046000,455451.520000 134965.568000,455451.606000 134968.159000,455454.642000 134968.120000,455455.195000 134978.294000,455467.355000 134978.330000,455467.326000 134978.799000,455467.881000 134978.598000,455468.042000 134975.885000,455470.224000 134974.191000,455471.587000 </gml:coordinates> </gml:LinearRing> </gml:outerBoundaryIs> <gml:innerBoundaryIs> <gml:LinearRing> <gml:coordinates>134960.590000,455455.163000 134963.589000,455458.755000 134973.756000,455470.929000 134973.836000,455471.019000 134974.216000,455471.445000 134975.807000,455470.163000 134978.485000,455468.005000 134978.077000,455467.534000 134978.015000,455467.462000 134967.969000,455455.479000 134964.782000,455451.678000 134954.705000,455439.660000 134954.622000,455439.561000 134954.271000,455439.152000 134951.498000,455441.284000 134949.973000,455442.456000 134950.452000,455443.023000 134950.501000,455443.081000 134960.590000,455455.163000 </gml:coordinates> </gml:LinearRing> </gml:innerBoundaryIs> </gml:Polygon> </gml:polygonMember> </gml:MultiPolygon> </rws:geometry> <rws:OBJECTID>16</rws:OBJECTID> <rws:OBJECTSUBCATEGORIE>31</rws:OBJECTSUBCATEGORIE> </rws:VKUNSTWERK> </gml:featureMember> <gml:featureMember> <rws:LKUNSTWERK fid="LKUNSTWERK.14"> <gml:boundedBy> <gml:Box srsName="EPSG:28992"> <gml:coordinates>135080.966000,455332.337000 135149.909000,455390.384000</gml:coordinates> </gml:Box> </gml:boundedBy> <rws:geometry> <gml:MultiLineString srsName="EPSG:28992"> <gml:lineStringMember> <gml:LineString> <gml:coordinates>135080.966000,455390.384000 135096.654000,455377.009000 135109.082000,455366.755000 135122.769000,455355.276000 135141.565000,455339.633000 135149.909000,455332.337000 </gml:coordinates> </gml:LineString> </gml:lineStringMember> </gml:MultiLineString> </rws:geometry> <rws:OBJECTID>14</rws:OBJECTID> <rws:OBJECTSUBCATEGORIE>30</rws:OBJECTSUBCATEGORIE> </rws:LKUNSTWERK> </gml:featureMember> <gml:featureMember> <rws:PKUNSTWERK fid="PKUNSTWERK.29"> <gml:boundedBy> <gml:Box srsName="EPSG:28992"> <gml:coordinates>134832.017000,455596.187000 134832.017000,455596.187000</gml:coordinates> </gml:Box> </gml:boundedBy> <rws:geometry> <gml:MultiPoint srsName="EPSG:28992"> <gml:pointMember> <gml:Point> <gml:coordinates>134832.017000,455596.187000</gml:coordinates> </gml:Point> </gml:pointMember> </gml:MultiPoint> </rws:geometry> <rws:OBJECTID>29</rws:OBJECTID> <rws:OBJECTSUBCATEGORIE>30</rws:OBJECTSUBCATEGORIE> </rws:PKUNSTWERK> </gml:featureMember></wfs:FeatureCollection>
|
||||
@@ -0,0 +1,26 @@
|
||||
<gml:MultiPoint xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:pointMember>
|
||||
<gml:Point>
|
||||
<gml:coord>
|
||||
<gml:X>1</gml:X>
|
||||
<gml:Y>2</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:Point>
|
||||
</gml:pointMember>
|
||||
<gml:pointMember>
|
||||
<gml:Point>
|
||||
<gml:coord>
|
||||
<gml:X>2</gml:X>
|
||||
<gml:Y>3</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:Point>
|
||||
</gml:pointMember>
|
||||
<gml:pointMember>
|
||||
<gml:Point>
|
||||
<gml:coord>
|
||||
<gml:X>3</gml:X>
|
||||
<gml:Y>4</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:Point>
|
||||
</gml:pointMember>
|
||||
</gml:MultiPoint>
|
||||
@@ -0,0 +1,17 @@
|
||||
<gml:MultiPoint xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:pointMember>
|
||||
<gml:Point>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">1,2</gml:coordinates>
|
||||
</gml:Point>
|
||||
</gml:pointMember>
|
||||
<gml:pointMember>
|
||||
<gml:Point>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">2,3</gml:coordinates>
|
||||
</gml:Point>
|
||||
</gml:pointMember>
|
||||
<gml:pointMember>
|
||||
<gml:Point>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">3,4</gml:coordinates>
|
||||
</gml:Point>
|
||||
</gml:pointMember>
|
||||
</gml:MultiPoint>
|
||||
@@ -0,0 +1,90 @@
|
||||
<gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:polygonMember>
|
||||
<gml:Polygon>
|
||||
<gml:outerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coord>
|
||||
<gml:X>1</gml:X>
|
||||
<gml:Y>2</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>3</gml:X>
|
||||
<gml:Y>4</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>5</gml:X>
|
||||
<gml:Y>6</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>1</gml:X>
|
||||
<gml:Y>2</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:LinearRing>
|
||||
</gml:outerBoundaryIs>
|
||||
<gml:innerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coord>
|
||||
<gml:X>2</gml:X>
|
||||
<gml:Y>3</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>4</gml:X>
|
||||
<gml:Y>5</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>6</gml:X>
|
||||
<gml:Y>7</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>2</gml:X>
|
||||
<gml:Y>3</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:LinearRing>
|
||||
</gml:innerBoundaryIs>
|
||||
<gml:innerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coord>
|
||||
<gml:X>3</gml:X>
|
||||
<gml:Y>4</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>5</gml:X>
|
||||
<gml:Y>6</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>7</gml:X>
|
||||
<gml:Y>8</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>3</gml:X>
|
||||
<gml:Y>4</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:LinearRing>
|
||||
</gml:innerBoundaryIs>
|
||||
</gml:Polygon>
|
||||
</gml:polygonMember>
|
||||
<gml:polygonMember>
|
||||
<gml:Polygon>
|
||||
<gml:outerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coord>
|
||||
<gml:X>1</gml:X>
|
||||
<gml:Y>2</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>3</gml:X>
|
||||
<gml:Y>4</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>5</gml:X>
|
||||
<gml:Y>6</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>1</gml:X>
|
||||
<gml:Y>2</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:LinearRing>
|
||||
</gml:outerBoundaryIs>
|
||||
</gml:Polygon>
|
||||
</gml:polygonMember>
|
||||
</gml:MultiPolygon>
|
||||
@@ -0,0 +1,30 @@
|
||||
<gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:polygonMember>
|
||||
<gml:Polygon>
|
||||
<gml:outerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">1,2 3,4 5,6 1,2</gml:coordinates>
|
||||
</gml:LinearRing>
|
||||
</gml:outerBoundaryIs>
|
||||
<gml:innerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">2,3 4,5 6,7 2,3</gml:coordinates>
|
||||
</gml:LinearRing>
|
||||
</gml:innerBoundaryIs>
|
||||
<gml:innerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">3,4 5,6 7,8 3,4</gml:coordinates>
|
||||
</gml:LinearRing>
|
||||
</gml:innerBoundaryIs>
|
||||
</gml:Polygon>
|
||||
</gml:polygonMember>
|
||||
<gml:polygonMember>
|
||||
<gml:Polygon>
|
||||
<gml:outerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">1,2 3,4 5,6 1,2</gml:coordinates>
|
||||
</gml:LinearRing>
|
||||
</gml:outerBoundaryIs>
|
||||
</gml:Polygon>
|
||||
</gml:polygonMember>
|
||||
</gml:MultiPolygon>
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:loc="http://server.fr/geoserver/loc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://server.fr:80/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd http://server.fr/geoserver/loc http://server.fr:80/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=loc:DEPARTEMENT"><gml:boundedBy><gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#2154"><gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">199373,6704170 337568,6885985</gml:coordinates></gml:Box></gml:boundedBy><gml:featureMember><loc:DEPARTEMENT fid="DEPARTEMENT.1"><gml:boundedBy><gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#2154"><gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">209565,6785323 337568,6885985</gml:coordinates></gml:Box></gml:boundedBy><loc:NOM_DEPT>COTES-D'ARMOR</loc:NOM_DEPT></loc:DEPARTEMENT></gml:featureMember><gml:featureMember><loc:DEPARTEMENT fid="DEPARTEMENT.3"><gml:boundedBy><gml:Box srsName="http://www.opengis.net/gml/srs/epsg.xml#2154"><gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">199373,6704170 323518,6807542</gml:coordinates></gml:Box></gml:boundedBy><loc:NOM_DEPT>MORBIHAN</loc:NOM_DEPT></loc:DEPARTEMENT></gml:featureMember></wfs:FeatureCollection>
|
||||
@@ -0,0 +1,6 @@
|
||||
<gml:Point xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:coord>
|
||||
<gml:X>1</gml:X>
|
||||
<gml:Y>2</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:Point>
|
||||
@@ -0,0 +1,3 @@
|
||||
<gml:Point xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:coordinates decimal="." cs="," ts=" ">1,2</gml:coordinates>
|
||||
</gml:Point>
|
||||
@@ -0,0 +1,62 @@
|
||||
<gml:Polygon xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:outerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coord>
|
||||
<gml:X>1</gml:X>
|
||||
<gml:Y>2</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>3</gml:X>
|
||||
<gml:Y>4</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>5</gml:X>
|
||||
<gml:Y>6</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>1</gml:X>
|
||||
<gml:Y>2</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:LinearRing>
|
||||
</gml:outerBoundaryIs>
|
||||
<gml:innerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coord>
|
||||
<gml:X>2</gml:X>
|
||||
<gml:Y>3</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>4</gml:X>
|
||||
<gml:Y>5</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>6</gml:X>
|
||||
<gml:Y>7</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>2</gml:X>
|
||||
<gml:Y>3</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:LinearRing>
|
||||
</gml:innerBoundaryIs>
|
||||
<gml:innerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coord>
|
||||
<gml:X>3</gml:X>
|
||||
<gml:Y>4</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>5</gml:X>
|
||||
<gml:Y>6</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>7</gml:X>
|
||||
<gml:Y>8</gml:Y>
|
||||
</gml:coord>
|
||||
<gml:coord>
|
||||
<gml:X>3</gml:X>
|
||||
<gml:Y>4</gml:Y>
|
||||
</gml:coord>
|
||||
</gml:LinearRing>
|
||||
</gml:innerBoundaryIs>
|
||||
</gml:Polygon>
|
||||
@@ -0,0 +1,17 @@
|
||||
<gml:Polygon xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:outerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">1,2 3,4 5,6 1,2</gml:coordinates>
|
||||
</gml:LinearRing>
|
||||
</gml:outerBoundaryIs>
|
||||
<gml:innerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">2,3 4,5 6,7 2,3</gml:coordinates>
|
||||
</gml:LinearRing>
|
||||
</gml:innerBoundaryIs>
|
||||
<gml:innerBoundaryIs>
|
||||
<gml:LinearRing>
|
||||
<gml:coordinates decimal="." cs="," ts=" ">3,4 5,6 7,8 3,4</gml:coordinates>
|
||||
</gml:LinearRing>
|
||||
</gml:innerBoundaryIs>
|
||||
</gml:Polygon>
|
||||
@@ -0,0 +1 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?><wfs:FeatureCollection xmlns="http://www.opengis.net/wfs" xmlns:wfs="http://www.opengis.net/wfs" xmlns:topp="http://www.openplans.org/topp" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openplans.org/topp http://demo.opengeo.org/geoserver/wfs?service=WFS&version=1.0.0&request=DescribeFeatureType&typeName=topp:states http://www.opengis.net/wfs http://demo.opengeo.org/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd"><gml:featureMember><topp:states><topp:the_geom><gml:MultiPolygon srsName="http://www.opengis.net/gml/srs/epsg.xml#4326"><gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates xmlns:gml="http://www.opengis.net/gml" decimal="." cs="," ts=" ">37.5101,-88.0711 37.4761,-88.0871 37.4421,-88.3111 37.4091,-88.3591 37.4201,-88.4191 37.4001,-88.4671 37.2961,-88.5111 37.2571,-88.5011 37.2051,-88.4501 37.1561,-88.4221 37.0981,-88.4501 37.0721,-88.4761 37.0681,-88.4901 37.0641,-88.5171 37.0721,-88.5591 37.1091,-88.6141 37.1351,-88.6881 37.1411,-88.7391 37.1521,-88.7461 37.2021,-88.8631 37.2181,-88.9321 37.2201,-88.9931 37.1851,-89.0651 37.1121,-89.1161 37.0931,-89.1461 37.0641,-89.1691 37.0251,-89.1741 36.9981,-89.1501 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 37.0271,-89.2641 37.0081,-89.2621 36.9991,-89.2821 37.0091,-89.3101 37.0491,-89.3821 37.0991,-89.3791 37.1371,-89.4231 37.1651,-89.4401 37.2241,-89.4681 37.2531,-89.4651 37.2561,-89.4891 37.2761,-89.5131 37.3041,-89.5131 37.3291,-89.5001 37.3391,-89.4681 37.3551,-89.4351 37.4111,-89.4271 37.4531,-89.4531 37.4911,-89.4941 37.5711,-89.5241 37.6151,-89.5131 37.6501,-89.5191 37.6791,-89.5131 37.6941,-89.5211 37.7061,-89.5811 37.7451,-89.6661 37.7831,-89.6751 37.8041,-89.6911 37.8401,-89.7281 37.9051,-89.8511 37.9051,-89.8611 37.8911,-89.8661 37.8751,-89.9001 37.8781,-89.9371 37.9111,-89.9781 37.9631,-89.9581 37.9691,-90.0101 37.9931,-90.0411 38.0321,-90.1191 38.0531,-90.1341 38.0881,-90.2071 38.1221,-90.2541 38.1661,-90.2891 38.1881,-90.3361 38.2341,-90.3641 38.3231,-90.3691 38.3651,-90.3581 38.3901,-90.3391 38.4271,-90.3011 38.5181,-90.2651 38.5321,-90.2611 38.5621,-90.2401 38.6101,-90.1831 38.6581,-90.1831 38.7001,-90.2021 38.7231,-90.1961 38.7731,-90.1631 38.7851,-90.1351 38.8001,-90.1211 38.8301,-90.1131 38.8531,-90.1321 38.9141,-90.2431 38.9241,-90.2781 38.9241,-90.3191 38.9621,-90.4131 38.9591,-90.4691 38.8911,-90.5301 38.8711,-90.5701 38.8801,-90.6271 38.9351,-90.6681 39.0371,-90.7061 39.0581,-90.7071 39.0931,-90.6901 39.1441,-90.7161 39.1951,-90.7181 39.2241,-90.7321 39.2471,-90.7381 39.2961,-90.7791 39.3501,-90.8501 39.4001,-90.9471 39.4441,-91.0361 39.4731,-91.0641 39.5281,-91.0931 39.5521,-91.1561 39.6001,-91.2031 39.6851,-91.3171 39.7241,-91.3671 39.7611,-91.3731 39.8031,-91.3811 39.8631,-91.4491 39.8851,-91.4501 39.9011,-91.4341 39.9211,-91.4301 39.9461,-91.4471 40.0051,-91.4871 40.0661,-91.5041 40.1341,-91.5161 40.2001,-91.5061 40.2511,-91.4981 40.3091,-91.4861 40.3711,-91.4481 40.3861,-91.4181 40.3921,-91.3851 40.4021,-91.3721 40.4471,-91.3851 40.5031,-91.3741 40.5281,-91.3821 40.5471,-91.4121 40.5721,-91.4111 40.6031,-91.3751 40.6391,-91.2621 40.6431,-91.2141 40.6561,-91.1621 40.6821,-91.1291 40.7051,-91.1191 40.7611,-91.0921 40.8331,-91.0881 40.8791,-91.0491 40.9231,-90.9831 40.9501,-90.9601 41.0701,-90.9541 41.1041,-90.9571 41.1441,-90.9901 41.1651,-91.0181 41.1761,-91.0561 41.2311,-91.1011 41.2671,-91.1021 41.3341,-91.0731 41.4011,-91.0551 41.4231,-91.0271 41.4311,-91.0001 41.4211,-90.9491 41.4441,-90.8441 41.4491,-90.7791 41.4501,-90.7081 41.4621,-90.6581 41.5091,-90.6001 41.5251,-90.5401 41.5271,-90.4541 41.5431,-90.4341 41.5671,-90.4231 41.5861,-90.3481 41.6021,-90.3391 41.6491,-90.3411 41.7221,-90.3261 41.7561,-90.3041 41.7811,-90.2551 41.8061,-90.1951 41.9301,-90.1541 41.9831,-90.1421 42.0331,-90.1501 42.0611,-90.1681 42.1031,-90.1661 42.1201,-90.1761 42.1221,-90.1911 42.1591,-90.2301 42.1971,-90.3231 42.2101,-90.3671 42.2421,-90.4071 42.2631,-90.4171 42.3401,-90.4271 42.3601,-90.4411 42.3881,-90.4911 42.4211,-90.5631 42.4601,-90.6051 42.4751,-90.6481 42.4941,-90.6511 42.5091,-90.6381 42.5081,-90.4191 42.5041,-89.9231 42.5031,-89.8341 42.4971,-89.4001 42.4971,-89.3591 42.4901,-88.9391 42.4901,-88.7641 42.4891,-88.7061 42.4911,-88.2971 42.4891,-88.1941 42.4891,-87.7971 42.3141,-87.8361 42.1561,-87.7601 42.0591,-87.6701 41.8471,-87.6121 41.7231,-87.5291 41.4691,-87.5321 41.3011,-87.5321 41.1731,-87.5311 41.0091,-87.5321 40.7451,-87.5321 40.4941,-87.5371 40.4831,-87.5351 40.1661,-87.5351 39.8871,-87.5351 39.6091,-87.5351 39.4771,-87.5381 39.3501,-87.5401 39.3381,-87.5971 39.3071,-87.6251 39.2971,-87.6101 39.2811,-87.6151 39.2581,-87.6061 39.2481,-87.5841 39.2081,-87.5881 39.1981,-87.5941 39.1961,-87.6071 39.1681,-87.6441 39.1461,-87.6701 39.1301,-87.6591 39.1131,-87.6621 39.1031,-87.6311 39.088Line truncated
|
||||
@@ -0,0 +1,7 @@
|
||||
<gml:Curve xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:segments>
|
||||
<gml:LineStringSegment>
|
||||
<gml:posList>1 2 3 4</gml:posList>
|
||||
</gml:LineStringSegment>
|
||||
</gml:segments>
|
||||
</gml:Curve>
|
||||
@@ -0,0 +1,15 @@
|
||||
<gml:featureMembers xmlns:gml="http://www.opengis.net/gml">
|
||||
<topp:gnis_pop gml:id="gnis_pop.148604" xmlns:topp="http://www.openplans.org/topp">
|
||||
<gml:name>Aflu</gml:name>
|
||||
<topp:the_geom>
|
||||
<gml:Point srsName="urn:x-ogc:def:crs:EPSG:4326">
|
||||
<gml:pos>34.12 2.09</gml:pos>
|
||||
</gml:Point>
|
||||
</topp:the_geom>
|
||||
<topp:population>84683</topp:population>
|
||||
<topp:country>Algeria</topp:country>
|
||||
<topp:type>place</topp:type>
|
||||
<topp:name>Aflu</topp:name>
|
||||
<topp:empty></topp:empty>
|
||||
</topp:gnis_pop>
|
||||
</gml:featureMembers>
|
||||
@@ -0,0 +1,4 @@
|
||||
<gml:Envelope xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:lowerCorner>1 2</gml:lowerCorner>
|
||||
<gml:upperCorner>3 4</gml:upperCorner>
|
||||
</gml:Envelope>
|
||||
@@ -0,0 +1,3 @@
|
||||
<gml:LinearRing xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
@@ -0,0 +1,3 @@
|
||||
<gml:LineString xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:posList>1 2 3 4</gml:posList>
|
||||
</gml:LineString>
|
||||
@@ -0,0 +1,3 @@
|
||||
<gml:LineString xmlns:gml="http://www.opengis.net/gml" srsName="foo" srsDimension="3">
|
||||
<gml:posList>1 2 3 4 5 6</gml:posList>
|
||||
</gml:LineString>
|
||||
@@ -0,0 +1,20 @@
|
||||
<gml:MultiCurve xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:curveMember>
|
||||
<gml:Curve>
|
||||
<gml:segments>
|
||||
<gml:LineStringSegment>
|
||||
<gml:posList>1 2 2 3</gml:posList>
|
||||
</gml:LineStringSegment>
|
||||
</gml:segments>
|
||||
</gml:Curve>
|
||||
</gml:curveMember>
|
||||
<gml:curveMember>
|
||||
<gml:Curve>
|
||||
<gml:segments>
|
||||
<gml:LineStringSegment>
|
||||
<gml:posList>3 4 4 5</gml:posList>
|
||||
</gml:LineStringSegment>
|
||||
</gml:segments>
|
||||
</gml:Curve>
|
||||
</gml:curveMember>
|
||||
</gml:MultiCurve>
|
||||
@@ -0,0 +1,12 @@
|
||||
<gml:MultiCurve xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:curveMember>
|
||||
<gml:LineString>
|
||||
<gml:posList>1 2 2 3</gml:posList>
|
||||
</gml:LineString>
|
||||
</gml:curveMember>
|
||||
<gml:curveMember>
|
||||
<gml:LineString>
|
||||
<gml:posList>3 4 4 5</gml:posList>
|
||||
</gml:LineString>
|
||||
</gml:curveMember>
|
||||
</gml:MultiCurve>
|
||||
@@ -0,0 +1,10 @@
|
||||
<gml:MultiLineString xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:lineStringMembers>
|
||||
<gml:LineString>
|
||||
<gml:posList>1 2 2 3</gml:posList>
|
||||
</gml:LineString>
|
||||
<gml:LineString>
|
||||
<gml:posList>3 4 4 5</gml:posList>
|
||||
</gml:LineString>
|
||||
</gml:lineStringMembers>
|
||||
</gml:MultiLineString>
|
||||
@@ -0,0 +1,12 @@
|
||||
<gml:MultiLineString xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:lineStringMember>
|
||||
<gml:LineString>
|
||||
<gml:posList>1 2 2 3</gml:posList>
|
||||
</gml:LineString>
|
||||
</gml:lineStringMember>
|
||||
<gml:lineStringMember>
|
||||
<gml:LineString>
|
||||
<gml:posList>3 4 4 5</gml:posList>
|
||||
</gml:LineString>
|
||||
</gml:lineStringMember>
|
||||
</gml:MultiLineString>
|
||||
@@ -0,0 +1,13 @@
|
||||
<gml:MultiPoint xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:pointMembers>
|
||||
<gml:Point>
|
||||
<gml:pos>1 2</gml:pos>
|
||||
</gml:Point>
|
||||
<gml:Point>
|
||||
<gml:pos>2 3</gml:pos>
|
||||
</gml:Point>
|
||||
<gml:Point>
|
||||
<gml:pos>3 4</gml:pos>
|
||||
</gml:Point>
|
||||
</gml:pointMembers>
|
||||
</gml:MultiPoint>
|
||||
@@ -0,0 +1,17 @@
|
||||
<gml:MultiPoint xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:pointMember>
|
||||
<gml:Point>
|
||||
<gml:pos>1 2</gml:pos>
|
||||
</gml:Point>
|
||||
</gml:pointMember>
|
||||
<gml:pointMember>
|
||||
<gml:Point>
|
||||
<gml:pos>2 3</gml:pos>
|
||||
</gml:Point>
|
||||
</gml:pointMember>
|
||||
<gml:pointMember>
|
||||
<gml:Point>
|
||||
<gml:pos>3 4</gml:pos>
|
||||
</gml:Point>
|
||||
</gml:pointMember>
|
||||
</gml:MultiPoint>
|
||||
@@ -0,0 +1,28 @@
|
||||
<gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:polygonMembers>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:Polygon>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
</gml:Polygon>
|
||||
</gml:polygonMembers>
|
||||
</gml:MultiPolygon>
|
||||
@@ -0,0 +1,30 @@
|
||||
<gml:MultiPolygon xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:polygonMember>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:Polygon>
|
||||
</gml:polygonMember>
|
||||
<gml:polygonMember>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
</gml:Polygon>
|
||||
</gml:polygonMember>
|
||||
</gml:MultiPolygon>
|
||||
@@ -0,0 +1,28 @@
|
||||
<gml:MultiSurface xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:surfaceMembers>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:Polygon>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
</gml:Polygon>
|
||||
</gml:surfaceMembers>
|
||||
</gml:MultiSurface>
|
||||
@@ -0,0 +1,30 @@
|
||||
<gml:MultiSurface xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:surfaceMember>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:Polygon>
|
||||
</gml:surfaceMember>
|
||||
<gml:surfaceMember>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
</gml:Polygon>
|
||||
</gml:surfaceMember>
|
||||
</gml:MultiSurface>
|
||||
@@ -0,0 +1,38 @@
|
||||
<gml:MultiSurface xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:surfaceMember>
|
||||
<gml:Surface>
|
||||
<gml:patches>
|
||||
<gml:PolygonPatch interpolation="planar">
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:PolygonPatch>
|
||||
</gml:patches>
|
||||
</gml:Surface>
|
||||
</gml:surfaceMember>
|
||||
<gml:surfaceMember>
|
||||
<gml:Surface>
|
||||
<gml:patches>
|
||||
<gml:PolygonPatch interpolation="planar">
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
</gml:PolygonPatch>
|
||||
</gml:patches>
|
||||
</gml:Surface>
|
||||
</gml:surfaceMember>
|
||||
</gml:MultiSurface>
|
||||
@@ -0,0 +1,3 @@
|
||||
<gml:Point xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:pos>1 2</gml:pos>
|
||||
</gml:Point>
|
||||
@@ -0,0 +1,17 @@
|
||||
<gml:Polygon xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:Polygon>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wfs:FeatureCollection numberOfFeatures="1" timeStamp="2010-01-29T15:10:38.921-07:00"
|
||||
xsi:schemaLocation="http://medford.opengeo.org http://localhost:8080/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=medford%3Azoning http://www.opengis.net/wfs http://localhost:8080/geoserver/schemas/wfs/1.1.0/wfs.xsd"
|
||||
xmlns:ogc="http://www.opengis.net/ogc"
|
||||
xmlns:wfs="http://www.opengis.net/wfs"
|
||||
xmlns:medford="http://opengeo.org/#medford"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns:ows="http://www.opengis.net/ows"
|
||||
xmlns:gml="http://www.opengis.net/gml"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<gml:featureMembers>
|
||||
<medford:zoning gml:id="zoning.1">
|
||||
<medford:the_geom>
|
||||
<gml:MultiSurface srsName="urn:x-ogc:def:crs:EPSG:4326">
|
||||
<gml:surfaceMember>
|
||||
<gml:Polygon>
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>42.397027571297585 -122.88465674265922 42.39702893980587 -122.88509730796012 42.397029086785146 -122.88511582432085 42.39702379767053 -122.88528111596624 42.39748517484964 -122.88529300380065 42.39748473847452 -122.88509914138723 42.39748482219041 -122.8849959517568 42.397485082635576 -122.8846741899541 42.3974853307826 -122.88436529392652 42.39702663751206 -122.88435664014142 42.397027571297585 -122.88465674265922</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
</gml:Polygon>
|
||||
</gml:surfaceMember>
|
||||
</gml:MultiSurface>
|
||||
</medford:the_geom>
|
||||
<medford:objectid>1</medford:objectid>
|
||||
<medford:cityzone>YES</medford:cityzone>
|
||||
<medford:zoning>I-L</medford:zoning>
|
||||
<medford:revdate>2004-04-12T00:00:00-06:00</medford:revdate>
|
||||
<medford:finord></medford:finord>
|
||||
<medford:filenum></medford:filenum>
|
||||
<medford:acres>0.95741118624</medford:acres>
|
||||
<medford:misc></medford:misc>
|
||||
<medford:shape_leng>835.705330224</medford:shape_leng>
|
||||
<medford:perimeter>835.705330224</medford:perimeter>
|
||||
<medford:area>41704.8312728</medford:area>
|
||||
<medford:shape_le_1>835.705330224</medford:shape_le_1>
|
||||
<medford:shape_area>41704.8312728</medford:shape_area>
|
||||
<medford:hectares>0.38745056079</medford:hectares>
|
||||
</medford:zoning>
|
||||
</gml:featureMembers>
|
||||
</wfs:FeatureCollection>
|
||||
@@ -0,0 +1,21 @@
|
||||
<gml:Surface xmlns:gml="http://www.opengis.net/gml" srsName="foo">
|
||||
<gml:patches>
|
||||
<gml:PolygonPatch interpolation="planar">
|
||||
<gml:exterior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>1 2 3 4 5 6 1 2</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:exterior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>2 3 4 5 6 7 2 3</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
<gml:interior>
|
||||
<gml:LinearRing>
|
||||
<gml:posList>3 4 5 6 7 8 3 4</gml:posList>
|
||||
</gml:LinearRing>
|
||||
</gml:interior>
|
||||
</gml:PolygonPatch>
|
||||
</gml:patches>
|
||||
</gml:Surface>
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gml:featureMembers xsi:schemaLocation="http://www.openplans.org/topp http://demo.opengeo.org/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=topp:states http://www.opengis.net/gml http://schemas.opengis.net/gml/3.2.1/gml.xsd" xmlns:topp="http://www.openplans.org/topp" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gml="http://www.opengis.net/gml"><topp:states><topp:the_geom><gml:MultiSurface srsName="urn:x-ogc:def:crs:EPSG:4326"><gml:surfaceMember><gml:Polygon><gml:exterior><gml:LinearRing><gml:posList>37.5101 -88.0711 37.4761 -88.0871 37.4421 -88.3111 37.4091 -88.3591 37.4201 -88.4191 37.4001 -88.4671 37.2961 -88.5111 37.2571 -88.5011 37.2051 -88.4501 37.1561 -88.4221 37.0981 -88.4501 37.0721 -88.4761 37.0681 -88.4901 37.0641 -88.5171 37.0721 -88.5591 37.1091 -88.6141 37.1351 -88.6881 37.1411 -88.7391 37.1521 -88.7461 37.2021 -88.8631 37.2181 -88.9321 37.2201 -88.9931 37.1851 -89.0651 37.1121 -89.1161 37.0931 -89.1461 37.0641 -89.1691 37.0251 -89.1741 36.9981 -89.1501 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 37.0271 -89.2641 37.0081 -89.2621 36.9991 -89.2821 37.0091 -89.3101 37.0491 -89.3821 37.0991 -89.3791 37.1371 -89.4231 37.1651 -89.4401 37.2241 -89.4681 37.2531 -89.4651 37.2561 -89.4891 37.2761 -89.5131 37.3041 -89.5131 37.3291 -89.5001 37.3391 -89.4681 37.3551 -89.4351 37.4111 -89.4271 37.4531 -89.4531 37.4911 -89.4941 37.5711 -89.5241 37.6151 -89.5131 37.6501 -89.5191 37.6791 -89.5131 37.6941 -89.5211 37.7061 -89.5811 37.7451 -89.6661 37.7831 -89.6751 37.8041 -89.6911 37.8401 -89.7281 37.9051 -89.8511 37.9051 -89.8611 37.8911 -89.8661 37.8751 -89.9001 37.8781 -89.9371 37.9111 -89.9781 37.9631 -89.9581 37.9691 -90.0101 37.9931 -90.0411 38.0321 -90.1191 38.0531 -90.1341 38.0881 -90.2071 38.1221 -90.2541 38.1661 -90.2891 38.1881 -90.3361 38.2341 -90.3641 38.3231 -90.3691 38.3651 -90.3581 38.3901 -90.3391 38.4271 -90.3011 38.5181 -90.2651 38.5321 -90.2611 38.5621 -90.2401 38.6101 -90.1831 38.6581 -90.1831 38.7001 -90.2021 38.7231 -90.1961 38.7731 -90.1631 38.7851 -90.1351 38.8001 -90.1211 38.8301 -90.1131 38.8531 -90.1321 38.9141 -90.2431 38.9241 -90.2781 38.9241 -90.3191 38.9621 -90.4131 38.9591 -90.4691 38.8911 -90.5301 38.8711 -90.5701 38.8801 -90.6271 38.9351 -90.6681 39.0371 -90.7061 39.0581 -90.7071 39.0931 -90.6901 39.1441 -90.7161 39.1951 -90.7181 39.2241 -90.7321 39.2471 -90.7381 39.2961 -90.7791 39.3501 -90.8501 39.4001 -90.9471 39.4441 -91.0361 39.4731 -91.0641 39.5281 -91.0931 39.5521 -91.1561 39.6001 -91.2031 39.6851 -91.3171 39.7241 -91.3671 39.7611 -91.3731 39.8031 -91.3811 39.8631 -91.4491 39.8851 -91.4501 39.9011 -91.4341 39.9211 -91.4301 39.9461 -91.4471 40.0051 -91.4871 40.0661 -91.5041 40.1341 -91.5161 40.2001 -91.5061 40.2511 -91.4981 40.3091 -91.4861 40.3711 -91.4481 40.3861 -91.4181 40.3921 -91.3851 40.4021 -91.3721 40.4471 -91.3851 40.5031 -91.3741 40.5281 -91.3821 40.5471 -91.4121 40.5721 -91.4111 40.6031 -91.3751 40.6391 -91.2621 40.6431 -91.2141 40.6561 -91.1621 40.6821 -91.1291 40.7051 -91.1191 40.7611 -91.0921 40.8331 -91.0881 40.8791 -91.0491 40.9231 -90.9831 40.9501 -90.9601 41.0701 -90.9541 41.1041 -90.9571 41.1441 -90.9901 41.1651 -91.0181 41.1761 -91.0561 41.2311 -91.1011 41.2671 -91.1021 41.3341 -91.0731 41.4011 -91.0551 41.4231 -91.0271 41.4311 -91.0001 41.4211 -90.9491 41.4441 -90.8441 41.4491 -90.7791 41.4501 -90.7081 41.4621 -90.6581 41.5091 -90.6001 41.5251 -90.5401 41.5271 -90.4541 41.5431 -90.4341 41.5671 -90.4231 41.5861 -90.3481 41.6021 -90.3391 41.6491 -90.3411 41.7221 -90.3261 41.7561 -90.3041 41.7811 -90.2551 41.8061 -90.1951 41.9301 -90.1541 41.9831 -90.1421 42.0331 -90.1501 42.0611 -90.1681 42.1031 -90.1661 42.1201 -90.1761 42.1221 -90.1911 42.1591 -90.2301 42.1971 -90.3231 42.2101 -90.3671 42.2421 -90.4071 42.2631 -90.4171 42.3401 -90.4271 42.3601 -90.4411 42.3881 -90.4911 42.4211 -90.5631 42.4601 -90.6051 42.4751 -90.6481 42.4941 -90.6511 42.5091 -90.6381 42.5081 -90.4191 42.5041 -89.9231 42.5031 -89.8341 42.4971 -89.4001 42.4971 -89.3591 42.4901 -88.9391 42.4901 -88.7641 42.4891 -88.7061 42.4911 -88.2971 42.4891 -88.1941 42.4891 -87.7971 42.3141 -87.8361 42.1561 -87.7601 42.0591 -87.6701 41.8471 -87.6121 41.7231 -87.5291 41.4691 -87.5321 41.3011 -87.5321 41.1731 -87.5311 41.0091 -87.5321 40.7451 -87.5321 40.4941 -87.5371 40.4831 -87.5351 40.1661 -87.5351 39.8871 -87.5351 39.6091 -87.5351 39.4771 -87.5381 39.3501 -87.5401 39.3381 -87.5971 39.3071 -87.6251 39.2971 -87.6101 39.2811 -87.6151 39.2581 -87.6061 39.2481 -87.5841 39.2081 -87.5881 39.1981 -87.5941 39.1961 -87.6071 39.1681 -87.6441 39.1461 -87.6701 39.1301 -87.6591 39.1131 -87.6621 39.1031 -87.6311 39.0881 -87.6301 39.0841 -87.6121 39.0621 -87.5851 38.9951 -87.5811 38.9941 -87.5911 38.9771 -87.5471 38.9631 -87.5331 38.9311 -87.5301 38.9041 -87.5391 38.8691 -87.5591 38.8571 -87.5501 38.7951 -87.5071 38.7761 -87.5191 38.7691 -87.5081 38.7361 -87.5081Line truncated
|
||||
@@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<wfs:FeatureCollection numberOfFeatures="3" timeStamp="2008-09-12T00:24:21.013-04:00" xsi:schemaLocation="http://www.openplans.org/topp http://sigma.openplans.org:80/geoserver/wfs?service=WFS&version=1.1.0&request=DescribeFeatureType&typeName=topp:states http://www.opengis.net/wfs http://sigma.openplans.org:80/geoserver/schemas/wfs/1.1.0/wfs.xsd" xmlns:ogc="http://www.opengis.net/ogc" xmlns:opengeo="http://open-geo.com" xmlns:tiger="http://www.census.gov" xmlns:wfs="http://www.opengis.net/wfs" xmlns:topp="http://www.openplans.org/topp" xmlns:seb="http://seb.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ows="http://www.opengis.net/ows" xmlns:gml="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink"><gml:featureMembers><topp:states gml:id="states.1"><gml:boundedBy><gml:Envelope srsName="urn:x-ogc:def:crs:EPSG:4326"><gml:lowerCorner>36.986 -91.516</gml:lowerCorner><gml:upperCorner>42.509 -87.507</gml:upperCorner></gml:Envelope></gml:boundedBy><topp:the_geom><gml:MultiSurface srsName="urn:x-ogc:def:crs:EPSG:4326"><gml:surfaceMember><gml:Polygon><gml:exterior><gml:LinearRing><gml:posList>37.511 -88.071 37.476 -88.087 37.442 -88.311 37.409 -88.359 37.421 -88.419 37.401 -88.467 37.296 -88.511 37.257 -88.501 37.205 -88.451 37.156 -88.422 37.098 -88.451 37.072 -88.476 37.068 -88.491 37.064 -88.517 37.072 -88.559 37.109 -88.614 37.135 -88.688 37.141 -88.739 37.152 -88.746 37.202 -88.863 37.218 -88.932 37.221 -88.993 37.185 -89.065 37.112 -89.116 37.093 -89.146 37.064 -89.169 37.025 -89.174 36.998 -89.151 36.988 -89.129 36.986 -89.193 37.028 -89.211 37.041 -89.237 37.087 -89.264 37.091 -89.284 37.085 -89.303 37.061 -89.309 37.027 -89.264 37.008 -89.262 36.999 -89.282 37.009 -89.311 37.049 -89.382 37.099 -89.379 37.137 -89.423 37.165 -89.441 37.224 -89.468 37.253 -89.465 37.256 -89.489 37.276 -89.513 37.304 -89.513 37.329 -89.501 37.339 -89.468 37.355 -89.435 37.411 -89.427 37.453 -89.453 37.491 -89.494 37.571 -89.524 37.615 -89.513 37.651 -89.519 37.679 -89.513 37.694 -89.521 37.706 -89.581 37.745 -89.666 37.783 -89.675 37.804 -89.691 37.841 -89.728 37.905 -89.851 37.905 -89.861 37.891 -89.866 37.875 -89.901 37.878 -89.937 37.911 -89.978 37.963 -89.958 37.969 -90.011 37.993 -90.041 38.032 -90.119 38.053 -90.134 38.088 -90.207 38.122 -90.254 38.166 -90.289 38.188 -90.336 38.234 -90.364 38.323 -90.369 38.365 -90.358 38.391 -90.339 38.427 -90.301 38.518 -90.265 38.532 -90.261 38.562 -90.241 38.611 -90.183 38.658 -90.183 38.701 -90.202 38.723 -90.196 38.773 -90.163 38.785 -90.135 38.801 -90.121 38.831 -90.113 38.853 -90.132 38.914 -90.243 38.924 -90.278 38.924 -90.319 38.962 -90.413 38.959 -90.469 38.891 -90.531 38.871 -90.571 38.881 -90.627 38.935 -90.668 39.037 -90.706 39.058 -90.707 39.093 -90.691 39.144 -90.716 39.195 -90.718 39.224 -90.732 39.247 -90.738 39.296 -90.779 39.351 -90.851 39.401 -90.947 39.444 -91.036 39.473 -91.064 39.528 -91.093 39.552 -91.156 39.601 -91.203 39.685 -91.317 39.724 -91.367 39.761 -91.373 39.803 -91.381 39.863 -91.449 39.885 -91.451 39.901 -91.434 39.921 -91.431 39.946 -91.447 40.005 -91.487 40.066 -91.504 40.134 -91.516 40.201 -91.506 40.251 -91.498 40.309 -91.486 40.371 -91.448 40.386 -91.418 40.392 -91.385 40.402 -91.372 40.447 -91.385 40.503 -91.374 40.528 -91.382 40.547 -91.412 40.572 -91.411 40.603 -91.375 40.639 -91.262 40.643 -91.214 40.656 -91.162 40.682 -91.129 40.705 -91.119 40.761 -91.092 40.833 -91.088 40.879 -91.049 40.923 -90.983 40.951 -90.961 41.071 -90.954 41.104 -90.957 41.144 -90.991 41.165 -91.018 41.176 -91.056 41.231 -91.101 41.267 -91.102 41.334 -91.073 41.401 -91.055 41.423 -91.027 41.431 -91.001 41.421 -90.949 41.444 -90.844 41.449 -90.779 41.451 -90.708 41.462 -90.658 41.509 -90.601 41.525 -90.541 41.527 -90.454 41.543 -90.434 41.567 -90.423 41.586 -90.348 41.602 -90.339 41.649 -90.341 41.722 -90.326 41.756 -90.304 41.781 -90.255 41.806 -90.195 41.931 -90.154 41.983 -90.142 42.033 -90.151 42.061 -90.168 42.103 -90.166 42.121 -90.176 42.122 -90.191 42.159 -90.231 42.197 -90.323 42.211 -90.367 42.242 -90.407 42.263 -90.417 42.341 -90.427 42.361 -90.441 42.388 -90.491 42.421 -90.563 42.461 -90.605 42.475 -90.648 42.494 -90.651 42.509 -90.638 42.508 -90.419 42.504 -89.923 42.503 -89.834 42.497 -89.401 42.497 -89.359 42.491 -88.939 42.491 -88.764 42.489 -88.706 42.491 -88.297 42.489 -88.194 42.489 -87.797 42.314 -87.836 42.156 -87.761 42.059 -87.671 41.847 -87.612 41.723 -87.529 41.469 -87.532 41.301 -87.532 41.173 -87.531 41.009 -87.532 40.745 -87.532 40.494 -87.537 40.483 -87.535 40.166 -87.535 39.887 -87.535 39.609 -87.535 39.477 -87.538 39.351 -87.541 39.338 -87.597 39.307 -87.625 39.297 -87.611 39.281 -87.615 39.258 -87.606 39.248 -87.584 39.208 -87.588 39.198 -87.594 39.196 -87.607 39.168 -87.644 39.146 -87.671 39.131 -87.659 39.113 -87.662 39.103 -87.631 39.088 -87.631 39.084 -87.612 39.062 -87.585 38.995 -87.581 38.994 -87.591 38.977 -87.547 38.963 -87.533 38.931 -87.531 38.904 -87.539 38.869 -87.559 38.857 -87Line truncated
|
||||
Reference in new issue
Block a user