On Thu, Jun 25, 2009 at 01:53:47PM +0200, Andreas Hocevar wrote: > On Wed, Jun 24, 2009 at 4:03 PM, Trond Michelsen > <trondmm-openlay...@crusaders.no> wrote: >> Personally, I'd prefer to use the same structure and property names >> for 1.1.1 and 1.3.0 objects. > Definitely. Like we create the same vector features in Format.GML, > Format.KML, Format.GeoRSS and so on.
Good. I've opened ticket 2151 and submitted a patch that adds parsing of SRS, BoundingBox, Dimension and Extent for v1.1.1 and v1.1.0. Tests are included. For some reason, trac won't show my patches, they have to be downloaded. I think everything works properly, and that I got the inheritance rules right. Reviews are welcomed ;) There's a couple of things I am a bit unsure of, though. The WMS 1.1.1 standard says this about Dimension: --8<-- Dimension declarations are inherited from parent Layers. Any new Dimension declarations in the child are added to the list inherited from the parent. A child shall not redefine a Dimension with the same name attribute as one that was inherited. --8<-- I understand this as it is forbidden for a child layer to include <Dimension name="elevation"> if this tag is present in the parent layer. However, in the sample capabilities document in Annex A.2 (also available at http://schemas.opengis.net/wms/1.1.1/capabilities_1_1_1.xml ) there are layers like this (irrelevant tags and layers removed): <Layer queryable="1"> <Title>Weather Forecast Data</Title> <Dimension name="time" units="ISO8601" /> <Extent name="time" default="2000-08-22">1999-01-01/2000-08-22/P1D</Extent> <Layer> <Name>Pressure</Name> <Title>Forecast barometric pressure</Title> <Dimension name="time" units="ISO8601" /> <Dimension name="elevation" units="EPSG:5030" /> <Extent name="time" default="2000-08-22">1999-01-01/2000-08-22/P1D</Extent> <Extent name="elevation" default="0" nearestValue="1">0,1000,3000,5000,10000</Extent> </Layer> </Layer> and that confuses me a bit. Same thing with Extent. Here's what the standard says: --8<-- Extent declarations are inherited from parent Layers. Any Extent declarations in the child with the same name attribute as one inherited from the parent replaces the value declared by the parent. A Layer shall not declare an Extent unless a Dimension with the same name has been declared or inherited earlier in the Capabilities XML. --8<-- Which I take to mean that either the layer itself has to define the named dimension the Extent uses, or it must have been defined by any of the layer's ancestors. But again, the example includes a layer that contradicts this: <Layer opaque="1" noSubsets="1" fixedWidth="512" fixedHeight="256"> <Name>ozone_image</Name> <Title>Global ozone distribution (1992)</Title> <LatLonBoundingBox minx="-180" miny="-90" maxx="180" maxy="90"/> <Extent name="time" default="1992">1992</Extent> </Layer> There is a parent layer, but that does not define any dimensions. The dimension is defined by its sibling, however. But, the way I understand the standard, this isn't good enough, and my patch will simply ignore the extent for this layer. I do think it's odd that the sample capabilities document violates the standard, though, so I'm a little bit confused. v1.1.0 was a lot vaguer on this subject, and the v1.1.0 sample document is practically identical to the v1.1.1 document. My best guess is that they decided to clarify this issue in v1.1.1, and didn't check if this affected the sample document. As <Dimension> and <Extent> was merged in v1.3.0, none of these issues are relevant for that version. -- Trond Michelsen _______________________________________________ Dev mailing list Dev@openlayers.org http://openlayers.org/mailman/listinfo/dev