[OpenLayers-Dev] OpenLayers SLD formatting question

Paul Dziemiela paul at dziemiela.com
Sat Aug 29 12:24:07 EDT 2009


Hi folks,

Been putting together a SLD library system and wanting to use the results in
OpenLayers.  From what I see the singular expectation of OpenLayers is that
SLD documents will follow the structure of

<sld:StyledLayerDescriptor ... >
   <sld:NamedLayer>
      <sld:Name>Foo</sld:Name>
      <sld:UserStyle>
         <sld:Name>Swamp</sld:Name>
         <sld:FeatureTypeStyle>
            <sld:Rule>
...

However, the SLDs produced by the recent version of uDig(1.1.1) instead
create structures like

<sld:StyledLayerDescriptor ...>
   <sld:UserLayer>
      <sld:LayerFeatureConstraints>
         <sld:FeatureTypeConstraint />
      </sld:LayerFeatureConstraints>
      <sld:UserStyle>
         <sld:Name>Swamp</sld:Name>
         <sld:FeatureTypeStyle>
            <sld:Rule>

I'm wondering if the current OpenLayers design is intended to be the only
way to parse SLDs or if it's just a case of needing someone to do the work
to accept other formats?  The uDig SLD should have some kind of name applied
to the UserLayer I think.

Seems like the SLD development in general has slowed to some degree of late.
Has anything further come of Andreas Hocevar's work via 1531?
http://trac.openlayers.org/ticket/1531
I particularly like the idea of adding in the FeatureTypeStyle logic into
the OpenLayers style object.  It would be helpful to be able to target
particular style rule sets onto particular geometry types.  

I rummaged around but I can't see a way to set an ogc:filter to restrict by
geometry type.  Or is that wrong?  Can the filter refer to the feature's
geometry's CLASS_NAME?  Or could I move the CLASS_NAME into a feature
attribute called "GTYPE" or such?

OpenLayers is great work.
Thanks,

Paul









______________________________________________________________________
This email was scanned by MessageLabs
_____________________________________________________________________




More information about the Dev mailing list