Class SizedArrowLayer
- java.lang.Object
-
- uk.ac.rdg.resc.edal.graphics.style.Drawable
-
- uk.ac.rdg.resc.edal.graphics.style.ImageLayer
-
- uk.ac.rdg.resc.edal.graphics.style.GriddedImageLayer
-
- uk.ac.rdg.resc.edal.graphics.style.SizedArrowLayer
-
- Direct Known Subclasses:
ColouredSizedArrowLayer
public class SizedArrowLayer extends GriddedImageLayer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class uk.ac.rdg.resc.edal.graphics.style.GriddedImageLayer
GriddedImageLayer.MapFeatureDataReader
-
Nested classes/interfaces inherited from class uk.ac.rdg.resc.edal.graphics.style.ImageLayer
ImageLayer.MetadataFilter
-
Nested classes/interfaces inherited from class uk.ac.rdg.resc.edal.graphics.style.Drawable
Drawable.NameAndRange
-
-
Field Summary
Fields Modifier and Type Field Description protected String
arrowSizeFieldName
protected String
directionFieldName
-
Constructor Summary
Constructors Constructor Description SizedArrowLayer(String directionFieldName, String magnitudeFieldName, Integer minArrowSize, Integer maxArrowSize, ScaleRange magnitudeScaleRange, Color arrowColour, ArrowLayer.ArrowStyle arrowStyle)
SizedArrowLayer(String directionFieldName, String magnitudeFieldName, Integer minArrowSize, Integer maxArrowSize, ScaleRange magnitudeScaleRange, Color arrowColour, ArrowLayer.ArrowStyle arrowStyle, ArrowLayer.ArrowDirectionConvention arrowDirectionConvention)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
drawArrows(BufferedImage image, GriddedImageLayer.MapFeatureDataReader dataReader, Array2D<Number> directions, Array2D<Number> sizeData, Array2D<Number> colourData)
protected void
drawIntoImage(BufferedImage image, GriddedImageLayer.MapFeatureDataReader dataReader)
Draws the data into the supplied image.protected Color
getArrowColour(Number magnitude)
Set<Drawable.NameAndRange>
getFieldsWithScales()
-
Methods inherited from class uk.ac.rdg.resc.edal.graphics.style.GriddedImageLayer
drawIntoImage, supportedFeatureTypes
-
Methods inherited from class uk.ac.rdg.resc.edal.graphics.style.ImageLayer
drawImage, getMetadataFilter
-
Methods inherited from class uk.ac.rdg.resc.edal.graphics.style.Drawable
getOpacityTransform, setOpacityTransform
-
-
-
-
Constructor Detail
-
SizedArrowLayer
public SizedArrowLayer(String directionFieldName, String magnitudeFieldName, Integer minArrowSize, Integer maxArrowSize, ScaleRange magnitudeScaleRange, Color arrowColour, ArrowLayer.ArrowStyle arrowStyle)
-
SizedArrowLayer
public SizedArrowLayer(String directionFieldName, String magnitudeFieldName, Integer minArrowSize, Integer maxArrowSize, ScaleRange magnitudeScaleRange, Color arrowColour, ArrowLayer.ArrowStyle arrowStyle, ArrowLayer.ArrowDirectionConvention arrowDirectionConvention)
-
-
Method Detail
-
drawIntoImage
protected void drawIntoImage(BufferedImage image, GriddedImageLayer.MapFeatureDataReader dataReader) throws EdalException
Description copied from class:GriddedImageLayer
Draws the data into the supplied image.- Specified by:
drawIntoImage
in classGriddedImageLayer
- Parameters:
image
- ABufferedImage
to draw intodataReader
- AGriddedImageLayer.MapFeatureDataReader
which is used to obtain the actual data values and domain. TheMapDomain
returned will match the size of the image, and pixels are georeferenced to the GridCell2Ds which comprise the domain- Throws:
EdalException
- If there is a problem reading the data or drawing into the image
-
drawArrows
protected void drawArrows(BufferedImage image, GriddedImageLayer.MapFeatureDataReader dataReader, Array2D<Number> directions, Array2D<Number> sizeData, Array2D<Number> colourData)
-
getFieldsWithScales
public Set<Drawable.NameAndRange> getFieldsWithScales()
- Specified by:
getFieldsWithScales
in classDrawable
- Returns:
- A list of all the fields used in this image layer, and their
appropriate scale ranges. If there is NO scale range there can be
NO data field and vice versa - i.e. a
Drawable.NameAndRange
object must have all non-null fields. If the layer doesn't depend on any data, this should return an empty set. It should never returnnull
.
-
-