[OpenLayers-Dev] WMSCapabilities - properties and handling different versions

Trond Michelsen trondmm-openlayers at crusaders.no
Wed Jun 24 10:03:57 EDT 2009


Hi.

I'm currently looking into parsing of WMSCapabilities, and there are a
few things I'm not completely sure on how to handle.

Besically it boils down to how close the WMSCapability data structure
should resemble the actual XML. Should it be as close to the XML as
possible, or is it desirable for v1_1_1.js and a future v_1_3_0.js to
return identical structures?

Example: In v1.1.1, There are two tags, Dimension and Extent. In
v1.3.0, these tags has been merged to one tag "Dimension". 

In v.1.1.1 it'll look like this:

<Dimension name="TIME" units="ISO8601"/>
<Extent name="TIME" nearestValue="0" default="2009-06-21T12:00">
  2009-06-21T06:00,2009-06-21T12:00,2009-06-21T18:00,2009-06-22T00:00,2009-06-22T06:00
</Extent>

and in v1.3.0 it'll look like this:

<Dimension name="TIME" units="ISO8601" nearestValue="0" default="2009-06-21T12:00">
  2009-06-21T06:00,2009-06-21T12:00,2009-06-21T18:00,2009-06-22T00:00,2009-06-22T06:00
</Dimension>

All attributes from Dimension and Extent has been kept, and Dimension
now takes the same values as the Extent tag did.

What should the data structure for v1.1.1 look like in the object?

{ dimension: {time: {name: "time",
                     units: "ISO8601"},
             },
  extent:    {time: {name: "time",
                     nearestValue: "0", 
                     default="2009-06-21T12:00", 
                     values: ["2009-06-21T06:00",
                              "2009-06-21T12:00",
                              "2009-06-21T18:00",
                              "2009-06-22T00:00",
                              "2009-06-22T06:00"]},
              }
}
                     
or simply: 

{ dimension: {time: {name: "time",
                     units: "ISO8601"},
                     nearestValue: "0", 
                     default="2009-06-21T12:00", 
                     values: ["2009-06-21T06:00",
                              "2009-06-21T12:00",
                              "2009-06-21T18:00",
                              "2009-06-22T00:00",
                              "2009-06-22T06:00"]},
              }
}
                     
Other tags have changed names, but as far as I can tell, the content
is the same:

LatLonBoundingBox -> EX_GeographicBoundingBox
SRS -> CRS
(also the BoundingBox attribute SRS has changed name to CRS)

Should these get new properties in the WMSCapabilities-layer object,
or is it OK to still use the old property names?

Personally, I'd prefer to use the same structure and property names
for 1.1.1 and 1.3.0 objects. 

Any opinions?

-- 
Trond Michelsen



More information about the Dev mailing list