David Persson ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5d1da949ca72d00d24ba0d63
 ) *created* an issue

GeoServer ( 
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiYTAwZTk2NWE4OWExNGQ5MTk5NjM3MTU2MjAzODI3NTIiLCJwIjoiaiJ9
 ) / Bug ( 
https://osgeo-org.atlassian.net/browse/GEOS-9556?atlOrigin=eyJpIjoiYTAwZTk2NWE4OWExNGQ5MTk5NjM3MTU2MjAzODI3NTIiLCJwIjoiaiJ9
 ) GEOS-9556 ( 
https://osgeo-org.atlassian.net/browse/GEOS-9556?atlOrigin=eyJpIjoiYTAwZTk2NWE4OWExNGQ5MTk5NjM3MTU2MjAzODI3NTIiLCJwIjoiaiJ9
 ) maxScaleDenominator isn't exclusive ( 
https://osgeo-org.atlassian.net/browse/GEOS-9556?atlOrigin=eyJpIjoiYTAwZTk2NWE4OWExNGQ5MTk5NjM3MTU2MjAzODI3NTIiLCJwIjoiaiJ9
 )

Issue Type: Bug Affects Versions: 2.16.2 Assignee: Unassigned Created: 
30/Mar/20 6:17 PM Priority: Medium Reporter: David Persson ( 
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5d1da949ca72d00d24ba0d63
 )

https://docs.geoserver.org/latest/en/user/styling/sld/reference/rules.html 
states that scales can overlap between levels because the maxScaleDenominator 
is exclusive and the minScaleDenominator is inclusive.

That given
<Rule>
<Name>zoom_lvl_4</Name>
<MinScaleDenominator>100000</MinScaleDenominator>
<MaxScaleDenominator>200000</MaxScaleDenominator>
<PointSymbolizer>
<Graphic>
<ExternalGraphic>
<OnlineResource xlink:type="simple" xlink:href="svg/bad.svg"
/>
<Format>image/svg+xml</Format>
</ExternalGraphic>
<Size>
<ogc:Literal>20</ogc:Literal>
</Size>
</Graphic>
</PointSymbolizer>
</Rule>

<Rule>
<Name>zoom_lvl_5</Name>
<MinScaleDenominator>50000</MinScaleDenominator>
<MaxScaleDenominator>100000</MaxScaleDenominator>
<PointSymbolizer>

wms?service=WMS&version=1.1.0&request=GetLegendGraphic&layer=layer&format=image/png&scale=100000
 should return only the zoom_lvl_4 rule while it does return both the 
zoom_lvl_4 rule as well as the zoom_lvl_5 rule.

Andrea found the relevant bit of code in the SVN, from 2003 : )

/** Tolerance used to compare doubles for equality */
private static final double TOLERANCE = 1e-6;

private boolean isWithInScale(Rule r) {
   return ((r.getMinScaleDenominator() - TOLERANCE) <= scaleDenominator)
           && ((r.getMaxScaleDenominator() + TOLERANCE) > scaleDenominator);
}

and as he mentions in the same email thread, who knows what sort of 
dependencies have grown on how the calculation is currently made, so if fixed 
then perhaps a method of using the existing way would be of use.

( 
https://osgeo-org.atlassian.net/browse/GEOS-9556#add-comment?atlOrigin=eyJpIjoiYTAwZTk2NWE4OWExNGQ5MTk5NjM3MTU2MjAzODI3NTIiLCJwIjoiaiJ9
 ) Add Comment ( 
https://osgeo-org.atlassian.net/browse/GEOS-9556#add-comment?atlOrigin=eyJpIjoiYTAwZTk2NWE4OWExNGQ5MTk5NjM3MTU2MjAzODI3NTIiLCJwIjoiaiJ9
 )

Get Jira notifications on your phone! Download the Jira Cloud app for Android ( 
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
 ) or iOS ( 
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
 ) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100122- 
sha1:8399ad5 )
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Reply via email to