Class ALfnFormat

java.lang.Object
com.luciad.fusion.engine.format.ALfnFormat
Direct Known Subclasses:
TLfnCompositeFormat, TLfnFormat

public abstract class ALfnFormat extends Object

This abstract class bundles all functionality specific to the data format to allow the fusion engine to fuse data sets. Most of the methods available on this class are called by LuciadFusion and should typically not be called by the application developer. They allow you to plug in functionality for LuciadFusion.

Most of the ALfnFormat methods are related to its two main functions:

  • Converting the path to a file into an asset and a model representing that data, and identifying which files belong to that data set.
  • Depending on what kind of data you want to serve to the clients connecting to the server, extra "information providers" must be plugged in. For instance, an elevation information provider is required when data is being fused as elevation. When such an information provider is not available, LuciadFusion cannot extract the requested information from the data and the fusion will not be possible.

Asset and model creation

The typical flow to fuse data is as follows:
  1. Creation of the asset: as a user of the LuciadFusion product, if you want to fuse a data set you need to create an ALfnAssetMetadata instance. An ALfnAssetMetadata (=asset) represents the meta-data about the original data set that LuciadFusion needs to know in order to fuse the data. This meta-data for example tells LuciadFusion which are the bounds of the source data.
    Creation of the asset can be done by calling the createAsset(String, List) method. When you have the asset, you add it to the Tile Store and ask LuciadFusion to start fusing the data. In order to fuse the data, LuciadFusion needs to create an ILcdModel for the asset.
  2. Creation of the model: the creation of the model is done by LuciadFusion. LuciadFusion will first create ILcdDataSources for the ALfnAssetMetaDatas in the coverage. These ILcdDataSources are passed to an ILcdModelDecoder to convert it to a model.

    The creation of the ILcdDataSource is a two-step process. In the first step, LuciadFusion determines which AssetParts must be grouped together to create ILcdDataSources. For example when you have an update asset for an existing base asset, you might want to group them in one ILcdDataSource instance to pass them together to the ILcdModelDecoder. This is done by passing all assets instances contained in the coverage to the groupAssetPartsForDataSources(java.util.List) method. This is useful when update assets cannot be decoded into models on their own, but need to be combined with the base assets.

    In the second step, an ILcdDataSource is created for each of the groups of AssetParts returned by the groupAssetPartsForDataSources(java.util.List) method by calling the createDataSource(java.util.List) method.

    The decoding of the ILcdDataSource into an ILcdModel is also a two-step process. First, an ILcdModelDecoder is created through the data source model decoder factory. Once the ILcdModelDecoder is created, it is asked to decode the data source into an ILcdModel.

  3. Fusing the model: once the model is created, it depends on the requested ELfnDataType which information is retrieved from the model, and stored. This is explained in the next section.
Consult the javadoc of the mentioned methods for more detailed instructions on how to implement or override these methods.

Plugging in information providers

Once the model is created, the information which needs to be stored by LuciadFusion is extracted from the model. Which information is extracted, and which information provider interface is used, depends on the requested ELfnDataType and is listed below. If the information provider is not provided by the format, it will not be possible to fuse to the corresponding data type.

ELfnDataType Information provider
IMAGE An ILcdGXYLayer will be created for the ILcdModel by passing it to the layer factory. If the coverage also contains SLD styling information, it will be passed to the layer factory as well.
ELEVATION The elevation values will be retrieved from the model using an ILcdHeightProvider, which is created by the model height provider factory.
VECTOR LuciadFusion needs to create a unique identifier for each feature in the model. An identity provider is created by the identity provider factory.

