Ok...
I think I am getting to the bottom of the problem...
The URL I am calling is:
http://localhost:8080/geoserver/wms?bbox=-180,-90,180,90&styles=densityLayer
&Format=image/png&request=GetMap&layers=gbif:gbifDensityLayer&width=550&heig
ht=250&srs=EPSG:4326&bgcolor=0x000000
Note the BBox is global.
The SLD is posted at the end of this message
When I only have 1 SLD rule defined in URL, the datastore receives the
following Filter:
[[ geom bbox POLYGON ((-180 -90, -180 90, 180 90, 180 -90, -180 -90)) ] AND
[ geometryType([geom]) = Polygon ]]
This seems fine and it works perfectly.
Then when I have both rules active (see SLD at end), the filter is passed
through to the datastore:
[[ geom bbox POLYGON ((-183.92727272727274 -94.32, -183.92727272727274
94.32, 183.92727272727274 94.32, 183.92727272727274 -94.32,
-183.92727272727274 -94.32)) ] AND
[[ geometryType([geom]) = Polygon ] OR [ geometryType([geom]) = Point ]]]
My datastore is barfing at this...
Feature or bug?
Thanks Tim
And now the SLD:
<Rule>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Function name="geometryType">
<ogc:PropertyName>geom</ogc:PropertyName>
</ogc:Function>
<ogc:Literal>Polygon</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">
<ogc:Literal>#0000ff</ogc:Literal>
</CssParameter>
<CssParameter name="fill-opacity">
<ogc:Literal>0.9</ogc:Literal>
</CssParameter>
</Fill>
</PolygonSymbolizer>
</Rule>
<Rule>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Function name="geometryType">
<ogc:PropertyName>geom</ogc:PropertyName>
</ogc:Function>
<ogc:Literal>Point</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter
name="fill">#00ff00</CssParameter>
<CssParameter
name="fill-opacity">1.0</CssParameter>
</Fill>
</Mark>
<Size>6</Size>
</Graphic>
</PointSymbolizer>
</Rule>
-----Original Message-----
From: geoserver-users-bounces@lists.sourceforge.net
[mailto:geoserver-users-bounces@lists.sourceforge.net] On Behalf Of Tim
Robertson
Sent: Monday, September 10, 2007 1:26 PM
To: 'geoserver users'
Subject: [Geoserver-users] Filters in SLD
Hi all,
I am trying to use 2 rules in SLD and having difficulty.
Is the literal value here correct? It is case sensitive right?
They don't work as they stand :o(
Thanks
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Function name="geometryType">
<ogc:PropertyName>geom</ogc:PropertyName>
</ogc:Function>
<ogc:Literal>POINT</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
...
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:Function name="geometryType">
<ogc:PropertyName>geom</ogc:PropertyName>
</ogc:Function>
<ogc:Literal>POLYGON</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users