Class TLcdSLDGraphic

java.lang.Object
com.luciad.datamodel.TLcdDataObject
com.luciad.ogc.sld.model.TLcdSLDGraphic
All Implemented Interfaces:
ILcdDataObject, ILcdCloneable, ILcdDeepCloneable, Cloneable

public class TLcdSLDGraphic extends TLcdDataObject
A Graphic specifies or refers to a "graphic symbol" with inherent shape, size, and coloring.

  • Constructor Details

    • TLcdSLDGraphic

      public TLcdSLDGraphic()
      Empty constructor.
    • TLcdSLDGraphic

      public TLcdSLDGraphic(TLcdSLDParameterValue aOpacity, TLcdSLDParameterValue aSize, TLcdSLDParameterValue aRotation, Object[] aGraphics)
      Constructor for given parameters.
      Parameters:
      aOpacity - the given graphic opacity.
      aSize - the given graphic size.
      aRotation - the given graphic rotation.
      aGraphics - the marks and external graphics.
    • TLcdSLDGraphic

      public TLcdSLDGraphic(TLcdDataType aDataType)
      Empty constructor.
  • Method Details

    • getGraphicCount

      public int getGraphicCount()
      Returns the marks and external graphics count.
      Returns:
      the marks and external graphics count.
    • addGraphic

      public void addGraphic(Object aGraphic)
      Adds a TLcdSLDMark or TLcdSLDExternalGraphic to this TLcdSLDGraphic.
      Parameters:
      aGraphic - an instance of TLcdMark or TLcdSLDExternalGraphic
    • insertGraphicAt

      public void insertGraphicAt(Object aGraphic, int aIndex)
      Inserts a mark or external graphic at a given position.
      Parameters:
      aGraphic - the mark or external graphic.
      aIndex - the index of the given position.
    • removeGraphic

      public void removeGraphic(Object aGraphic)
      Removes a mark or external graphic.
      Parameters:
      aGraphic - the mark or external graphic to be removed.
    • isGraphicMark

      public boolean isGraphicMark(int aIndex)
      Checks whether the graphic at a given position is a mark.
      Parameters:
      aIndex - the index of the given position.
      Returns:
      true if the graphic at a given position is a mark. False if not.
    • isGraphicExternalGraphic

      public boolean isGraphicExternalGraphic(int aIndex)
      Checks whether the graphic at a given position is an external graphic.
      Parameters:
      aIndex - the index of the given position.
      Returns:
      true if the graphic at a given position is an external graphic. False if not.
    • getGraphic

      public Object getGraphic(int aIndex)
      Gets the graphic at a given position.
      Parameters:
      aIndex - the index of the given position.
      Returns:
      the graphic at a given position.
    • getMark

      public TLcdSLDMark getMark(int aIndex)
      Returns the mark at the given index. Note that this method does not check whether the graphic at that index is indeed a TLcdSLDMark instance. If not a ClassCastException will be thrown.
      Parameters:
      aIndex - the index of the mark in the collection of all Graphics.
      Returns:
      the mark at the given index.
      See Also:
    • getExternalGraphic

      public TLcdSLDExternalGraphic getExternalGraphic(int aIndex)
      Returns the external graphic at the given index. Note that this method does not check whether the graphic at that index is indeed a TLcdSLDExternalGraphic instance. If not a ClassCastException will be thrown.
      Parameters:
      aIndex - the index of the external graphic in the collection of all Graphics.
      Returns:
      the external graphic at the given index.
      See Also:
    • newBuilder

      public static TLcdSLDGraphic.Builder<TLcdSLDGraphic> newBuilder()
      Creates a new builder with the default values.
      Returns:
      the new builder.
      Since:
      2012.1
    • getGraphic

      public List<ILcdDataObject> getGraphic()
      Returns the value of the property that maps to the choice between the ExternalGraphic and Mark elements.

      The possible values for this property are instances of java.util.List with elements of class

      Returns:
      the value of the GRAPHIC_PROPERTY property.
    • getOpacity

      public TLcdSLDParameterValue getOpacity()
      Returns the value of the property that maps to the Opacity element.

      The parameter should evaluate to a decimal number between 0 and 1.

      Returns:
      the value of the OPACITY_PROPERTY property.
    • setOpacity

      public void setOpacity(TLcdSLDParameterValue aValue)
      Sets the value of the property that maps to the Opacity element.

      The parameter should evaluate to a decimal number between 0 and 1.

      Parameters:
      aValue - the value to set for the OPACITY_PROPERTY property.
    • getSize

      public TLcdSLDParameterValue getSize()
      Returns the value of the property that maps to the Size element.

      The size is the absolute height of the graphic, specified in the unit of measure of the symbolizer. The width will be set so that the original aspect ratio is preserved. If no size is set, the graphic will maintain its native size. The parameter should evaluate to a number.

      Returns:
      the value of the SIZE_PROPERTY property.
    • setSize

      public void setSize(TLcdSLDParameterValue aValue)
      Sets the value of the property that maps to the Size element.

      The size is the absolute height of the graphic, specified in the unit of measure of the symbolizer. The width will be set so that the original aspect ratio is preserved. If no size is set, the graphic will maintain its native size. The parameter should evaluate to a number.

      Parameters:
      aValue - the value to set for the SIZE_PROPERTY property.
    • getRotation

      public TLcdSLDParameterValue getRotation()
      Returns the value of the property that maps to the Rotation element.

      The parameter should evaluate to a number in degrees, decimals are possible.

      Returns:
      the value of the ROTATION_PROPERTY property.
    • setRotation

      public void setRotation(TLcdSLDParameterValue aValue)
      Sets the value of the property that maps to the Rotation element.

      The parameter should evaluate to a number in degrees, decimals are possible.

      Parameters:
      aValue - the value to set for the ROTATION_PROPERTY property.
    • getAnchorPoint

      public TLcdSLDAnchorPoint getAnchorPoint()
      Returns the value of the property that maps to the AnchorPoint element.

      An "AnchorPoint" identifies the location inside of a text label to use an an 'anchor' for positioning it relative to a point geometry.

      Returns:
      the value of the ANCHOR_POINT_PROPERTY property.
    • setAnchorPoint

      public void setAnchorPoint(TLcdSLDAnchorPoint aValue)
      Sets the value of the property that maps to the AnchorPoint element.

      An "AnchorPoint" identifies the location inside of a text label to use an an 'anchor' for positioning it relative to a point geometry.

      Parameters:
      aValue - the value to set for the ANCHOR_POINT_PROPERTY property.