Class ALfnFormat
- Direct Known Subclasses:
TLfnCompositeFormat,TLfnFormat
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:- Creation of the asset: as a user of the LuciadFusion product, if you want to fuse a data set you need to create an
ALfnAssetMetadatainstance. AnALfnAssetMetadata(=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 thecreateAsset(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 anILcdModelfor the asset. -
Creation of the model: the creation of the model is done by LuciadFusion. LuciadFusion will first create
ILcdDataSourcesfor theALfnAssetMetaDatas in the coverage. TheseILcdDataSources are passed to anILcdModelDecoderto convert it to a model.The creation of the
ILcdDataSourceis a two-step process. In the first step, LuciadFusion determines whichAssetPartsmust be grouped together to createILcdDataSources. For example when you have an update asset for an existing base asset, you might want to group them in oneILcdDataSourceinstance to pass them together to theILcdModelDecoder. This is done by passing all assets instances contained in the coverage to thegroupAssetPartsForDataSources(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
ILcdDataSourceis created for each of the groups ofAssetPartsreturned by thegroupAssetPartsForDataSources(java.util.List)method by calling thecreateDataSource(java.util.List)method.The decoding of the
ILcdDataSourceinto anILcdModelis also a two-step process. First, anILcdModelDecoderis created through thedata source model decoder factory. Once theILcdModelDecoderis created, it isaskedto decode the data source into anILcdModel. - Fusing the model: once the model is created, it depends on the requested
ELfnDataTypewhich information is retrieved from the model, and stored. This is explained in the next section.
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThenameof the default format responsible for AIXM 3.3, 4.0 and 4.5 datastatic final StringThenameof the default format responsible for AIXM 5.1 datastatic final StringDeprecated.ArcSDE has been discontinued by Esri as of ArcGIS 10.3.static final StringDeprecated.ArcSDE has been discontinued by Esri as of ArcGIS 10.3.static final StringThenameof the default format responsible for BCI datastatic final StringThenameof the default format responsible for BIL datastatic final StringThenameof the default format responsible for CADRG datastatic final StringThenameof the default format responsible for DEM datastatic final StringThenameof the default format responsible for DGN datastatic final StringThenameof the default format responsible for DIMAP datastatic final StringThenameof the default format responsible for DMED datastatic final StringThenameof the default format responsible for DTED directory datastatic final StringThenameof the default format responsible for DTED datastatic final StringThenameof the default ECRG format.static final StringThenameof the default format responsible for ECW datastatic final StringThenameof the default format responsible for ETOPO datastatic final StringThenameof the default GDAL format.static final StringThenameof the default format responsible for GeoSPOT datastatic final StringThenameof the default format responsible for GeoTIFF datastatic final StringThenameof the default format responsible for Geospatial PDF datastatic final StringThenameof the default format responsible for GML2 datastatic final StringThenameof the default format responsible for GML3.1 datastatic final StringThenameof the default format responsible for GML3.2 datastatic final StringThenameof the default format responsible for JAI datastatic final StringThenameof the default format responsible for JPEG2000 datastatic final StringThenameof the default format responsible for JPIP datastatic final StringThenameof the default format responsible for MAP datastatic final StringThenameof the default format responsible for MIF datastatic final StringThenameof the default format responsible for MrSID datastatic final StringThenameof the default NetCDF format (handles GRIB data as well).static final StringThenameof the default format responsible for NITF datastatic final StringThenameof the default format responsible for Oracle GeoRaster datastatic final StringThenameof the default format responsible for Oracle Spatial datastatic final Stringstatic final StringThenameof the default format responsible for raster tile store datastatic final StringThenameof the default format responsible for RST datastatic final StringThenameof the default format responsible for S-57 ECDIS datastatic final StringThenameof the default format responsible for S-63 ECDIS datastatic final StringThenameof the default format responsible for SHP datastatic final StringThenameof the default format responsible for Swiss DHM datastatic final StringThenameof the default format responsible for TAB datastatic final StringThenameof the default format responsible for TFW datastatic final StringThenameof the default format responsible for USRP datastatic final StringThenameof the default format responsible for VPF datastatic final StringThenameof the default format responsible for WMTS data -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new, non-initialized engine format.protectedALfnFormat(ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdGXYLayerFactory aGXYLayerFactory, ILcdModelHeightProviderFactory aHeightProviderFactory, ILfnIdentityProviderFactory aIdentityProviderFactory) Creates a new engine format.protectedALfnFormat(String aFormatId, ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdSLDGXYLayerFactory aSLDGXYLayerFactory, ILcdModelHeightProviderFactory aHeightProviderFactory, ILfnIdentityProviderFactory aIdentityProviderFactory) Creates a new engine format.protectedALfnFormat(String aFormatId, ILfnDataSourceModelDecoderFactory aModelDecoderFactory, ILcdSLDGXYLayerFactory aSLDGXYLayerFactory, ILcdModelHeightProviderFactory aHeightProviderFactory, ILfnIdentityProviderFactory aIdentityProviderFactory) Creates a new engine format. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanCreateAsset(String aSourceName, List<ALfnAssetMetadata> aOtherAssetMetadatas) Returnsfalsewhen the format is certain it cannot create an asset for the given source,trueotherwise.abstract ALfnAssetMetadatacreateAsset(ILcdModel aModel) Creates an asset for a given model.createAsset(String aSourceName, List<ALfnAssetMetadata> aOtherAssetMetadatas) Creates an asset for a given source name.createDataSource(List<ALfnAssetMetadata.AssetPart> aAssetPartsGroup) This method is responsible for creating anILcdDataSourcewhich represents allAssetPartinstances inaAssetPartsGroup.static List<ALfnFormat> createDefaultFormats(ALfnEngineEnvironment aEnvironment) Gets a list of the default engine formats.Gets the data source model decoder factory of this format.Deprecated.override #getSLDGXYLayerFactory insteadGets the height provider factory of this format, if any.Gets the (vector) feature ID provider factory of this format, if any.Deprecated.As of V2014.0, theALfnFormatusesILcdDataSourceinstances to create the models.getName()Gets the name of this format.Gets the SLD GXY layer factory of this format, if any.groupAssetPartsForDataSources(List<ALfnAssetMetadata> aAssetMetadatas) This method is responsible for grouping allAssetPartinstances into groups.booleanisAssetOfFormat(ALfnAssetMetadata aAssetMetadata) ReturnstruewhenaAssetMetadatawas created by thisALfnFormat,falseotherwise.booleanisAssetPartOfFormat(ALfnAssetMetadata.AssetPart aAssetPart) ReturnstruewhenaAssetPartwas created by thisALfnFormat,falseotherwise.booleanIndicates if this format's model decoder produces models that supports asset sources in Tile Store.abstract booleanisModelOfFormat(ILcdModel aModel) Checks whether a model is of this format.static ALfnFormatnewElevationFormat(ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdGXYLayerFactory aGXYLayerFactory, ILcdModelHeightProviderFactory aHeightProviderFactory, String aModelDescriptorTypeName, Class<? extends ILcdModelDescriptor>... aModelDescriptorClasses) Creates a newALfnFormatinstance which provides support for theELEVATIONdata type with the specified parameters.static ALfnFormatnewElevationFormat(String aFormatId, ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdSLDGXYLayerFactory aGXYLayerFactory, ILcdModelHeightProviderFactory aHeightProviderFactory, String aModelDescriptorTypeName, Class<? extends ILcdModelDescriptor>... aModelDescriptorClasses) Creates a newALfnFormatinstance which provides support for theELEVATIONdata type with the specified parameters.static ALfnFormatnewImageFormat(ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdGXYLayerFactory aGXYLayerFactory, String aModelDescriptorTypeName, Class<? extends ILcdModelDescriptor>... aModelDescriptorClasses) Creates a newALfnFormatinstance which provides support for theIMAGEdata type with the specified parameters.static ALfnFormatnewImageFormat(String aFormatId, ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdSLDGXYLayerFactory aGXYLayerFactory, String aModelDescriptorTypeName, Class<? extends ILcdModelDescriptor>... aModelDescriptorClasses) Creates a newALfnFormatinstance which provides support for theIMAGEdata type with the specified parameters.static ALfnFormatnewVectorFormat(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.static ALfnFormatnewVectorFormat(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.toString()
-
Field Details
-
VPF_FORMAT_ID
Thenameof the default format responsible for VPF data- Since:
- 2014.0
- See Also:
-
AIXM_FORMAT_ID
Thenameof the default format responsible for AIXM 3.3, 4.0 and 4.5 data- Since:
- 2014.0
- See Also:
-
AIXM51_FORMAT_ID
Thenameof the default format responsible for AIXM 5.1 data- Since:
- 2014.0
- See Also:
-
S57_FORMAT_ID
Thenameof the default format responsible for S-57 ECDIS data- Since:
- 2014.0
- See Also:
-
S63_FORMAT_ID
Thenameof the default format responsible for S-63 ECDIS data- Since:
- 2014.0
- See Also:
-
RASTER_TILE_STORE_FORMAT_ID
Thenameof the default format responsible for raster tile store data- Since:
- 2014.0
- See Also:
-
DGN_FORMAT_ID
Thenameof the default format responsible for DGN data- Since:
- 2014.0
- See Also:
-
GEOSPATIAL_PDF_FORMAT_ID
Thenameof the default format responsible for Geospatial PDF data- Since:
- 2014.0
- See Also:
-
WMTS_FORMAT_ID
Thenameof the default format responsible for WMTS data- Since:
- 2015.0
- See Also:
-
DTED_FORMAT_ID
Thenameof the default format responsible for DTED data- Since:
- 2014.0
- See Also:
-
DTED_DIRECTORY_FORMAT_ID
Thenameof the default format responsible for DTED directory data- Since:
- 2019.0
- See Also:
-
DMED_FORMAT_ID
Thenameof the default format responsible for DMED data- Since:
- 2014.0
- See Also:
-
DEM_FORMAT_ID
Thenameof the default format responsible for DEM data- Since:
- 2014.0
- See Also:
-
ETOPO_FORMAT_ID
Thenameof the default format responsible for ETOPO data- Since:
- 2014.0
- See Also:
-
SWISS_DHM_FORMAT_ID
Thenameof the default format responsible for Swiss DHM data- Since:
- 2014.0
- See Also:
-
GEO_TIFF_FORMAT_ID
Thenameof the default format responsible for GeoTIFF data- Since:
- 2014.0
- See Also:
-
JAI_FORMAT_ID
Thenameof the default format responsible for JAI data- Since:
- 2014.0
- See Also:
-
RST_FORMAT_ID
Thenameof the default format responsible for RST data- Since:
- 2014.0
- See Also:
-
TFW_FORMAT_ID
Thenameof the default format responsible for TFW data- Since:
- 2014.0
- See Also:
-
TAB_FORMAT_ID
Thenameof the default format responsible for TAB data- Since:
- 2014.0
- See Also:
-
BIL_FORMAT_ID
Thenameof the default format responsible for BIL data- Since:
- 2014.0
- See Also:
-
CADRG_FORMAT_ID
Thenameof the default format responsible for CADRG data- Since:
- 2014.0
- See Also:
-
JPEG_2000_FORMAT_ID
Thenameof the default format responsible for JPEG2000 data- Since:
- 2014.0
- See Also:
-
USRP_FORMAT_ID
Thenameof the default format responsible for USRP data- Since:
- 2014.0
- See Also:
-
ECW_FORMAT_ID
Thenameof the default format responsible for ECW data- Since:
- 2014.0
- See Also:
-
GEO_SPOT_FORMAT_ID
Thenameof the default format responsible for GeoSPOT data- Since:
- 2014.0
- See Also:
-
MR_SID_FORMAT_ID
Thenameof the default format responsible for MrSID data- Since:
- 2014.0
- See Also:
-
DIMAP_FORMAT_ID
Thenameof the default format responsible for DIMAP data- Since:
- 2014.0
- See Also:
-
NITF_FORMAT_ID
Thenameof the default format responsible for NITF data- Since:
- 2014.0
- See Also:
-
BCI_FORMAT_ID
Thenameof the default format responsible for BCI data- Since:
- 2014.0
- See Also:
-
ORACLE_GEO_RASTER_FORMAT_ID
Thenameof the default format responsible for Oracle GeoRaster data- Since:
- 2014.0
- See Also:
-
SHP_FORMAT_ID
Thenameof the default format responsible for SHP data- Since:
- 2014.0
- See Also:
-
MIF_FORMAT_ID
Thenameof the default format responsible for MIF data- Since:
- 2014.0
- See Also:
-
MAP_FORMAT_ID
Thenameof the default format responsible for MAP data- Since:
- 2014.0
- See Also:
-
GML2_FORMAT_ID
Thenameof the default format responsible for GML2 data- Since:
- 2014.0
- See Also:
-
GML31_FORMAT_ID
Thenameof the default format responsible for GML3.1 data- Since:
- 2014.0
- See Also:
-
GML32_FORMAT_ID
Thenameof the default format responsible for GML3.2 data- Since:
- 2014.0
- See Also:
-
ARC_SDE_RASTER_FORMAT_ID
Deprecated.ArcSDE has been discontinued by Esri as of ArcGIS 10.3.See these links for more information:
- http://downloads2.esri.com/support/TechArticles/W34229_DEPRECATION_PLAN_FOR_ARCGIS_10_4_and_10_3_1__082015.pdf
- http://blogs.esri.com/esri/supportcenter/2015/02/11/where-is-the-install-for-arcsde-10-3/
As an alternative to the ArcSDE connector, LuciadLightspeed offers direct connectors for the spatial database back-ends supported by ArcSDE/ArcGIS: SQL Server, Oracle Spatial, DB2, Informix, PostGIS or SAP Hana.
You can also use any of the OGC services (WMS, WFS, WCS).
Contact Luciad Support for more information on how to obtain and use these connectors.Deprecated since LuciadFusion 2016.0.
Thenameof the default format responsible for ArcSDE raster data- Since:
- 2014.0
- See Also:
-
ARC_SDE_VECTOR_FORMAT_ID
Deprecated.ArcSDE has been discontinued by Esri as of ArcGIS 10.3.See these links for more information:
- http://downloads2.esri.com/support/TechArticles/W34229_DEPRECATION_PLAN_FOR_ARCGIS_10_4_and_10_3_1__082015.pdf
- http://blogs.esri.com/esri/supportcenter/2015/02/11/where-is-the-install-for-arcsde-10-3/
As an alternative to the ArcSDE connector, LuciadLightspeed offers direct connectors for the spatial database back-ends supported by ArcSDE/ArcGIS: SQL Server, Oracle Spatial, DB2, Informix, PostGIS or SAP Hana.
You can also use any of the OGC services (WMS, WFS, WCS).
Contact Luciad Support for more information on how to obtain and use these connectors.Deprecated since LuciadFusion 2016.0.
Thenameof the default format responsible for ArcSDE vector data- Since:
- 2014.0
- See Also:
-
ORACLE_SPATIAL_FORMAT_ID
Thenameof the default format responsible for Oracle Spatial data- Since:
- 2014.0
- See Also:
-
JPIP_FORMAT_ID
Thenameof the default format responsible for JPIP data- Since:
- 2014.0
- See Also:
-
NETCDF_FORMAT_ID
Thenameof the default NetCDF format (handles GRIB data as well).- Since:
- 2016.0
- See Also:
-
GDAL_FORMAT_ID
Thenameof the default GDAL format. GDAL is primarily used to decode ERDAS Imagine data.- Since:
- 2016.0
- See Also:
-
ECRG_FORMAT_ID
Thenameof the default ECRG format.- Since:
- 2016.0
- See Also:
-
POSTGIS_FORMAT_ID
- See Also:
-
-
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
ALfnFormatinstance 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 factorythat delegates toaGXYLayerFactory, and will ignore any of the SLD information present in the coverage.The format will be initialized with an
ILfnDataSourceModelDecoderFactorythat delegates toaModelDecoderFactory. Note that this createdILfnDataSourceModelDecoderFactoryinstance only accepts theILcdDataSourceinstances which are created by the default implementation ofcreateDataSource(java.util.List). If you want to override that method, you also need to make sure a customILfnDataSourceModelDecoderFactoryis returned from thegetDataSourceModelDecoderFactory()method.The format uses the
nameofaModelDecoderFactoryasformat name. This name should never change.- Parameters:
aModelDecoderFactory- the model decoder factoryaGXYLayerFactory- the GXY layer factory. The SLD GXY layer factory will delegate to this one.aHeightProviderFactory- the height provider factoryaIdentityProviderFactory- 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
ILfnDataSourceModelDecoderFactorythat delegates toaModelDecoderFactory. Note that this createdILfnDataSourceModelDecoderFactoryinstance only accepts theILcdDataSourceinstances which are created by the default implementation ofcreateDataSource(java.util.List). If you want to override that method, you also need to make sure a customILfnDataSourceModelDecoderFactoryis returned from thegetDataSourceModelDecoderFactory()method.- Parameters:
aFormatId- the unique identifier for this format, this should never changeaModelDecoderFactory- the model decoder factoryaSLDGXYLayerFactory- the SLD GXY layer factory. The GXY layer factory will delegate to this one.aHeightProviderFactory- the height provider factoryaIdentityProviderFactory- 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 createsILcdDataSourceinstances which will not be accepted byaModelDecoderFactory. It might also be needed to override thegroupAssetPartsForDataSources(java.util.List). Consult the javadoc of those methods for more information.- Parameters:
aFormatId- the unique identifier for this format, this should never changeaModelDecoderFactory- the model decoder factoryaSLDGXYLayerFactory- the SLD GXY layer factory. The GXY layer factory will delegate to this one.aHeightProviderFactory- the height provider factoryaIdentityProviderFactory- 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
ALfnFormatinstance which provides support for theIMAGEdata 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 IDaGXYLayerFactory- the GXY layer factory, which will be adapted to aILcdSLDGXYLayerFactoryaModelDescriptorTypeName- the type name of the model descriptor ornullaModelDescriptorClasses- 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
ALfnFormatinstance which provides support for theIMAGEdata 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 changeaModelDecoderFactory- the model decoder factoryaGXYLayerFactory- the SLD GXY layer factoryaModelDescriptorTypeName- the type name of the model descriptor ornullaModelDescriptorClasses- 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
ALfnFormatinstance which provides support for theELEVATIONdata 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 IDaGXYLayerFactory- the GXY layer factory, which will be adapted to aILcdSLDGXYLayerFactoryaHeightProviderFactory- the height provider factoryaModelDescriptorTypeName- the type name of the model descriptor ornullaModelDescriptorClasses- 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
ALfnFormatinstance which provides support for theELEVATIONdata 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 changeaModelDecoderFactory- the model decoder factoryaGXYLayerFactory- the SLD GXY layer factoryaHeightProviderFactory- the height provider factoryaModelDescriptorTypeName- the type name of the model descriptor ornullaModelDescriptorClasses- 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
ALfnFormatinstance which provides support for theVECTORdata 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 IDaGXYLayerFactory- the GXY layer factory, which will be adapted to aILcdSLDGXYLayerFactoryaFeatureIdProviderFactory- the feature ID provider factory for vector dataaModelDescriptorTypeName- the type name of the model descriptor ornullfor anyaModelDescriptorClasses- 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
ALfnFormatinstance which provides support for theVECTORdata 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 changeaModelDecoderFactory- the model decoder factoryaGXYLayerFactory- the SLD GXY layer factoryaFeatureIdProviderFactory- the feature ID provider factory for vector dataaModelDescriptorTypeName- the type name of the model descriptor ornullfor anyaModelDescriptorClasses- the possible classes of the model descriptor or none for any
-
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
Deprecated.As of V2014.0, theALfnFormatusesILcdDataSourceinstances to create the models. UsegetDataSourceModelDecoderFactory()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
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 thegroupAssetPartsForDataSources(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
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 returnsnull, it will not be possible to fuse asIMAGE.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 regularILcdGXYLayerFactoryis.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
Deprecated.override #getSLDGXYLayerFactory insteadGets 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 returnsnull, it will not be possible to fuse asIMAGE(see class javadoc).This method is no longer used by LuciadFusion. LuciadFusion uses the
SLD GXY layer factorymethod. The recommended way to replace the layer factory of a format is to override thegetSLDGXYLayerFactory()method.- Returns:
- a GXY layer factory, possibly
null
-
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 returnsnull, it will not be possible to fuse asELEVATION(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
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 returnsnull, it will not be possible to fuse asVECTOR(see class javadoc).- Returns:
- a feature ID provider factory, possibly
null - Since:
- 11.0
-
createAsset
Creates an asset for a given model. This method is typically only called when you already have an
ILcdModelavailable. If the model does not yet exists, the recommended way is to use thecreateAsset(String, java.util.List)method instead.The implementation of this method has to set all the properties of the asset, notably:
- ALfnResourceMetadata.Builder.id(String): a unique id
- ALfnAssetMetadata.Builder.type(ELfnDataType): the native type of the data
- ALfnAssetMetadata.Builder.supportedCoverageTypes(ELfnDataType...): the types of coverages for which this asset can be used. Most commonly, the source asset data type and target coverage data types match, but this does not need to be the case. For example, ECDIS has
VECTORas (source) asset data type, but currently only supports fusion to a target coverage with data typeIMAGE. - TLfnVectorAssetMetadata.Builder.dataModel(TLcdDataModel): the data model associated with the (vector) asset
- TLfnVectorAssetMetadata.VectorAssetPart.getScaleDenominator(): the scale associated with the (vector) asset part, if known
- TLfnRasterAssetMetadata.RasterAssetPart.getPixelDensity(): the pixel density of the (raster) asset part
This method is typically called by the LuciadFusion API user. In order to fuse data, you need to create and pass
ALfnAssetMetadatainstances 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
nullif 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
aSourceNameitself, 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 useALfnTileStore.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
ILcdModelfor the source, and pass that model to thecreateAsset(com.luciad.model.ILcdModel)method. The default implementation makes no use of theaOtherAssetMetadatasparameter.The format has to set all the properties of the asset, notably:
- ALfnResourceMetadata.Builder.id(String): a unique id
- ALfnAssetMetadata.Builder.type(ELfnDataType): the native type of the data
- ALfnAssetMetadata.Builder.supportedCoverageTypes(ELfnDataType...): the types of coverages for which this asset can be used. Most commonly, the source asset data type and target coverage data types match, but this does not need to be the case. For example, ECDIS has
VECTORas (source) asset data type, but currently only supports fusion to a target coverage with data typeIMAGE. - TLfnVectorAssetMetadata.Builder.dataModel(TLcdDataModel): the data model associated with the (vector) asset
- TLfnVectorAssetMetadata.VectorAssetPart.getScaleDenominator(): the scale associated with the (vector) asset part, if known
- TLfnRasterAssetMetadata.RasterAssetPart.getPixelDensity(): the pixel density of the (raster) asset part
This method is typically called by the LuciadFusion API user. In order to fuse data, you need to create and pass
ALfnAssetMetadatainstances to LuciadFusion. The creation of those assets is done by calling this method.- Parameters:
aSourceName- The source nameaOtherAssetMetadatas- a list of already existing asset metadatas which may be used by the format to deduce information for the new asset. May benullor empty.- Returns:
- the asset, or
nullif 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
Returns
falsewhen the format is certain it cannot create an asset for the given source,trueotherwise. 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
aSourceitself, 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
truedoes 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 ignoresaOtherAssetMetadatas.This method is typically called by the LuciadFusion API user. In order to fuse data, you need to create and pass
ALfnAssetMetadatainstances to LuciadFusion. Before you call thecreateAssetmethods, you need to call this method.- Parameters:
aSourceName- the source to be testedaOtherAssetMetadatas- a list of already existing asset metadatas which may be used by the format to deduce information for the new asset. May benullor empty.- Returns:
trueif the given source can be decoded to an asset and/or model,falseotherwise.- Since:
- 2014.0
- See Also:
-
groupAssetPartsForDataSources
public List<List<ALfnAssetMetadata.AssetPart>> groupAssetPartsForDataSources(List<ALfnAssetMetadata> aAssetMetadatas) This method is responsible for grouping all
AssetPartinstances into groups. For each of those groups, anILcdDataSourcewill be created by calling thecreateDataSource(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 anILcdModel(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 anILcdDataSourceand pass it to the model decoder.This method indicates to the fusion process whichAssetParts needs to be grouped together when anILcdDataSourceis created. When this method groups theAssetParts representing the update file(s) together with the ones corresponding to the base files, they will be passed as one group to thecreateDataSource(java.util.List)method which allows to create anILcdDataSourcerepresenting both the base and update.If you override this method, you also need to adjust the
createDataSource(java.util.List)method and provide a customgetDataSourceModelDecoderFactory(). 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 theALfnAssetMetadatainstances available in the coverage.- Returns:
- A
Listcontaining groups ofAssetPartinstances (where a group is represented by aListas well). EachAssetPartgroup will be passed to thecreateDataSource(java.util.List)method to create anILcdDataSource. - Since:
- 2014.0
-
createDataSource
This method is responsible for creating an
ILcdDataSourcewhich represents allAssetPartinstances inaAssetPartsGroup. WhichAssetPartinstances are contained inaAssetPartsGroupis determined by the result of thegroupAssetPartsForDataSources(java.util.List)method.The default implementation of this method creates
ILcdDataSourceinstances which are accepted by the defaultILfnDataSourceModelDecoderFactory. If you used a constructor which accepts a customILfnDataSourceModelDecoderFactory, or you have overridden thegetDataSourceModelDecoderFactory()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 thegroupAssetPartsForDataSources(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 ofAssetPartinstances for which anILcdDataSourcemust be created. AllAssetPartinstances should have been created by this format.- Returns:
- An
ILcdDataSourcerepresenting allAssetParts contained inaAssetPartsGroup - Since:
- 2014.0
-
isModelOfFormat
Checks whether a model is of this format.- Parameters:
aModel- the model- Returns:
trueif the given model is of this format,falseotherwise
-
isAssetOfFormat
Returns
truewhenaAssetMetadatawas created by thisALfnFormat,falseotherwise. 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 theTLfnCompositeFormatand work against the composite instance, without having to bother whichALfnFormatcorresponded to which asset (part).- Parameters:
aAssetMetadata- The asset- Returns:
truewhenaAssetMetadatawas created by thisAlfnFormat,falseotherwise- Since:
- 2014.0
-
isAssetPartOfFormat
Returns
truewhenaAssetPartwas created by thisALfnFormat,falseotherwise. 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 theTLfnCompositeFormatand work against the composite instance, without having to bother whichALfnFormatcorresponded to which asset (part).- Parameters:
aAssetPart- The asset part- Returns:
truewhenaAssetPartwas created by thisALfnFormat,falseotherwise- Since:
- 2014.0
-
toString
-
isAssetSourcesInTileStoreSupported
public boolean isAssetSourcesInTileStoreSupported()Indicates if this format's model decoder produces models that supports asset sources in Tile Store. This implementation returnsfalseby default, subclasses may returntrue. 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
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.TXTorENC.PMTfiles need to be next to theCATALOG.031file, 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
namesof 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
-