Brad, Thanks for responding. 

 

There was a forward slash in one of the closing <And> tags but that was only
in the email copy.

 

My problem is the syntax of the Filter. The first part of the filter tests
for attributes to not be zero - that's fine.

 

Then I test for the lower bounds of the percentage value the two attributes.
The second one tests for the upper bounds. 

 

If I comment out the second (upper) bounds the first one gives me all
polygons above 30%, but I also want to test for the upper bounds and when I
uncomment that it gives me no results at all and the same goes if I comment
out the first lower bounds test only. 

 

There must be something wrong with the second bounds test <
PropertyIsLessThanOrEqualTo > but I just cannot see it.

 

Can you just look at the filter for me please.

 

Cheers, Brad..

 

 

 

 

 

From: Brad Hards <br...@frogmouth.net> 
Sent: 26 March 2020 17:59
To: 'Brad Spencer' <b...@numaps.com.au>;
geoserver-users@lists.sourceforge.net
Subject: RE: [Geoserver-users] SLD on Geoserver

 

What were you expecting to see, and what are you seeing instead?

 

Brad

 

From: Brad Spencer <b...@numaps.com.au <mailto:b...@numaps.com.au> > 
Sent: Thursday, 26 March 2020 5:48 PM
To: geoserver-users@lists.sourceforge.net
<mailto:geoserver-users@lists.sourceforge.net> 
Subject: [Geoserver-users] SLD on Geoserver

 

Guys, I have the following SLD that is just not rendering correctly. 

 

Can someone look over this and advise if this does not make any sense.

 

Cheers, Brad.

 

<?xml version="1.0" encoding="UTF-8"?><StyledLayerDescriptor version="1.0.0"
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";
xsi:schemaLocation="http://www.opengis.net/sld StyledLayerDescriptor.xsd
<http://www.opengis.net/sld%20StyledLayerDescriptor.xsd> "><NamedLayer>

<Name>undefined</Name>

<UserStyle>

<Title>braddles tester7</Title>

<Name>braddles tester7</Name>

<FeatureTypeStyle>

<Rule>

              <Name>Stress Between 30% and 80%</Name>

              <Filter>

                             <And>

                                           <And>

<!-make sure that the attributes are not zero to avoid zero divide -->

 
<PropertyIsGreaterThan>

 
<Mul>

 
<PropertyName>median_tot_hhd_inc_weekly</PropertyName>

 
<Literal>4.33333333</Literal>

 
</Mul>

 
<Literal>0.0</Literal>

 
</PropertyIsGreaterThan>

 
<PropertyIsGreaterThan>

 
<PropertyName>median_mortgage_repay_monthly</PropertyName>

 
<Literal>0.0</Literal>

 
</PropertyIsGreaterThan>

                                           </And>

                                           <And>

                                                          <!-given no zero
divides, include all polygons that have a mortgage stress greater than 30%
AND less than 80%-->

 
<PropertyIsGreaterThanOrEqualTo>

 
<Mul>

 
<Div>

 
<PropertyName>median_mortgage_repay_monthly</PropertyName>

 
<Mul>

 
<PropertyName>median_tot_hhd_inc_weekly</PropertyName>

 
<Literal>4.33333333</Literal>

 
</Mul>

 
</Div>

 
<Literal>100</Literal>

 
</Mul>

 
<Literal>30</Literal>

 
</PropertyIsGreaterThanOrEqualTo>

 
<PropertyIsLessThanOrEqualTo>

 
<Mul>

 
<Div>

 
<PropertyName>median_mortgage_repay_monthly</PropertyName>

 
<Mul>

 
<PropertyName>median_tot_hhd_inc_weekly</PropertyName>

 
<Literal>4.33333333</Literal>

 
</Mul>

 
</Div>

 
<Literal>100</Literal>

 
</Mul>

 
<Literal>80</Literal>

 
</PropertyIsLessThanOrEqualTo>

                                           </And>

                             </And>

              </Filter>

 

              <PolygonSymbolizer>

                             <Fill>

                                           <CssParameter
name='fill'>#FF0000</CssParameter>

                                           <CssParameter
name='fill-opacity'>1</CssParameter>

                             </Fill>

              </PolygonSymbolizer>

              <PolygonSymbolizer>

                             <Stroke>

                                           <CssParameter
name='stroke'>#000000</CssParameter>

                                           <CssParameter
name='stroke-width'>1</CssParameter>

                                           <CssParameter
name='stroke-opacity'>1</CssParameter>

                             </Stroke>

              </PolygonSymbolizer>

</Rule>

</FeatureTypeStyle>

</UserStyle>

</NamedLayer>

</StyledLayerDescriptor>

 

Brad Spencer

Managing Director



 <http://www.numaps.com.au/> http://www.numaps.com.au/

mob: 0404 841 131

 <https://www.facebook.com/pg/numaps.com.au/photos/?ref=page_internal>
BradArt

 

 

 

 

_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to