Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds parser classes for WCS 1.1.1 #1442

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions lib/OpenLayers/Format/WCSCapabilities/v1_1_1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/* ======================================================================
OpenLayers/Format/WCSCapabilities/v1_1_1.js
====================================================================== */

/* Copyright (c) 2006-2015 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

/**
* @requires OpenLayers/Format/OWSCommon/v1_1_1.js
*/

/**
* Class: OpenLayers.Format.WCSCapabilities/v1_1_1
* Read WCS Capabilities version 1.1.1.
*
* Inherits from:
* - <OpenLayers.Format.WCSCapabilities.v1_1_0>
*/
OpenLayers.Format.WCSCapabilities.v1_1_1 = OpenLayers.Class(
OpenLayers.Format.WCSCapabilities.v1_1_0, {

/**
* Property: namespaces
* {Object} Mapping of namespace aliases to namespace URIs.
*/
namespaces: {
wcs: "http://www.opengis.net/wcs/1.1.1",
xlink: "http://www.w3.org/1999/xlink",
xsi: "http://www.w3.org/2001/XMLSchema-instance",
ows: "http://www.opengis.net/ows/1.1.1",
owsesri: "http://www.opengis.net/ows",
owcsesri: "http://www.opengis.net/wcs/1.1.1/ows"
},

/**
* Constructor: OpenLayers.Format.WCSCapabilities.v1_1_0
* Create a new parser for WCS capabilities version 1.1.0.
*
* Parameters:
* options - {Object} An optional object whose properties will be set on
* this instance.
*/

CLASS_NAME: "OpenLayers.Format.WCSCapabilities.v1_1_1"

});
5 changes: 5 additions & 0 deletions lib/OpenLayers/Format/WCSDescribeCoverage/v1_1_0.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,11 @@ OpenLayers.Format.WCSDescribeCoverage.v1_1_0 = OpenLayers.Class(
gridCRS.gridOffsets.x = Number(xy[0]);
gridCRS.gridOffsets.y = Number(xy[1]);
}
else if (xy.length == 4) {
gridCRS.gridOffsets = {};
gridCRS.gridOffsets.x = Number(xy[0]);
gridCRS.gridOffsets.y = Number(xy[3]);
}
},
"GridCS": function(node, gridCRS) {
gridCRS.gridCS = this.getChildValue(node);
Expand Down
60 changes: 60 additions & 0 deletions lib/OpenLayers/Format/WCSDescribeCoverage/v1_1_1.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/* ======================================================================
OpenLayers/Format/WCSDescribeCoverage/v1_1_1.js
====================================================================== */

/* Copyright (c) 2006-2015 by OpenLayers Contributors (see authors.txt for
* full list of contributors). Published under the 2-clause BSD license.
* See license.txt in the OpenLayers distribution or repository for the
* full text of the license. */

/**
* @requires OpenLayers/Format/WCSDescribeCoverage/v1_1_1.js
*/

/**
* Class: OpenLayers.Format.WCSDescribeCoverage/v1_1_1
* Read WCS DescribeCoverage version 1.1.1.
*
* Inherits from:
* - <OpenLayers.Format.WCSDescribeCoverage.v1_1_0>
*/
OpenLayers.Format.WCSDescribeCoverage.v1_1_1 = OpenLayers.Class(
OpenLayers.Format.WCSDescribeCoverage.v1_1_0, {

/**
* Property: namespaceAlias
* {Object} Mapping of namespace URIs to namespace aliases.
* MapServer and GeoServer use different URIs for the "wcs" alias,
* thus two URIs must be included for each alias.
*/
namespaceAlias: {
"http://www.opengis.net/wcs/1.1.1" : "wcs",
"http://www.opengis.net/wcs/1.1" : "wcs",
"http://www.opengis.net/ows/1.1.1" : "wcs",
"http://www.opengis.net/ows/1.1" : "wcs",
"http://www.w3.org/1999/xlink" : "xlink",
"http://www.w3.org/2001/XMLSchema-instance" : "xsi",
"http://www.opengis.net/ows" : "owsesri"
},

/**
* Constructor: OpenLayers.Format.WCSDescribeCoverage.v1_1_1
* Create a new parser for WCS capabilities version 1.1.1.
*
* Parameters:
* options - {Object} An optional object whose properties will be set on
* this instance.
*/
initialize: function(options) {
if(window.ActiveXObject) {
this.xmldom = new ActiveXObject("Microsoft.XMLDOM");
}
OpenLayers.Format.prototype.initialize.apply(this, [options]);
// clone the namespace object and set all namespace aliases
// in this class namespaceAlias is larger than namespaces, must be assigned directly
this.namespaces = OpenLayers.Util.extend({}, this.namespaces);
this.namespaceAlias = OpenLayers.Util.extend({}, this.namespaceAlias);
},

CLASS_NAME: "OpenLayers.Format.WCSDescribeCoverage.v1_1_1"
});