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 @@ -72,6 +72,9 @@ OpenLayers.Format.WCSDescribeCoverage.v1_1_0 = OpenLayers.Class(
72
72
"Identifier" : function ( node , description ) {
73
73
description . identifier = this . getChildValue ( node ) ;
74
74
} ,
75
+ "Title" : function ( node , description ) {
76
+ description . title = this . getChildValue ( node ) ;
77
+ } ,
75
78
"Domain" : function ( node , description ) {
76
79
description . domain = this . readChildNodes ( node , description . domain ) ;
77
80
} ,
Original file line number Diff line number Diff line change 21
21
22
22
var parser = new OpenLayers . Format . WCSDescribeCoverage ( ) ;
23
23
24
- // // MapServer, v1.0.0
25
- // var text = '<?xml version="1.0" encoding="UTF-8"?><WCS_Capabilities xmlns="http://www.opengis.net/wcs" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" updateSequence="0" xsi:schemaLocation="http://www.opengis.net/wcs http://schemas.opengis.net/wcs/1.0.0/wcsCapabilities.xsd"><Service><name>MapServer WCS</name><label>WCS Sample Data Server 1.0.0</label><keywords><keyword>Geospatial WebServices</keyword><keyword>Luxembourg!</keyword></keywords><responsibleParty><individualName>Franko Lemmer</individualName><organisationName>CRP Henri Tudor</organisationName><positionName>R+D engineer</positionName><contactInfo><phone><voice>6463320</voice><facsimile>6465955</facsimile></phone><address><deliveryPoint>66, rue de Luxembourg</deliveryPoint><city>Esch-sur-Alzette</city><administrativeArea/><postalCode>97202</postalCode><country>Luxembourg</country><electronicMailAddress>[email protected] </electronicMailAddress></address><onlineResource xlink:type="simple" xlink:href="http://services.magnificent.lu/cgi-bin/mapserv?map=/var/www/MapFiles/wcs_test.map&"/></contactInfo></responsibleParty><fees>mucho dinero</fees><accessConstraints>Open to the public</accessConstraints></Service><Capability><Request><GetCapabilities><DCPType><HTTP><Get><OnlineResource xlink:type="simple" xlink:href="http://services.magnificent.get.lu/cgi-bin/mapserv?map=/var/www/MapFiles/wcs_test.map&"/></Get></HTTP></DCPType><DCPType><HTTP><Post><OnlineResource xlink:type="simple" xlink:href="http://services.magnificent.post.lu/cgi-bin/mapserv?map=/var/www/MapFiles/wcs_test.map&"/></Post></HTTP></DCPType></GetCapabilities><DescribeCoverage><DCPType><HTTP><Get><OnlineResource xlink:type="simple" xlink:href="http://services.magnificent.lu/cgi-bin/mapserv?map=/var/www/MapFiles/wcs_test.map&"/></Get></HTTP></DCPType><DCPType><HTTP><Post><OnlineResource xlink:type="simple" xlink:href="http://services.magnificent.lu/cgi-bin/mapserv?map=/var/www/MapFiles/wcs_test.map&"/></Post></HTTP></DCPType></DescribeCoverage><GetCoverage><DCPType><HTTP><Get><OnlineResource xlink:type="simple" xlink:href="http://services.magnificent.lu/cgi-bin/mapserv?map=/var/www/MapFiles/wcs_test.map&"/></Get></HTTP></DCPType><DCPType><HTTP><Post><OnlineResource xlink:type="simple" xlink:href="http://services.magnificent.lu/cgi-bin/mapserv?map=/var/www/MapFiles/wcs_test.map&"/></Post></HTTP></DCPType></GetCoverage></Request><Exception><Format>application/vnd.ogc.se_xml</Format></Exception></Capability><ContentMetadata><CoverageOfferingBrief><name>ro_dsm</name><label>Rotterdam DSM</label><lonLatEnvelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84"><gml:pos>4.44444 51.515151</gml:pos><gml:pos>5.55555 52.525252</gml:pos></lonLatEnvelope></CoverageOfferingBrief><CoverageOfferingBrief><name>ro_dsm_mini</name><label>ro_dsm_mini</label><lonLatEnvelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84"><gml:pos>4.47489346945755 51.9159453786927</gml:pos><gml:pos>4.47687824892444 51.9170706688033</gml:pos></lonLatEnvelope></CoverageOfferingBrief><CoverageOfferingBrief><name>ro_irra</name><label>ro_irra</label><lonLatEnvelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84"><gml:pos>4.471333734139 51.912813427383</gml:pos><gml:pos>4.4808508475645 51.9248713705576</gml:pos></lonLatEnvelope></CoverageOfferingBrief><CoverageOfferingBrief><name>ro_irra_ext</name><label>ro_irra_ext</label><lonLatEnvelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84"><gml:pos>4.10024171314823 51.9359764992844</gml:pos><gml:pos>4.21909054278063 52.001415228243</gml:pos></lonLatEnvelope></CoverageOfferingBrief></ContentMetadata></WCS_Capabilities>';
24
+ // MapServer, v1.0.0
25
+ var text = '<?xml version=' 1.0 ' encoding="ISO-8859-1" ?><CoverageDescriptionversion="1.0.0" updateSequence="0" xmlns="http://www.opengis.net/wcs" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://www.opengis.net/wcs http://schemas.opengis.net/wcs/1.0.0/describeCoverage.xsd"><CoverageOffering><name>ro_dsm</name><label>ro_dsm</label><lonLatEnvelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84"><gml:pos>4.471333734139 51.912813427383</gml:pos><gml:pos>4.4808508475645 51.9248713705576</gml:pos></lonLatEnvelope><domainSet><spatialDomain><gml:Envelope srsName="EPSG:4326"><gml:pos>4.471333734139 51.912813427383</gml:pos><gml:pos>4.4808508475645 51.9248713705576</gml:pos></gml:Envelope><gml:Envelope srsName="EPSG:28992"><gml:pos>91979 436326</gml:pos><gml:pos>92617 437659.5</gml:pos></gml:Envelope><gml:RectifiedGrid dimension="2"><gml:limits><gml:GridEnvelope><gml:low>0 0</gml:low><gml:high>1275 2666</gml:high></gml:GridEnvelope></gml:limits><gml:axisName>x</gml:axisName><gml:axisName>y</gml:axisName><gml:origin><gml:pos>91979 437659.5</gml:pos></gml:origin><gml:offsetVector>0.5 0</gml:offsetVector><gml:offsetVector>0 -0.5</gml:offsetVector></gml:RectifiedGrid></spatialDomain></domainSet><rangeSet><RangeSet><name>Range 1</name><label>My Label</label></RangeSet></rangeSet><supportedCRSs><requestResponseCRSs>EPSG:28992</requestResponseCRSs><requestResponseCRSs>EPSG:900913</requestResponseCRSs><requestResponseCRSs>EPSG:3857</requestResponseCRSs><requestResponseCRSs>EPSG:4326</requestResponseCRSs><nativeCRSs>EPSG:28992</nativeCRSs></supportedCRSs><supportedFormats><formats>GTiff</formats></supportedFormats><supportedInterpolations default="nearest neighbor"><interpolationMethod>nearest neighbor</interpolationMethod><interpolationMethod>bilinear</interpolationMethod></supportedInterpolations></CoverageOffering><CoverageOffering><name>ro_dsm_mini</name><label>ro_dsm_mini</label><lonLatEnvelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84"><gml:pos>4.47489346945755 51.9159453786927</gml:pos><gml:pos>4.47687824892444 51.9170706688033</gml:pos></lonLatEnvelope><domainSet><spatialDomain><gml:Envelope srsName="EPSG:4326"><gml:pos>4.47489346945755 51.9159453786927</gml:pos><gml:pos>4.47687824892444 51.9170706688033</gml:pos></gml:Envelope><gml:Envelope srsName="EPSG:28992"><gml:pos>92213 436671.5</gml:pos><gml:pos>92348 436795</gml:pos></gml:Envelope><gml:RectifiedGrid dimension="2"><gml:limits><gml:GridEnvelope><gml:low>0 0</gml:low><gml:high>269 246</gml:high></gml:GridEnvelope></gml:limits><gml:axisName>x</gml:axisName><gml:axisName>y</gml:axisName><gml:origin><gml:pos>92213 436795</gml:pos></gml:origin><gml:offsetVector>0.5 0</gml:offsetVector><gml:offsetVector>0 -0.5</gml:offsetVector></gml:RectifiedGrid></spatialDomain></domainSet><rangeSet><RangeSet><name>Range 1</name><label>My Label</label></RangeSet></rangeSet><supportedCRSs><requestResponseCRSs>EPSG:28992</requestResponseCRSs><requestResponseCRSs>EPSG:900913</requestResponseCRSs><requestResponseCRSs>EPSG:3857</requestResponseCRSs><requestResponseCRSs>EPSG:4326</requestResponseCRSs><nativeCRSs>EPSG:28992</nativeCRSs></supportedCRSs><supportedFormats><formats>GTiff</formats></supportedFormats><supportedInterpolations default="nearest neighbor"><interpolationMethod>nearest neighbor</interpolationMethod><interpolationMethod>bilinear</interpolationMethod></supportedInterpolations></CoverageOffering><CoverageOffering><name>ro_irra</name><label>ro_irra</label><lonLatEnvelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84"><gml:pos>4.471333734139 51.912813427383</gml:pos><gml:pos>4.4808508475645 51.9248713705576</gml:pos></lonLatEnvelope><domainSet><spatialDomain><gml:Envelope srsName="EPSG:4326"><gml:pos>4.471333734139 51.912813427383</gml:pos><gml:pos>4.4808508475645 51.9248713705576</gml:pos></gml:Envelope><gml:Envelope srsName="EPSG:28992"><gml:pos>91979 436326</gml:pos><gml:pos>92617 437659.5</gml:pos></gml:Envelope><gml:RectifiedGrid dimension="2"><gml:limits><gml:GridEnvelope><gml:low>0 0</gml:low><gml:high>1275 2666</gml:high></gml:GridEnvelope></gml:limits><gml:axisName>x</gml:axisName><gml:axisName>y</gml:axisName><gml:origin><gml:pos>91979 437659.5</gml:pos></gml:origin><gml:offsetVector>0.5 0</gml:offsetVector><gml:offsetVector>0 -0.5</gml:offsetVector></gml:RectifiedGrid></spatialDomain></domainSet><rangeSet><RangeSet><name>Range 1</name><label>My Label</label></RangeSet></rangeSet><supportedCRSs><requestResponseCRSs>EPSG:28992</requestResponseCRSs><requestResponseCRSs>EPSG:900913</requestResponseCRSs><requestResponseCRSs>EPSG:3857</requestResponseCRSs><requestResponseCRSs>EPSG:4326</requestResponseCRSs><nativeCRSs>EPSG:28992</nativeCRSs></supportedCRSs><supportedFormats><formats>GTiff</formats></supportedFormats><supportedInterpolations default="nearest neighbor"><interpolationMethod>nearest neighbor</interpolationMethod><interpolationMethod>bilinear</interpolationMethod></supportedInterpolations></CoverageOffering><CoverageOffering><name>ro_irra_ext</name><label>ro_irra_ext</label><lonLatEnvelope srsName="urn:ogc:def:crs:OGC:1.3:CRS84"><gml:pos>4.10024171314823 51.9359764992844</gml:pos><gml:pos>4.21909054278063 52.001415228243</gml:pos></lonLatEnvelope><domainSet><spatialDomain><gml:Envelope srsName="EPSG:4326"><gml:pos>4.10024171314823 51.9359764992844</gml:pos><gml:pos>4.21909054278063 52.001415228243</gml:pos></gml:Envelope><gml:Envelope srsName="EPSG:28992"><gml:pos>66606.5 439287.5</gml:pos><gml:pos>74653.5 446432.5</gml:pos></gml:Envelope><gml:RectifiedGrid dimension="2"><gml:limits><gml:GridEnvelope><gml:low>0 0</gml:low><gml:high>16093 14289</gml:high></gml:GridEnvelope></gml:limits><gml:axisName>x</gml:axisName><gml:axisName>y</gml:axisName><gml:origin><gml:pos>66606.5 446432.5</gml:pos></gml:origin><gml:offsetVector>0.5 0</gml:offsetVector><gml:offsetVector>0 -0.5</gml:offsetVector></gml:RectifiedGrid></spatialDomain></domainSet><rangeSet><RangeSet><name>Range 1</name><label>My Label</label></RangeSet></rangeSet><supportedCRSs><requestResponseCRSs>EPSG:28992</requestResponseCRSs><requestResponseCRSs>EPSG:900913</requestResponseCRSs><requestResponseCRSs>EPSG:3857</requestResponseCRSs><requestResponseCRSs>EPSG:4326</requestResponseCRSs><nativeCRSs>EPSG:28992</nativeCRSs></supportedCRSs><supportedFormats><formats>GTiff</formats></supportedFormats><supportedInterpolations default="nearest neighbor"><interpolationMethod>nearest neighbor</interpolationMethod><interpolationMethod>bilinear</interpolationMethod></supportedInterpolations></CoverageOffering></CoverageDescription>' ;
26
26
27
- // var res = parser.read(text);
27
+ var res = parser . read ( text ) ;
28
+
29
+ debugger
28
30
29
31
// t.ok(!res.error, "Parsing XML generated no errors");
30
32
// t.eq(res.service.fees, "mucho dinero", "Service>Fees correctly parsed");
80
82
var metadata = res . coverageDescriptions . ro_dsm ;
81
83
82
84
t . eq ( metadata . identifier , "ro_dsm" , "correct identifier" ) ;
85
+ t . eq ( metadata . title , "ro dsm" , "correct title" ) ;
83
86
t . eq ( metadata . abstract , "Digital Surface Model (DSM) raster data set of inner city Rotterdam" , "correct abstract" ) ;
84
87
t . eq ( metadata . supportedCRSs . length , 4 , "correct number of supported CRSs" ) ;
85
88
t . eq ( metadata . supportedCRSs [ 3 ] , "urn:ogc:def:crs:EPSG::4326" , "correct value for selected supported CRS" ) ;
You can’t perform that action at this time.
0 commit comments