File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
lib/OpenLayers/Format/WCSDescribeCoverage
tests/Format/WCSDescribeCoverage Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -121,7 +121,12 @@ OpenLayers.Format.WCSDescribeCoverage.v1_1_0 = OpenLayers.Class(
121
121
}
122
122
} ,
123
123
"GridOffsets" : function ( node , gridCRS ) {
124
- gridCRS . gridOffsets = this . getChildValue ( node ) ;
124
+ var xy = this . getChildValue ( node ) . split ( ' ' ) ;
125
+ if ( xy . length == 2 ) {
126
+ gridCRS . gridOffsets = { } ;
127
+ gridCRS . gridOffsets . x = Number ( xy [ 0 ] ) ;
128
+ gridCRS . gridOffsets . y = Number ( xy [ 1 ] ) ;
129
+ }
125
130
} ,
126
131
"GridCS" : function ( node , gridCRS ) {
127
132
gridCRS . gridCS = this . getChildValue ( node ) ;
Original file line number Diff line number Diff line change 17
17
}
18
18
19
19
function test_read ( t ) {
20
- t . plan ( 58 ) ; // Number of tests performed: If you add a test below, be sure to increment this accordingly
20
+ t . plan ( 59 ) ; // Number of tests performed: If you add a test below, be sure to increment this accordingly
21
21
22
22
var parser = new OpenLayers . Format . WCSDescribeCoverage ( ) ;
23
23
107
107
var gridCRS = metadata . domain . spatialDomain . gridCRS ;
108
108
t . eq ( gridCRS . gridBaseCRS , "urn:ogc:def:crs:EPSG::28992" , "correct gridBaseCRS" ) ;
109
109
t . eq ( gridCRS . gridCS , "urn:ogc:def:cs:OGC:0.0:Grid2dSquareCS" , "correct gridCS" ) ;
110
- t . eq ( gridCRS . gridOffsets , "0.5 -0.5" , "correct gridOffsets" ) ;
110
+ t . eq ( gridCRS . gridOffsets . x , 0.5 , "correct gridOffsets.x" ) ;
111
+ t . eq ( gridCRS . gridOffsets . y , - 0.5 , "correct gridOffsets.y" ) ;
111
112
t . eq ( gridCRS . gridOrigin . x , 91979.25 , "correct gridOrigin.x" ) ;
112
113
t . eq ( gridCRS . gridOrigin . y , 437659.25 , "correct gridOrigin.y" ) ;
113
114
t . eq ( gridCRS . gridType , "urn:ogc:def:method:WCS:1.1:2dSimpleGrid" , "correct gridType" ) ;
You can’t perform that action at this time.
0 commit comments