Simon Sandlund created GEOS-4923:
------------------------------------
Summary: SCALE parameter not working properly getLegendGraphic
Key: GEOS-4923
URL: https://jira.codehaus.org/browse/GEOS-4923
Project: GeoServer
Issue Type: Bug
Components: WMS
Affects Versions: 2.1.3
Reporter: Simon Sandlund
Assignee: Andrea Aime
Priority: Minor
Example: I have a layer and a style with 2 rules.
Rule 1 has a MinScaleDenominator of 1 and a MaxScaleDenominator of 7500.
Rule 2 has a MinScaleDenominator of 7500 and a MaxScaleDenominator of 22500.
A GetLegendGraphic request with SCALE set to 7500 gives me graphics for BOTH
rules, but MaxScaleDenominator is supposed to be exclusive.
Glancing at the code (I haven't stepped through it), I believe the bug might be
found in LegendUtils's isWithinScale which has the expression:
{code}
return (scaleDenominator == -1)
|| (((r.getMinScaleDenominator() -
BufferedImageLegendGraphicBuilder.TOLERANCE) <= scaleDenominator)
&& ((r.getMaxScaleDenominator() +
BufferedImageLegendGraphicBuilder.TOLERANCE) > scaleDenominator));
{code}
The operators are correct, but thanks to the tolerance, if
r.getMaxScaleDenominator() == scaleDenominator, this will still return true. My
naïve guess would be to remove the tolerance. I couldn't find how it's done
when actually rendering the layer... it should be done in the same way I
suppose.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Ridiculously easy VDI. With Citrix VDI-in-a-Box, you don't need a complex
infrastructure or vast IT resources to deliver seamless, secure access to
virtual desktops. With this all-in-one solution, easily deploy virtual
desktops for less than the cost of PCs and save 60% on VDI infrastructure
costs. Try it free! http://p.sf.net/sfu/Citrix-VDIinabox
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel