Hi
I'm having real problems getting the <MaxScale> SLD tag to work within my SLDs on GeoServer. They dont want to work with Filters. Is there a specific way they should be put together or is this just a 'feature'? Any advice gratefully accepted.
My example SLD is below (still cant get Geoserver to validate it either!)
Rob
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<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 http://schemas.opengeospatial.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<Name>SLD</Name>
<Title>SLD for my project</Title>
<NamedLayer>
<Name>Lines</Name>
<UserStyle>
<Name>LineStyle</Name>
<Title>Set of rules to style the two line features</Title>
<IsDefault>1</IsDefault>
<FeatureTypeStyle>
<Rule>
<Name>Road</Name>
<Title>Road</Title>
<MaxScaleDenominator>25000</MaxScaleDenominator>
<LineSymbolizer> <Stroke>
<CssParameter name="stroke">#ff0000</CssParameter>
<CssParameter name="stroke-width">0.07</CssParameter>
</Stroke>
</LineSymbolizer>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>1</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</Rule>
<Rule>
<Name>Rail</Name>
<Title>Rail</Title>
<MaxScaleDenominator>40000</MaxScaleDenominator>
<LineSymbolizer> <Stroke>
<CssParameter name="stroke">#333333</CssParameter>
<CssParameter name="stroke-width">0.07</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Why is GeoServer not validating it? What errors does it give? And what version of GeoServer are you using? I'm pretty sure scales are supposed to work with filters...
You've confirmed the same SLD will work if there is just a maxscale with no filter, and just a filter with no maxscale?
Chris
Rob Booth wrote:
Hi
I'm having real problems getting the <MaxScale> SLD tag to work within my SLDs on GeoServer. They dont want to work with Filters. Is there a specific way they should be put together or is this just a 'feature'? Any advice gratefully accepted.
My example SLD is below (still cant get Geoserver to validate it either!)
Rob
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<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 http://schemas.opengeospatial.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<Name>SLD</Name>
<Title>SLD for my project</Title>
<NamedLayer>
<Name>Lines</Name>
<UserStyle>
<Name>LineStyle</Name>
<Title>Set of rules to style the two line features</Title>
<IsDefault>1</IsDefault>
<FeatureTypeStyle>
<Rule>
<Name>Road</Name>
<Title>Road</Title>
<MaxScaleDenominator>25000</MaxScaleDenominator>
<LineSymbolizer> <Stroke>
<CssParameter name="stroke">#ff0000</CssParameter>
<CssParameter name="stroke-width">0.07</CssParameter>
</Stroke>
</LineSymbolizer>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>1</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</Rule>
<Rule>
<Name>Rail</Name>
<Title>Rail</Title>
<MaxScaleDenominator>40000</MaxScaleDenominator>
<LineSymbolizer> <Stroke>
<CssParameter name="stroke">#333333</CssParameter>
<CssParameter name="stroke-width">0.07</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
--
Chris Holmes
The Open Planning Project
http://topp.openplans.org
Apologies all - I've fixed that issue now. It was only user error
Rob
Chris Holmes wrote:
Why is GeoServer not validating it? What errors does it give? And what version of GeoServer are you using? I'm pretty sure scales are supposed to work with filters...
You've confirmed the same SLD will work if there is just a maxscale with no filter, and just a filter with no maxscale?
Chris
Rob Booth wrote:
Hi
I'm having real problems getting the <MaxScale> SLD tag to work within my SLDs on GeoServer. They dont want to work with Filters. Is there a specific way they should be put together or is this just a 'feature'? Any advice gratefully accepted.
My example SLD is below (still cant get Geoserver to validate it either!)
Rob
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<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 http://schemas.opengeospatial.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<Name>SLD</Name>
<Title>SLD for my project</Title>
<NamedLayer>
<Name>Lines</Name>
<UserStyle>
<Name>LineStyle</Name>
<Title>Set of rules to style the two line features</Title>
<IsDefault>1</IsDefault>
<FeatureTypeStyle>
<Rule>
<Name>Road</Name>
<Title>Road</Title>
<MaxScaleDenominator>25000</MaxScaleDenominator>
<LineSymbolizer> <Stroke>
<CssParameter name="stroke">#ff0000</CssParameter>
<CssParameter name="stroke-width">0.07</CssParameter>
</Stroke>
</LineSymbolizer>
<ogc:Filter>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>TYPE</ogc:PropertyName>
<ogc:Literal>1</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
</Rule>
<Rule>
<Name>Rail</Name>
<Title>Rail</Title>
<MaxScaleDenominator>40000</MaxScaleDenominator>
<LineSymbolizer> <Stroke>
<CssParameter name="stroke">#333333</CssParameter>
<CssParameter name="stroke-width">0.07</CssParameter>
</Stroke>
</LineSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel
On 5/16/06, Rob Booth <rob_booth@...725...> wrote:
Apologies all - I've fixed that issue now. It was only user error
Rob
We will all be very glad if you post your working example on the wiki:
http://docs.codehaus.org/display/GEOSDOC/SLD+Snippets
The parent page may have a better named link for your example,
depending on what you do in your SLD:
http://docs.codehaus.org/display/GEOSDOC/SLD+Explanations+and+Samples
Alex