For some formats it is possible to indicate to LuciadFusion that the source data needs to be copied into the Tile Store (see ALfnCoverageMetadata#isAssetSourcesInTileStore()). If this option is enabled, LuciadFusion needs to know which files it needs to copy. This is currently an internal mechanism, and not available to customers.

Adding support for a custom format

LuciadFusion by default has access to a set of default formats, grouped into a composite implementation (see ALfnEngineEnvironment.getCompositeFormat()). If you want to add support to the Fusion engine for a new data format, you need to create an ALfnFormat extension for that data format. This extension should then be plugged in on the composite format of the ALfnEngineEnvironment. The class javadoc of the ALfnEngineEnvironment class contains more information of providing support for your own data format.

This class contains factory methods to create ALfnFormat instances for new formats (for example the newImageFormat method). Consult the javadoc of those methods to see whether they are suitable for your format.

Since:
10.0
  • Field Details

  • Constructor Details

    • ALfnFormat

      protected ALfnFormat()

      Creates a new, non-initialized engine format.

      It is strongly recommended not to use this constructor. If you want to create your own ALfnFormat instance for a custom data format, you most likely want to use any of the other constructors or a factory method available on this class.

    • ALfnFormat

      protected ALfnFormat(ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdGXYLayerFactory aGXYLayerFactory, ILcdModelHeightProviderFactory aHeightProviderFactory, ILfnIdentityProviderFactory aIdentityProviderFactory)

      Creates a new engine format.

      The format will be initialized with a SLD GXY layer factory that delegates to aGXYLayerFactory, and will ignore any of the SLD information present in the coverage.

      The format will be initialized with an ILfnDataSourceModelDecoderFactory that delegates to aModelDecoderFactory. Note that this created ILfnDataSourceModelDecoderFactory instance only accepts the ILcdDataSource instances which are created by the default implementation of createDataSource(java.util.List). If you want to override that method, you also need to make sure a custom ILfnDataSourceModelDecoderFactory is returned from the getDataSourceModelDecoderFactory() method.

      The format uses the name of aModelDecoderFactory as format name. This name should never change.

      Parameters:
      aModelDecoderFactory - the model decoder factory
      aGXYLayerFactory - the GXY layer factory. The SLD GXY layer factory will delegate to this one.
      aHeightProviderFactory - the height provider factory
      aIdentityProviderFactory - the feature ID provider factory for vector data
    • ALfnFormat

      protected ALfnFormat(String aFormatId, ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdSLDGXYLayerFactory aSLDGXYLayerFactory, ILcdModelHeightProviderFactory aHeightProviderFactory, ILfnIdentityProviderFactory aIdentityProviderFactory)

      Creates a new engine format.

      The format will be initialized with an ILfnDataSourceModelDecoderFactory that delegates to aModelDecoderFactory. Note that this created ILfnDataSourceModelDecoderFactory instance only accepts the ILcdDataSource instances which are created by the default implementation of createDataSource(java.util.List). If you want to override that method, you also need to make sure a custom ILfnDataSourceModelDecoderFactory is returned from the getDataSourceModelDecoderFactory() method.

      Parameters:
      aFormatId - the unique identifier for this format, this should never change
      aModelDecoderFactory - the model decoder factory
      aSLDGXYLayerFactory - the SLD GXY layer factory. The GXY layer factory will delegate to this one.
      aHeightProviderFactory - the height provider factory
      aIdentityProviderFactory - the feature ID provider factory for vector data
    • ALfnFormat

      protected ALfnFormat(String aFormatId, ILfnDataSourceModelDecoderFactory aModelDecoderFactory, ILcdSLDGXYLayerFactory aSLDGXYLayerFactory, ILcdModelHeightProviderFactory aHeightProviderFactory, ILfnIdentityProviderFactory aIdentityProviderFactory)

      Creates a new engine format.

      Note that you need to override the createDataSource(java.util.List) as well. The default implementation of that method creates ILcdDataSource instances which will not be accepted by aModelDecoderFactory. It might also be needed to override the groupAssetPartsForDataSources(java.util.List). Consult the javadoc of those methods for more information.

      Parameters:
      aFormatId - the unique identifier for this format, this should never change
      aModelDecoderFactory - the model decoder factory
      aSLDGXYLayerFactory - the SLD GXY layer factory. The GXY layer factory will delegate to this one.
      aHeightProviderFactory - the height provider factory
      aIdentityProviderFactory - the feature ID provider factory for vector data
      Since:
      2014.0
  • Method Details

    • newImageFormat

      public static ALfnFormat newImageFormat(ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdGXYLayerFactory aGXYLayerFactory, String aModelDescriptorTypeName, Class<? extends ILcdModelDescriptor>... aModelDescriptorClasses)

      Creates a new ALfnFormat instance which provides support for the IMAGE data type with the specified parameters.

      No height provider factory or id provider factory will be configured (not required for image formats, see class javadoc).

      The name of the model decoder factory will be used as format ID.

      Parameters:
      aModelDecoderFactory - the model decoder factory, the name of which will be used as format ID
      aGXYLayerFactory - the GXY layer factory, which will be adapted to a ILcdSLDGXYLayerFactory
      aModelDescriptorTypeName - the type name of the model descriptor or null
      aModelDescriptorClasses - the possible classes of the model descriptor or none
    • newImageFormat

      public static ALfnFormat newImageFormat(String aFormatId, ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdSLDGXYLayerFactory aGXYLayerFactory, String aModelDescriptorTypeName, Class<? extends ILcdModelDescriptor>... aModelDescriptorClasses)

      Creates a new ALfnFormat instance which provides support for the IMAGE data type with the specified parameters.

      No height provider factory or id provider factory will be configured (not required for image formats, see class javadoc).

      Parameters:
      aFormatId - the unique identifier for this format, this should never change
      aModelDecoderFactory - the model decoder factory
      aGXYLayerFactory - the SLD GXY layer factory
      aModelDescriptorTypeName - the type name of the model descriptor or null
      aModelDescriptorClasses - the possible classes of the model descriptor or none
    • newElevationFormat

      public static ALfnFormat newElevationFormat(ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdGXYLayerFactory aGXYLayerFactory, ILcdModelHeightProviderFactory aHeightProviderFactory, String aModelDescriptorTypeName, Class<? extends ILcdModelDescriptor>... aModelDescriptorClasses)

      Creates a new ALfnFormat instance which provides support for the ELEVATION data type with the specified parameters.

      No id provider factory will be configured (not required for elevation formats, see class javadoc).

      The name of the model decoder factory will be used as format ID.

      Parameters:
      aModelDecoderFactory - the model decoder factory, the name of which will be used as format ID
      aGXYLayerFactory - the GXY layer factory, which will be adapted to a ILcdSLDGXYLayerFactory
      aHeightProviderFactory - the height provider factory
      aModelDescriptorTypeName - the type name of the model descriptor or null
      aModelDescriptorClasses - the possible classes of the model descriptor or none for
    • newElevationFormat

      public static ALfnFormat newElevationFormat(String aFormatId, ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdSLDGXYLayerFactory aGXYLayerFactory, ILcdModelHeightProviderFactory aHeightProviderFactory, String aModelDescriptorTypeName, Class<? extends ILcdModelDescriptor>... aModelDescriptorClasses)

      Creates a new ALfnFormat instance which provides support for the ELEVATION data type with the specified parameters.

      No id provider factory will be configured (not required for elevation formats, see class javadoc).

      Parameters:
      aFormatId - the unique identifier for this format, this should never change
      aModelDecoderFactory - the model decoder factory
      aGXYLayerFactory - the SLD GXY layer factory
      aHeightProviderFactory - the height provider factory
      aModelDescriptorTypeName - the type name of the model descriptor or null
      aModelDescriptorClasses - the possible classes of the model descriptor or none for
    • newVectorFormat

      public static ALfnFormat newVectorFormat(ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdGXYLayerFactory aGXYLayerFactory, ILfnIdentityProviderFactory aFeatureIdProviderFactory, String aModelDescriptorTypeName, Class<? extends ILcdModelDescriptor>... aModelDescriptorClasses)
      Deprecated.
      Since 2017.0 support for coverages of type VECTOR has been superseded with other mechanisms. Please refer to the Fusion migration guide for more information.

      Creates a new ALfnFormat instance which provides support for the VECTOR data type with the specified parameters.

      No height provider factory will be configured (not required for vector formats, see class javadoc).

      The name of the model decoder factory will be used as format ID.

      Parameters:
      aModelDecoderFactory - the model decoder factory, the name of which will be used as format ID
      aGXYLayerFactory - the GXY layer factory, which will be adapted to a ILcdSLDGXYLayerFactory
      aFeatureIdProviderFactory - the feature ID provider factory for vector data
      aModelDescriptorTypeName - the type name of the model descriptor or null for any
      aModelDescriptorClasses - the possible classes of the model descriptor or none for any
    • newVectorFormat

      public static ALfnFormat newVectorFormat(String aFormatId, ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdSLDGXYLayerFactory aGXYLayerFactory, ILfnIdentityProviderFactory aFeatureIdProviderFactory, String aModelDescriptorTypeName, Class<? extends ILcdModelDescriptor>... aModelDescriptorClasses)
      Deprecated.
      Since 2017.0 support for coverages of type VECTOR has been superseded with other mechanisms. Please refer to the Fusion migration guide for more information.

      Creates a new ALfnFormat instance which provides support for the VECTOR data type with the specified parameters.

      No height provider factory will be configured (not required for vector formats, see class javadoc).

      Parameters:
      aFormatId - the unique identifier for this format, this should never change
      aModelDecoderFactory - the model decoder factory
      aGXYLayerFactory - the SLD GXY layer factory
      aFeatureIdProviderFactory - the feature ID provider factory for vector data
      aModelDescriptorTypeName - the type name of the model descriptor or null for any
      aModelDescriptorClasses - the possible classes of the model descriptor or none for any
    • getName

      public String getName()

      Gets the name of this format. The name should never change, and should be unique for each format.

      Typically you do not need to call this method yourself. It is mainly here for LuciadFusion itself.

      Returns:
      the name of this format, for example "GeoTIFF"
    • getModelDecoderFactory

      public ILcdEarthModelDecoderFactory getModelDecoderFactory()
      Deprecated.
      As of V2014.0, the ALfnFormat uses ILcdDataSource instances to create the models. Use getDataSourceModelDecoderFactory() instead of this method.

      Gets the model decoder factory of this format.

      Typically you do not need to call this method yourself. It is mainly here for LuciadFusion itself.

      Returns:
      a model decoder factory, never null
    • getDataSourceModelDecoderFactory

      public ILfnDataSourceModelDecoderFactory getDataSourceModelDecoderFactory()

      Gets the data source model decoder factory of this format.

      If you override this method, you also need to adjust the createDataSource(java.util.List) method (and perhaps also the groupAssetPartsForDataSources(java.util.List) method). The default implementations of these 3 methods depend on each other. If you adjust one of those methods, you need to adjust all of them. Consult the class javadoc for more information on how these methods work together.

      Typically you do not need to call this method yourself. It is mainly here for LuciadFusion itself.

      Returns:
      a data source model decoder factory, never null
    • getSLDGXYLayerFactory

      public ILcdSLDGXYLayerFactory getSLDGXYLayerFactory()

      Gets the SLD GXY layer factory of this format, if any.

      A layer factory is needed when you want to fuse the data as ELfnDataType#IMAGE. The images will be created based on the layer created by the layer factory. When this method returns null, it will not be possible to fuse as IMAGE.

      To remain backwards compatible, the default implementation of this method will fall back to the getGXYLayerFactory() when no SLD layer factory is available but a regular ILcdGXYLayerFactory is.

      Typically you do not need to call this method yourself. It is mainly here for LuciadFusion itself. A possible use-case to call this method as API user is if you want to create preview layers of how the fused data will look.

      Returns:
      a layer factory, possibly null
      Since:
      2013.1
    • getGXYLayerFactory

      public ILcdGXYLayerFactory getGXYLayerFactory()
      Deprecated.
      override #getSLDGXYLayerFactory instead

      Gets the GXY layer factory of this format, if any.

      A layer factory is needed when you want to fuse the data as ELfnDataType.IMAGE. The images will be created based on the layer created by the layer factory. When this method returns null, it will not be possible to fuse as IMAGE (see class javadoc).

      This method is no longer used by LuciadFusion. LuciadFusion uses the SLD GXY layer factory method. The recommended way to replace the layer factory of a format is to override the getSLDGXYLayerFactory() method.

      Returns:
      a GXY layer factory, possibly null
    • getHeightProviderFactory

      public ILcdModelHeightProviderFactory getHeightProviderFactory()

      Gets the height provider factory of this format, if any.

      A height provider factory is needed when you want to fuse the data as ELfnDataType.ELEVATION. The elevation values will be extracted from the model using the created height provider. When this method returns null, it will not be possible to fuse as ELEVATION (see class javadoc).

      Typically you do not need to call this method yourself. It is mainly here for LuciadFusion itself.

      Returns:
      a height provider factory, possibly null
    • getIdentityProviderFactory

      public ILfnIdentityProviderFactory getIdentityProviderFactory()

      Gets the (vector) feature ID provider factory of this format, if any. The default implementation returns null.

      An identity provider factory is needed when you want to fuse the data as ELfnDataType.VECTOR. The id's for the features of the model will be retrieved from the identity provider. When this method returns null, it will not be possible to fuse as VECTOR (see class javadoc).

      Returns:
      a feature ID provider factory, possibly null
      Since:
      11.0
    • createAsset

      public abstract ALfnAssetMetadata createAsset(ILcdModel aModel)

      Creates an asset for a given model. This method is typically only called when you already have an ILcdModel available. If the model does not yet exists, the recommended way is to use the createAsset(String, java.util.List) method instead.

      The implementation of this method has to set all the properties of the asset, notably:

      This method is typically called by the LuciadFusion API user. In order to fuse data, you need to create and pass ALfnAssetMetadata instances to LuciadFusion. The creation of those assets is done by calling this method.

      Parameters:
      aModel - a model to create an asset for
      Returns:
      the asset, or null if the model is not supported
      Since:
      11.0
      See Also:
    • createAsset

      public ALfnAssetMetadata createAsset(String aSourceName, List<ALfnAssetMetadata> aOtherAssetMetadatas) throws IOException

      Creates an asset for a given source name.

      The list of other asset metadatas that is provided may be used by the format to compute asset information which is not available in aSourceName itself, but can only be deduced using information from other, already existing assets. A typical example is an update asset for an existing base asset, which is not self-describing but can only be interpreted in combination with the base asset. The source name would point to the update asset, while the base asset must be in the list of other assets. You may for example use ALfnTileStore.query(com.luciad.fusion.tilestore.ELfnResourceType) to get the existing asset metadatas of a Tile Store. It is not possible to decode a stand-alone model from the update asset, it can only exist in combination with its base asset.

      The default implementation will use the model decoder factory to create an ILcdModel for the source, and pass that model to the createAsset(com.luciad.model.ILcdModel) method. The default implementation makes no use of the aOtherAssetMetadatas parameter.

      The format has to set all the properties of the asset, notably:

      This method is typically called by the LuciadFusion API user. In order to fuse data, you need to create and pass ALfnAssetMetadata instances to LuciadFusion. The creation of those assets is done by calling this method.

      Parameters:
      aSourceName - The source name
      aOtherAssetMetadatas - a list of already existing asset metadatas which may be used by the format to deduce information for the new asset. May be null or empty.
      Returns:
      the asset, or null if the source file is not supported
      Throws:
      IOException - any IO exception which occurs in the model decoder during the decoding of the model
      Since:
      2014.0
      See Also:
    • canCreateAsset

      public boolean canCreateAsset(String aSourceName, List<ALfnAssetMetadata> aOtherAssetMetadatas)

      Returns false when the format is certain it cannot create an asset for the given source, true otherwise. This method is a quick check which might be called often and should return quickly.

      The list of other asset metadatas that is provided may be used by the format to compute asset information which is not available in aSource itself, but can only be deduced using information from other, already existing assets. A typical example is an update asset for an existing base asset, which is not self-describing but can only be interpreted in combination with the base asset.

      Note that true does not always imply that a model can be created for the source. As an example, assets can be created for S-57 update files, but these update files cannot be decoded to models.

      The default implementation delegates to getDataSourceModelDecoderFactory().canDecodeSource(aSource) and ignores aOtherAssetMetadatas.

      This method is typically called by the LuciadFusion API user. In order to fuse data, you need to create and pass ALfnAssetMetadata instances to LuciadFusion. Before you call the createAsset methods, you need to call this method.

      Parameters:
      aSourceName - the source to be tested
      aOtherAssetMetadatas - a list of already existing asset metadatas which may be used by the format to deduce information for the new asset. May be null or empty.
      Returns:
      true if the given source can be decoded to an asset and/or model, false otherwise.
      Since:
      2014.0
      See Also:
    • groupAssetPartsForDataSources

      public List<List<ALfnAssetMetadata.AssetPart>> groupAssetPartsForDataSources(List<ALfnAssetMetadata> aAssetMetadatas)

      This method is responsible for grouping all AssetPart instances into groups. For each of those groups, an ILcdDataSource will be created by calling the createDataSource(java.util.List) method.

      The default implementation of this method creates groups containing a single AssetPart.

      An example format which might group several AssetParts together is a format which supports base files and updates for those base files. Typically an update file in itself contains not enough information to allow the model decoder to decode it into an ILcdModel (e.g. an update file which only indicates element X must be removed). Instead, you need to group both the base file and update file into an ILcdDataSource and pass it to the model decoder.This method indicates to the fusion process which AssetParts needs to be grouped together when an ILcdDataSource is created. When this method groups the AssetParts representing the update file(s) together with the ones corresponding to the base files, they will be passed as one group to the createDataSource(java.util.List) method which allows to create an ILcdDataSource representing both the base and update.

      If you override this method, you also need to adjust the createDataSource(java.util.List) method and provide a custom getDataSourceModelDecoderFactory(). The default implementations of these 3 methods depend on each other. If you adjust one of those methods, you need to adjust all of them. Consult the class javadoc for more information on how these methods work together.

      Typically you do not need to call this method yourself. It is mainly here for LuciadFusion itself.

      Parameters:
      aAssetMetadatas - All the ALfnAssetMetadata instances available in the coverage.
      Returns:
      A List containing groups of AssetPart instances (where a group is represented by a List as well). Each AssetPart group will be passed to the createDataSource(java.util.List) method to create an ILcdDataSource.
      Since:
      2014.0
    • createDataSource

      public ILcdDataSource createDataSource(List<ALfnAssetMetadata.AssetPart> aAssetPartsGroup)

      This method is responsible for creating an ILcdDataSource which represents all AssetPart instances in aAssetPartsGroup. Which AssetPart instances are contained in aAssetPartsGroup is determined by the result of the groupAssetPartsForDataSources(java.util.List) method.

      The default implementation of this method creates ILcdDataSource instances which are accepted by the default ILfnDataSourceModelDecoderFactory. If you used a constructor which accepts a custom ILfnDataSourceModelDecoderFactory, or you have overridden the getDataSourceModelDecoderFactory() method, you will have to override this method as well.

      If you override this method, you also need to provide a custom getDataSourceModelDecoderFactory() (and possibly also adjust the groupAssetPartsForDataSources(java.util.List) method). The default implementations of these 3 methods depend on each other. If you adjust one of those methods, you need to adjust all of them. Consult the class javadoc for more information on how these methods work together.

      Typically you do not need to call this method yourself. It is mainly here for LuciadFusion itself.

      Parameters:
      aAssetPartsGroup - A group of AssetPart instances for which an ILcdDataSource must be created. All AssetPart instances should have been created by this format.
      Returns:
      An ILcdDataSource representing all AssetParts contained in aAssetPartsGroup
      Since:
      2014.0
    • isModelOfFormat

      public abstract boolean isModelOfFormat(ILcdModel aModel)
      Checks whether a model is of this format.
      Parameters:
      aModel - the model
      Returns:
      true if the given model is of this format, false otherwise
    • isAssetOfFormat

      public boolean isAssetOfFormat(ALfnAssetMetadata aAssetMetadata)

      Returns true when aAssetMetadata was created by this ALfnFormat, false otherwise. This method might be called often, hence need to return quickly.

      The default implementation relies on the result of the ALfnAssetMetadata.getFormat() method. When the format name is not specified in the asset, a (slower) fallback mechanism is used. Therefore it is recommended to make sure the format name is specified in the assets, although it is optional.

      Typically you do not need to call this method yourself. It is mainly here for LuciadFusion itself. In most use-cases where you need access to an ALfnFormat, you can use the TLfnCompositeFormat and work against the composite instance, without having to bother which ALfnFormat corresponded to which asset (part).

      Parameters:
      aAssetMetadata - The asset
      Returns:
      true when aAssetMetadata was created by this AlfnFormat, false otherwise
      Since:
      2014.0
    • isAssetPartOfFormat

      public boolean isAssetPartOfFormat(ALfnAssetMetadata.AssetPart aAssetPart)

      Returns true when aAssetPart was created by this ALfnFormat, false otherwise. This method might be called often, hence need to return quickly.

      The default implementation relies on the result of the ALfnAssetMetadata.getFormat() method. When the format name is not specified in the asset part, a (slower) fallback mechanism is used. Therefore it is recommended to make sure the format name is specified in the asset parts, although it is optional.

      Typically you do not need to call this method yourself. It is mainly here for LuciadFusion itself. In most use-cases where you need access to an ALfnFormat, you can use the TLfnCompositeFormat and work against the composite instance, without having to bother which ALfnFormat corresponded to which asset (part).

      Parameters:
      aAssetPart - The asset part
      Returns:
      true when aAssetPart was created by this ALfnFormat, false otherwise
      Since:
      2014.0
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isAssetSourcesInTileStoreSupported

      public boolean isAssetSourcesInTileStoreSupported()
      Indicates if this format's model decoder produces models that supports asset sources in Tile Store. This implementation returns false by default, subclasses may return true. Currently only S-57, S-63, ECW and SHP formats have such support.

      Note that it is currently not possible to customize a format to support asset sources in Tile Store, because the API a model decoder needs to access in order to allow it is internal.

      Returns:
      whether this format supports asset sources in Tile Store
      Since:
      2013.1
    • createDefaultFormats

      public static List<ALfnFormat> createDefaultFormats(ALfnEngineEnvironment aEnvironment)

      Gets a list of the default engine formats. The formats are created using the given engine environment.

      The supported default formats are:

      • DTED
      • DMED
      • USGS DEM
      • ETOPO Bathymetric data
      • SwissTopo DHM25
      • GeoTIFF
      • JAI raster (TIFF, GIF, JPEG, PNG, PPM, BMP)
      • RST raster (TIFF, GIF, JPEG, PNG, PPM, BMP)
      • ESRI TFW, JGW, BPW
      • MapInfo TAB
      • BIL
      • CADRG/CIB
      • JPEG 2000
      • ASRP/USRP/ADRG
      • ECW
        • Supports raster coverages and non-tiled coverages.
      • GeoSPOT (spatiocartes)
      • MrSID
      • Spot DIMAP
      • USRP
      • NetCDF
        • Supports NetCDF weather data
        • Supports GRIB weather data
      • NITF/NSIF
      • ECRG
      • BCI
      • Oracle GeoRaster
      • SHP
      • MapInfo Interchange Format (MIF)
      • MapInfo native binary format (MAP)
      • Vector Product Format (VPF)
      • AIXM (as raster)
      • GML 2
      • GML 3.1
      • GML 3.2
      • S-57 ECDIS
        • Supports tiled raster coverages, but no tiled vector coverages.
        • Supports asset sources in Tile Store, which enables WMS GetFeatureInfo requests.
        • Supports non-tiled coverages.
        • Supports S-57 updates, but only if the update is added as a new asset to a coverage which already has an existing asset for the base and the asset sources of the base are still present at their location.
      • S-63 encrypted ECDIS
        • Supports tiled raster coverages, but no tiled vector coverages. The resulting tiles will automatically be encrypted using the S-63 hardware ID in the license. Tiles will be decrypted in the LTS visualization client, in the WMS server, or in the WMTS server. If message digests are enabled, the digest applies to the encrypted tile data.
        • Supports asset sources in Tile Store, which enables WMS GetFeatureInfo requests.
        • Supports non-tiled coverages.
        • Supports S-63 updates, but only if the update is added as a new asset to a coverage which already has an existing asset for the base and the asset sources of the base are still present at their location.
        • Supports S-63 data where the permits are located next to the data. In practice, this means that the PERMIT.TXT or ENC.PMT files need to be next to the CATALOG.031 file, or next to a specific cell file.
      • ArcSDE vector and raster
      • TileStore raster
      • Geospatial PDF
      • DGN (as raster)
      • GDAL raster (ERDAS Imagine)
      • PostgreSQL PostGIS

      If any of these formats cannot be loaded due to missing decoder dependencies, those formats are skipped and a warning message is logged.

      The names of the default formats are available as constants on this class.

      Parameters:
      aEnvironment - the environment for the default formats
      Returns:
      a list of the default engine formats