Class TLfnRasterCoverageMetadata

All Implemented Interfaces:
ILcdMultiDimensional, ILcdBounded

public class TLfnRasterCoverageMetadata extends ALfnCoverageMetadata implements ILcdMultiDimensional
A representation of a raster coverage. It provides the following parameters in addition to those defined in the superclass:
  • tile width: the width of a tile in pixels. If unset or negative, an auto-default value will be used based on the bounding box and tile layout such that pixels are square as much as possible.
  • tile height: the height of a tile in pixels. If unset of negative, an auto-default value will be used based on the bounding box and tile layout such that pixels are square as much as possible.

A raster coverage may only contain raster assets. If you want to fuse vector assets as raster, you'll need to convert all TLfnVectorAssetMetadata to TLfnRasterAssetMetadata of type ELfnDataType.VECTOR. This includes converting all TLfnVectorAssetMetadata.VectorAssetParts to TLfnRasterAssetMetadata.RasterAssetParts, where you need to convert the scale to a pixel density.

Since:
10.0
See Also:
  • Field Details

    • ALL_LEVELS

      public static final int[] ALL_LEVELS
      Deprecated.
      fusion ignores the levels to produce. They are now always detected automatically based on the overlapping asset's resolutions.
      A convenience constant defining "all levels", to be used with TLfnRasterCoverageMetadata.Builder.levelsToProduce(int[]). Even though levels higher than 23 are theoretically possible, they never occur in practice.
  • Method Details

    • getTileWidth

      public int getTileWidth()
      Gets the tile width of this coverage. The tile width is the number of horizontal sample points per tile.

      OGC filter property XPath: lts:TileWidth

      Returns:
      the tile width of this coverage, must be positive and non-zero
    • getTileHeight

      public int getTileHeight()
      Gets the tile height of this coverage. The tile height is the number of vertical sample points per tile.

      OGC filter property XPath: lts:TileHeight

      Returns:
      the tile height of this coverage, must be positive and non-zero
    • getParameters

      public List<TLcdEarthMultivaluedDataParameter> getParameters()
      Gets the parameters of this raster coverage.

      OGC filter property XPath: lts:Parameter/lts:Name, lts:Parameter/lts:Unit, corresponding to the parameter's name and unit respectively

      Returns:
      the parameters of this raster coverage, possibly empty but never null
    • getDimensions

      public List<ILcdDimension<?>> getDimensions()
      Gets the dimensions this coverage has to offer. Dimensions are typically used for weather data. The dimensions are typically an aggregate of those offered by all contributing assets, or a subset thereof.

      When the coverage type is RASTER, the dimensions represent a selected subset of all the dimensions of the source data. By default, the selected subset is equal to the complete set of dimensions of the source data.

      When the coverage type is IMAGE, the dimensions represent a dimensional filter. They are a specific combination of possible values, one possible value for every dimension. In other words, getDimensions().get(i).getValues() will contain exactly one element for every axis.

      Specified by:
      getDimensions in interface ILcdMultiDimensional
      Returns:
      the dimensions, possibly empty but never null
      Since:
      2016.0
      See Also:
    • getBandSemantics

      public List<? extends ALcdBandSemantics> getBandSemantics()
      Gets the variable which contains band semantics data for this coverage
      Returns:
      the variable instance which contains band semantics data
      Since:
      2016.0
    • getAreaOfInterest

      public ILcdBounds getAreaOfInterest()
      Returns the area of interest for this raster coverage. It is defined in the geo-reference of the raster coverage.

      The area of interest defines the bounding box that has been used to clip the data within the raster coverage. It does not affect the tile structure of the coverage.

      Returns:
      the area of interest for this raster coverage. It is defined in the geo-reference of the raster coverage.
      Since:
      2018.0.04
      See Also:
    • getLevelsToProduce

      public int[] getLevelsToProduce()
      Deprecated.
      fusion ignores this setting. The levels to produce are now always detected automatically based on the overlapping asset's resolutions.
      Returns:
      always null
    • isPreserveAssetOrder

      public boolean isPreserveAssetOrder()
      Indicates in what order the assets linked by this coverage need to be fused on top of each other.

      • If true, the fusion process will paint the assets in the order specified by ALfnCoverageMetadata.getAssetInfos(). Assets earlier in the list will be below assets later in the list. The fusion process will still determine the order of the asset parts within one asset automatically.
      • If false, the fusion process will determine the order automatically. For example based on the pixel density of the parts.

      Returns:
      Whether asset order is preserved during fusion or not
      Since:
      2013.0
    • accept

      public void accept(ALfnResourceMetadataVisitor aVisitor)
      Description copied from class: ALfnResourceMetadata
      Accepts the visitor for visiting this resource. This provides a double-dispatch.
      Specified by:
      accept in class ALfnResourceMetadata
      Parameters:
      aVisitor - the visitor
      See Also:
    • hasSquarePixels

      public boolean hasSquarePixels()
      Tells whether or not this coverage has square pixels. Square pixels are a requirement for a coverage to be WMTS compliant. The other requirement is that the coverage type must be IMAGE.
      Returns:
      whether or not this coverage has square pixels
      Since:
      2014.0
    • getSamplingMode

      public ELcdImageSamplingMode getSamplingMode()
      Gets the sampling mode of this coverage. The sampling mode says whether pixels in the tiles should be interpreted as point or as area sample. It must be the same as the sampling mode of the assets.
      Returns:
      the sampling mode of this coverage, never null
      Since:
      2015.0
    • asBuilder

      Description copied from class: ALfnResourceMetadata
      Creates a new builder from this resource metadata. The builder's fields are initialized to the values of this resource metadata. The builder will build a resource metadata of the same type as this instance.
      Specified by:
      asBuilder in class ALfnCoverageMetadata
      Returns:
      a new builder
    • asBuilder

      Description copied from class: ALfnCoverageMetadata
      Creates a new builder from this coverage metadata using a given resolver. If not null, the resolver is used to resolve asset metadata when computing a coverage's auto-defaults. See ALfnCoverageMetadata.Builder for the uses of a resolver.
      Specified by:
      asBuilder in class ALfnCoverageMetadata
      Parameters:
      aResolver - a resolver to resolve the asset metadata for computing auto-defaults, which may be null
      Returns:
      this builder
    • equals

      public boolean equals(Object aObject)
      Overrides:
      equals in class ALfnCoverageMetadata
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class ALfnCoverageMetadata
    • newBuilder

      public static TLfnRasterCoverageMetadata.Builder newBuilder()
      Creates a new, empty builder. The builder's properties are initialized to the default values.
      Returns:
      a new builder
      See Also:
    • newBuilder

      Creates a new, empty builder with a given resolver. If not null, the resolver is used to resolve asset IDs to their asset metadata when computing a coverage's auto-defaults. Even if you don't give a resolver, you can still use auto-defaults by passing the asset metadata directly by using ALfnCoverageMetadata.Builder.addAssetInfo(ALfnAssetMetadata, String). See ALfnCoverageMetadata.Builder for the uses of a resolver.
      Parameters:
      aResolver - a resolver to resolve asset IDs to their asset metadata
      Returns:
      a new builder
    • newBuilder

      public static TLfnRasterCoverageMetadata.Builder newBuilder(TLfnRasterCoverageMetadata aTemplate)
      Creates a new builder from a template. The builder's properties are initialized from the template.

      The code

      
       TLfnRasterCoverageMetadata.newBuilder(template);
       
      is functionally equivalent to
      
       template.asBuilder();
       

      Parameters:
      aTemplate - a template, which must not be null
      See Also:
    • newBuilder

      Creates a new builder from a given template and resolver. If not null, the resolver is used to resolve asset metadata when computing a coverage's auto-defaults. Even if you don't give a resolver, you can still use auto-defaults by passing the asset metadata directly by using ALfnCoverageMetadata.Builder.addAssetInfo(ALfnAssetMetadata, String). See ALfnCoverageMetadata.Builder for the uses of a resolver.

      The code

      
       TLfnRasterCoverageMetadata.newBuilder(template, resolver);
       
      is functionally equivalent to
      
       template.asBuilder(resolver);
       

      Parameters:
      aTemplate - a template, which must not be null
      aResolver - a resolver to resolve the asset metadata for computing auto-defaults, which may be null
      Returns:
      this builder
      Since:
      2014.0