Class RasterLayer

java.lang.Object
com.luciad.layers.Layer
com.luciad.layers.rasters.RasterLayer
All Implemented Interfaces:
AutoCloseable

public final class RasterLayer extends Layer implements AutoCloseable
A layer for raster models.

Use RasterLayer#newBuilder to create a raster layer instance.

  • Field Details

    • PropertyRasterStyle

      public static final String PropertyRasterStyle
      Property name for the LayerEvent that is fired as a result of changing the layer's raster style.
      Since:
      2023.1
      See Also:
    • PropertyLineStyle

      public static final String PropertyLineStyle
      Property name for the LayerEvent that is fired as a result of changing the layer's line style.
      Since:
      2025.0.03
      See Also:
    • PropertyComplexStrokeLineStyle

      public static final String PropertyComplexStrokeLineStyle
      Property name for the LayerEvent that is fired as a result of changing the layer's complex stroke line style.
      Since:
      2025.0.03
      See Also:
    • PropertyFillStyle

      public static final String PropertyFillStyle
      Property name for the LayerEvent that is fired as a result of changing the layer's fill style.
      Since:
      2025.0.03
      See Also:
  • Method Details

    • finalize

      protected void finalize()
      Overrides:
      finalize in class Layer
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Overrides:
      close in class Layer
    • newBuilder

      @NotNull public static RasterLayer.Builder newBuilder()
      Returns the new builder for creating a RasterLayer.
      Returns:
      the new builder for creating a RasterLayer.
    • asBuilder

      @NotNull public RasterLayer.Builder asBuilder()
      Returns a new builder based on this layer instance.

      You can use this builder, for example, to create a copy of this layer.

      Note that observers will not be transferred to a new layer.

      Returns:
      a new builder based on this layer instance.
      Since:
      2025.0
    • getModel

      @NotNull public IRasterModel getModel()
      Returns the layer's model, which provides the raster to be presented.
      Returns:
      the layer's model, which provides the raster to be presented.
    • getRasterStyle

      @NotNull public RasterStyle getRasterStyle()
      Returns the raster style used for painting this layer.
      Returns:
      the raster style of this layer.
      Since:
      2023.1
    • setRasterStyle

      public void setRasterStyle(@NotNull RasterStyle rasterStyle)
      Sets the raster style used for painting this layer.

      If the new raster style is different from the old one, a LayerEvent is delivered to the observers with the property name PropertyRasterStyle.

      Parameters:
      rasterStyle - the new raster style.
      Since:
      2023.1
    • getLineStyle

      @Nullable public LineStyle getLineStyle()
      Returns the line style used for painting this layer.
      Returns:
      the line style of this layer.
      Since:
      2025.0.03
    • setLineStyle

      public void setLineStyle(@Nullable LineStyle lineStyle)
      Sets the line style used for painting this layer.

      Only one line style can be set. If this function is called when a ComplexStrokeLineStyle has already been set, it will be overwritten.

      After calling this, a LayerEvent is delivered to the observers with the property name PropertyLineStyle. If a previous ComplexStrokeLineStyle was overwritten, a LayerEvent with the PropertyComplexStrokeLineStyle property is also delivered.

      Parameters:
      lineStyle - the new line style.
      Since:
      2025.0.03
    • getComplexStrokeLineStyle

      @Nullable public ComplexStrokeLineStyle getComplexStrokeLineStyle()
      Returns the complex stroke line style used for painting this layer.
      Returns:
      the complex stroke line style of this layer.
      Since:
      2025.0.03
    • setComplexStrokeLineStyle

      public void setComplexStrokeLineStyle(@Nullable ComplexStrokeLineStyle complexStrokeLineStyle)
      Sets a complex stroke as the line style used for painting this layer.

      Only one line style can be set. If this function is called when a LineStyle has already been set, it will be overwritten.

      After calling this, a LayerEvent is delivered to the observers with the property name PropertyComplexStrokeLineStyle. If a previous LineStyle was overwritten, a LayerEvent with the PropertyLineStyle property is also delivered.

      Parameters:
      complexStrokeLineStyle - the new complex stroke line style.
      Since:
      2025.0.03
    • getFillStyle

      @Nullable public FillStyle getFillStyle()
      Returns the fill style used for painting this layer.
      Returns:
      the fill style of this layer.
      Since:
      2025.0.03
    • setFillStyle

      public void setFillStyle(@Nullable FillStyle fillStyle)
      Sets the fill style used for painting this layer.

      After calling this, a LayerEvent is delivered to the observers with the property name PropertyFillStyle.

      Parameters:
      fillStyle - the new fill style.
      Since:
      2025.0.03
    • getLayerType

      @NotNull public RasterLayerType getLayerType()
      Returns the type of this raster layer.
      Returns:
      this layer type.
      Since:
      2024.0
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(@Nullable Object other)
      Overrides:
      equals in class Object