I am trying to use sld to style a GeometryCollection using Openlayers.

The collection contains a point, a line and a polygon.

My data is coming back properly, but I do not know how to get the SLD to apply 
to each geometry member within the data.  At present, only the first member (in 
this case the polygon) is being rendered.

Any help is greatly appreciated.

If this question is more appropriate for another mail list, please let me know.

The data in GML:
<?xml version="1.0" encoding="UTF-8"?>
<wfs:FeatureCollection xmlns="http://www.opengis.net/wfs"; 
xmlns:wfs="http://www.opengis.net/wfs"; 
xmlns:afics="http://www.issinc.com/afics"; 
xmlns:gml="http://www.opengis.net/gml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://www.opengis.net/wfs 
http://localhost:7001/geoserver/schemas/wfs/1.0.0/WFS-basic.xsd 
http://www.issinc.com/afics 
http://localhost:7001/geoserver/wfs?service=WFS&amp;version=1.0.0&amp;request=DescribeFeatureType&amp;typeName=afics%3ABaseEvent";>
  <gml:boundedBy>
    <gml:null>unknown</gml:null>
  </gml:boundedBy>
  <gml:featureMember>
    <afics:BaseEvent fid="48272194">
      <afics:location>POINT (-76.35878 37.092896)</afics:location>
      <afics:typeId>72</afics:typeId>
      <afics:location>
        <gml:Point srsName="http://www.opengis.net/gml/srs/epsg.xml#4326";>
          <gml:coordinates xmlns:gml="http://www.opengis.net/gml"; decimal="." 
cs="," ts=" ">-76.35878,37.092896</gml:coordinates>
        </gml:Point>
      </afics:location>
      <afics:primaryGeometry>
        <gml:GeometryCollection 
srsName="http://www.opengis.net/gml/srs/epsg.xml#4326";>
          <gml:geometryMember>
            <gml:Polygon>
              <gml:outerBoundaryIs>
                <gml:LinearRing>
                  <gml:coordinates xmlns:gml="http://www.opengis.net/gml"; 
decimal="." cs="," ts=" ">-76.35795709,37.092896 -76.35796105,37.09297666 
-76.3579729,37.09305654 -76.35799252,37.09313488 -76.35801973,37.09321091 
-76.35805426,37.09328392 -76.35809578,37.09335318 -76.35814388,37.09341805 
-76.35819811,37.09347789 -76.35825795,37.09353212 -76.35832282,37.09358022 
-76.35839208,37.09362174 -76.35846509,37.09365627 -76.35854112,37.09368348 
-76.35861946,37.0937031 -76.35869934,37.09371495 -76.35878,37.09371891 
-76.35886066,37.09371495 -76.35894054,37.0937031 -76.35901888,37.09368348 
-76.35909491,37.09365627 -76.35916792,37.09362174 -76.35923718,37.09358022 
-76.35930205,37.09353212 -76.35936189,37.09347789 -76.35941612,37.09341805 
-76.35946422,37.09335318 -76.35950574,37.09328392 -76.35954027,37.09321091 
-76.35956748,37.09313488 -76.3595871,37.09305654 -76.35959895,37.09297666 
-76.35960291,37.092896 -76.35959895,37.09281534 -76.3595871,37.09273546 
-76.35956748,37.09265712 -76.35954027,37.09258109 -76.35950574,37.09250808 
-76.35946422,37.09243882 -76.35941612,37.09237395 -76.35936189,37.09231411 
-76.35930205,37.09225988 -76.35923718,37.09221178 -76.35916792,37.09217026 
-76.35909491,37.09213573 -76.35901888,37.09210852 -76.35894054,37.0920889 
-76.35886066,37.09207705 -76.35878,37.09207309 -76.35869934,37.09207705 
-76.35861946,37.0920889 -76.35854112,37.09210852 -76.35846509,37.09213573 
-76.35839208,37.09217026 -76.35832282,37.09221178 -76.35825795,37.09225988 
-76.35819811,37.09231411 -76.35814388,37.09237395 -76.35809578,37.09243882 
-76.35805426,37.09250808 -76.35801973,37.09258109 -76.35799252,37.09265712 
-76.3579729,37.09273546 -76.35796105,37.09281534 
-76.35795709,37.092896</gml:coordinates>
                </gml:LinearRing>
              </gml:outerBoundaryIs>
            </gml:Polygon>
          </gml:geometryMember>
          <gml:geometryMember>
            <gml:Point>
              <gml:coordinates xmlns:gml="http://www.opengis.net/gml"; 
decimal="." cs="," ts=" ">-76.36506,37.082882</gml:coordinates>
            </gml:Point>
          </gml:geometryMember>
          <gml:geometryMember>
            <gml:LineString>
              <gml:coordinates xmlns:gml="http://www.opengis.net/gml"; 
decimal="." cs="," ts=" ">-76.36506,37.082882 
-76.35878,37.092896</gml:coordinates>
            </gml:LineString>
          </gml:geometryMember>
        </gml:GeometryCollection>
      </afics:primaryGeometry>
    </afics:BaseEvent>
  </gml:featureMember>
</wfs:FeatureCollection>


the SLD:
<?xml version="1.0" encoding="UTF-8"?>
<StyledLayerDescriptor
  version="1.0.0"
  xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd"
  xmlns="http://www.opengis.net/sld";
  xmlns:ogc="http://www.opengis.net/ogc";
  xmlns:xlink="http://www.w3.org/1999/xlink";
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <NamedLayer>
    <Name> Base Events </Name>
    <UserStyle>
      <FeatureTypeStyle>
        <FeatureTypeName>Feature</FeatureTypeName>
        <!-- ************************************************************** -->
        <Rule>
          <PointSymbolizer>
            <Fill>
              <CssParameter 
name="fill"><ogc:Literal>#FF0000</ogc:Literal></CssParameter>
              <CssParameter 
name="fill-opacity"><ogc:Literal>0.3</ogc:Literal></CssParameter>
            </Fill>
            <Stroke>
              <CssParameter 
name="stroke"><ogc:Literal>#FF0000</ogc:Literal></CssParameter>
              <CssParameter name="stroke-width">3</CssParameter>
            </Stroke>
          </PointSymbolizer>
          <PolygonSymbolizer>
            <Fill>
              <CssParameter 
name="fill"><ogc:Literal>#FF0000</ogc:Literal></CssParameter>
              <CssParameter 
name="fill-opacity"><ogc:Literal>0.3</ogc:Literal></CssParameter>
            </Fill>
            <Stroke>
              <CssParameter 
name="stroke"><ogc:Literal>#FF0000</ogc:Literal></CssParameter>
              <CssParameter name="stroke-width">3</CssParameter>
            </Stroke>
          </PolygonSymbolizer>
          <LineSymbolizer>
            <Stroke>
              <CssParameter 
name="stroke"><ogc:Literal>#000000</ogc:Literal></CssParameter>
              <CssParameter name="stroke-width">4</CssParameter>
            </Stroke>
          </LineSymbolizer>
        </Rule>
      </FeatureTypeStyle>
    </UserStyle>
  </NamedLayer>
</StyledLayerDescriptor>




Mike Hampton
Senior Software Engineer
Intelligent Software Solutions<http://www.issinc.com/>
5450 Tech Center Drive
Colorado Springs, CO 80919-2341
Office: 719.234.0655
US Cell: 719.440.4889
Yahoo IM: javamike9
AOL IM: javamike9
Gmail: 
mike.hampton.issinc....@gmail.com<mailto:mike.hampton.issinc....@gmail.com>
Skype: mike.hampton.issinc.com
------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to