Package uk.ac.rdg.resc.edal.wms
Class GetMapStyleParams
- java.lang.Object
-
- uk.ac.rdg.resc.edal.wms.GetMapStyleParams
-
public class GetMapStyleParams extends Object
-
-
Constructor Summary
Constructors Constructor Description GetMapStyleParams(RequestParams params, WmsCatalogue catalogue)Extract GetMap parameters from the URL, using aWmsCatalogueto determine default values.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<Extent<Float>>getColorScaleRanges(RequestParams params, Extent<Float> defaultScale)Gets the ColorScaleRange object requested by the clientMapImagegetImageGenerator(WmsCatalogue catalogue)Gets the object used to generate the map plot with all correct styles and layers set.String[]getLayerNames()intgetNumLayers()intgetOpacity()Return the opacity of the image as a percentageString[]getStyleNames()booleanisTransparent()booleanisXmlDefined()
-
-
-
Constructor Detail
-
GetMapStyleParams
public GetMapStyleParams(RequestParams params, WmsCatalogue catalogue) throws EdalException
Extract GetMap parameters from the URL, using aWmsCatalogueto determine default values.- Parameters:
params- TheRequestParamsobject created from the URL requestcatalogue- TheWmsCataloguefrom which to extract default values- Throws:
EdalException- If the request is not properly formed
-
-
Method Detail
-
getColorScaleRanges
public static List<Extent<Float>> getColorScaleRanges(RequestParams params, Extent<Float> defaultScale) throws EdalException
Gets the ColorScaleRange object requested by the client- Throws:
EdalException
-
getImageGenerator
public MapImage getImageGenerator(WmsCatalogue catalogue) throws EdalException
Gets the object used to generate the map plot with all correct styles and layers set.- Parameters:
catalogue- AWmsCatalogueused to get server-configured default values for each plotted layer- Returns:
- A
MapImageobject - Throws:
EdalException- If invalid parameters have been supplied, or there are other issues with generating aMapImageobject
-
isTransparent
public boolean isTransparent()
-
getOpacity
public int getOpacity()
Return the opacity of the image as a percentage
-
getNumLayers
public int getNumLayers()
-
isXmlDefined
public boolean isXmlDefined()
-
getLayerNames
public String[] getLayerNames()
-
getStyleNames
public String[] getStyleNames()
-
-