Package org.geotools.styling.zoom
Class ListZoomContext
Object
MedialZoomContext
ListZoomContext
- All Implemented Interfaces:
ZoomContext
- Direct Known Subclasses:
ListZoomContext
A zoom context specified by an explicit list of scale denominators.
- Author:
- Kevin Smith, Boundless
-
Field Summary
Fields inherited from interface ZoomContext
HINT_ID -
Constructor Summary
ConstructorsConstructorDescriptionListZoomContext(List<Double> scales) ListZoomContext(List<Double> scales, int initial) -
Method Summary
Modifier and TypeMethodDescriptiondoublegetMedialScale(int level) Get a scale between the given zoom level and the nextdoublegetScaleDenominator(int level) Find the reciprocal of the scale at a specified zoom level in this context.booleanisInRange(int level) Is the given level within the range for which the context has clearly defined scales.static voidChecks if the list contains a decreasing sequence of finite, positive, non-null values.Methods inherited from class MedialZoomContext
getRange
-
Constructor Details
-
ListZoomContext
-
ListZoomContext
-
-
Method Details
-
validate
Checks if the list contains a decreasing sequence of finite, positive, non-null values.- Throws:
IllegalArgumentException- if the values are not decreasing, positive, and finite.NullPointerException- if any values are null.
-
getScaleDenominator
public double getScaleDenominator(int level) Description copied from interface:ZoomContextFind the reciprocal of the scale at a specified zoom level in this context.- Parameters:
level- The level- Returns:
- The scale denominator
-
getMedialScale
public double getMedialScale(int level) Description copied from class:MedialZoomContextGet a scale between the given zoom level and the next- Specified by:
getMedialScalein classMedialZoomContext
-
isInRange
public boolean isInRange(int level) Description copied from interface:ZoomContextIs the given level within the range for which the context has clearly defined scales.
-