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:
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.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.ILcdDataSources
for the ALfnAssetMetaData
s in the coverage. These
ILcdDataSource
s 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
.
ELfnDataType
which information is retrieved from the model, and
stored. This is explained in the next section.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.
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.
Modifier and Type | Field and Description |
---|---|
static String |
AIXM_FORMAT_ID
The
name of the default format responsible
for AIXM 3.3, 4.0 and 4.5 data |
static String |
AIXM51_FORMAT_ID
The
name of the default format responsible
for AIXM 5.1 data |
static String |
ARC_SDE_RASTER_FORMAT_ID
Deprecated.
ArcSDE has been discontinued by Esri as of ArcGIS 10.3.
See these links for more information:
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. Deprecated since LuciadFusion 2016.0. |
static String |
ARC_SDE_VECTOR_FORMAT_ID
Deprecated.
ArcSDE has been discontinued by Esri as of ArcGIS 10.3.
See these links for more information:
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. Deprecated since LuciadFusion 2016.0. |
static String |
BCI_FORMAT_ID
The
name of the default format responsible
for BCI data |
static String |
BIL_FORMAT_ID
The
name of the default format responsible
for BIL data |
static String |
CADRG_FORMAT_ID
The
name of the default format responsible
for CADRG data |
static String |
DEM_FORMAT_ID
The
name of the default format responsible
for DEM data |
static String |
DGN_FORMAT_ID
The
name of the default format responsible
for DGN data |
static String |
DIMAP_FORMAT_ID
The
name of the default format responsible
for DIMAP data |
static String |
DMED_FORMAT_ID
The
name of the default format responsible
for DMED data |
static String |
DTED_DIRECTORY_FORMAT_ID
The
name of the default format responsible
for DTED directory data |
static String |
DTED_FORMAT_ID
The
name of the default format responsible
for DTED data |
static String |
ECRG_FORMAT_ID
The
name of the default ECRG format. |
static String |
ECW_FORMAT_ID
The
name of the default format responsible
for ECW data |
static String |
ETOPO_FORMAT_ID
The
name of the default format responsible
for ETOPO data |
static String |
GDAL_FORMAT_ID
The
name of the default GDAL format. |
static String |
GEO_SPOT_FORMAT_ID
The
name of the default format responsible
for GeoSPOT data |
static String |
GEO_TIFF_FORMAT_ID
The
name of the default format responsible
for GeoTIFF data |
static String |
GEOSPATIAL_PDF_FORMAT_ID
The
name of the default format responsible
for Geospatial PDF data |
static String |
GML2_FORMAT_ID
The
name of the default format responsible
for GML2 data |
static String |
GML31_FORMAT_ID
The
name of the default format responsible
for GML3.1 data |
static String |
GML32_FORMAT_ID
The
name of the default format responsible
for GML3.2 data |
static String |
JAI_FORMAT_ID
The
name of the default format responsible
for JAI data |
static String |
JPEG_2000_FORMAT_ID
The
name of the default format responsible
for JPEG2000 data |
static String |
JPIP_FORMAT_ID
The
name of the default format responsible
for JPIP data |
static String |
MAP_FORMAT_ID
The
name of the default format responsible
for MAP data |
static String |
MIF_FORMAT_ID
The
name of the default format responsible
for MIF data |
static String |
MR_SID_FORMAT_ID
The
name of the default format responsible
for MrSID data |
static String |
NETCDF_FORMAT_ID
The
name of the default NetCDF format (handles GRIB data as well). |
static String |
NITF_FORMAT_ID
The
name of the default format responsible
for NITF data |
static String |
ORACLE_GEO_RASTER_FORMAT_ID
The
name of the default format responsible
for Oracle GeoRaster data |
static String |
ORACLE_SPATIAL_FORMAT_ID
The
name of the default format responsible
for Oracle Spatial data |
static String |
POSTGIS_FORMAT_ID |
static String |
RASTER_TILE_STORE_FORMAT_ID
The
name of the default format responsible
for raster tile store data |
static String |
RST_FORMAT_ID
The
name of the default format responsible
for RST data |
static String |
S57_FORMAT_ID
The
name of the default format responsible
for S-57 ECDIS data |
static String |
S63_FORMAT_ID
The
name of the default format responsible
for S-63 ECDIS data |
static String |
SHP_FORMAT_ID
The
name of the default format responsible
for SHP data |
static String |
SWISS_DHM_FORMAT_ID
The
name of the default format responsible
for Swiss DHM data |
static String |
TAB_FORMAT_ID
The
name of the default format responsible
for TAB data |
static String |
TFW_FORMAT_ID
The
name of the default format responsible
for TFW data |
static String |
USRP_FORMAT_ID
The
name of the default format responsible
for USRP data |
static String |
VPF_FORMAT_ID
The
name of the default format responsible
for VPF data |
static String |
WMTS_FORMAT_ID
The
name of the default format responsible
for WMTS data |
Modifier | Constructor and Description |
---|---|
protected |
ALfnFormat()
Creates a new, non-initialized engine format.
|
protected |
ALfnFormat(ILcdEarthModelDecoderFactory aModelDecoderFactory,
ILcdGXYLayerFactory aGXYLayerFactory,
ILcdModelHeightProviderFactory aHeightProviderFactory,
ILfnIdentityProviderFactory aIdentityProviderFactory)
Creates a new engine format.
|
protected |
ALfnFormat(String aFormatId,
ILcdEarthModelDecoderFactory aModelDecoderFactory,
ILcdSLDGXYLayerFactory aSLDGXYLayerFactory,
ILcdModelHeightProviderFactory aHeightProviderFactory,
ILfnIdentityProviderFactory aIdentityProviderFactory)
Creates a new engine format.
|
protected |
ALfnFormat(String aFormatId,
ILfnDataSourceModelDecoderFactory aModelDecoderFactory,
ILcdSLDGXYLayerFactory aSLDGXYLayerFactory,
ILcdModelHeightProviderFactory aHeightProviderFactory,
ILfnIdentityProviderFactory aIdentityProviderFactory)
Creates a new engine format.
|
Modifier and Type | Method and Description |
---|---|
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. |
abstract ALfnAssetMetadata |
createAsset(ILcdModel aModel)
Creates an asset for a given model.
|
ALfnAssetMetadata |
createAsset(String aSourceName,
List<ALfnAssetMetadata> aOtherAssetMetadatas)
Creates an asset for a given source name.
|
ILcdDataSource |
createDataSource(List<ALfnAssetMetadata.AssetPart> aAssetPartsGroup)
This method is responsible for creating an
ILcdDataSource which represents all AssetPart
instances in aAssetPartsGroup . |
static List<ALfnFormat> |
createDefaultFormats(ALfnEngineEnvironment aEnvironment)
Gets a list of the default engine formats.
|
ILfnDataSourceModelDecoderFactory |
getDataSourceModelDecoderFactory()
Gets the data source model decoder factory of this format.
|
ILcdGXYLayerFactory |
getGXYLayerFactory()
Deprecated.
override #getSLDGXYLayerFactory instead
|
ILcdModelHeightProviderFactory |
getHeightProviderFactory()
Gets the height provider factory of this format, if any.
|
ILfnIdentityProviderFactory |
getIdentityProviderFactory()
Gets the (vector) feature ID provider factory of this format, if any.
|
ILcdEarthModelDecoderFactory |
getModelDecoderFactory()
Deprecated.
As of V2014.0, the
ALfnFormat uses ILcdDataSource instances to create
the models. Use getDataSourceModelDecoderFactory() instead of this method. |
String |
getName()
Gets the name of this format.
|
ILcdSLDGXYLayerFactory |
getSLDGXYLayerFactory()
Gets the SLD GXY layer factory of this format, if any.
|
List<List<ALfnAssetMetadata.AssetPart>> |
groupAssetPartsForDataSources(List<ALfnAssetMetadata> aAssetMetadatas)
This method is responsible for grouping all
AssetPart
instances into groups. |
boolean |
isAssetOfFormat(ALfnAssetMetadata aAssetMetadata)
Returns
true when aAssetMetadata was created by this ALfnFormat , false
otherwise. |
boolean |
isAssetPartOfFormat(ALfnAssetMetadata.AssetPart aAssetPart)
Returns
true when aAssetPart was created by this ALfnFormat , false
otherwise. |
boolean |
isAssetSourcesInTileStoreSupported()
Indicates if this format's model decoder produces models that supports asset sources in Tile Store.
|
abstract boolean |
isModelOfFormat(ILcdModel aModel)
Checks whether a model is of this format.
|
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. |
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. |
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. |
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. |
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.
|
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.
|
String |
toString() |
public static final String VPF_FORMAT_ID
name
of the default format responsible
for VPF datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String AIXM_FORMAT_ID
name
of the default format responsible
for AIXM 3.3, 4.0 and 4.5 datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String AIXM51_FORMAT_ID
name
of the default format responsible
for AIXM 5.1 datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String S57_FORMAT_ID
name
of the default format responsible
for S-57 ECDIS datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String S63_FORMAT_ID
name
of the default format responsible
for S-63 ECDIS datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String RASTER_TILE_STORE_FORMAT_ID
name
of the default format responsible
for raster tile store datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String DGN_FORMAT_ID
name
of the default format responsible
for DGN datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String GEOSPATIAL_PDF_FORMAT_ID
name
of the default format responsible
for Geospatial PDF datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String WMTS_FORMAT_ID
name
of the default format responsible
for WMTS datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String DTED_FORMAT_ID
name
of the default format responsible
for DTED datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String DTED_DIRECTORY_FORMAT_ID
name
of the default format responsible
for DTED directory datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String DMED_FORMAT_ID
name
of the default format responsible
for DMED datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String DEM_FORMAT_ID
name
of the default format responsible
for DEM datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String ETOPO_FORMAT_ID
name
of the default format responsible
for ETOPO datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String SWISS_DHM_FORMAT_ID
name
of the default format responsible
for Swiss DHM datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String GEO_TIFF_FORMAT_ID
name
of the default format responsible
for GeoTIFF datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String JAI_FORMAT_ID
name
of the default format responsible
for JAI datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String RST_FORMAT_ID
name
of the default format responsible
for RST datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String TFW_FORMAT_ID
name
of the default format responsible
for TFW datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String TAB_FORMAT_ID
name
of the default format responsible
for TAB datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String BIL_FORMAT_ID
name
of the default format responsible
for BIL datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String CADRG_FORMAT_ID
name
of the default format responsible
for CADRG datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String JPEG_2000_FORMAT_ID
name
of the default format responsible
for JPEG2000 datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String USRP_FORMAT_ID
name
of the default format responsible
for USRP datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String ECW_FORMAT_ID
name
of the default format responsible
for ECW datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String GEO_SPOT_FORMAT_ID
name
of the default format responsible
for GeoSPOT datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String MR_SID_FORMAT_ID
name
of the default format responsible
for MrSID datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String DIMAP_FORMAT_ID
name
of the default format responsible
for DIMAP datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String NITF_FORMAT_ID
name
of the default format responsible
for NITF datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String BCI_FORMAT_ID
name
of the default format responsible
for BCI datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String ORACLE_GEO_RASTER_FORMAT_ID
name
of the default format responsible
for Oracle GeoRaster datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String SHP_FORMAT_ID
name
of the default format responsible
for SHP datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String MIF_FORMAT_ID
name
of the default format responsible
for MIF datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String MAP_FORMAT_ID
name
of the default format responsible
for MAP datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String GML2_FORMAT_ID
name
of the default format responsible
for GML2 datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String GML31_FORMAT_ID
name
of the default format responsible
for GML3.1 datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String GML32_FORMAT_ID
name
of the default format responsible
for GML3.2 datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Values@Deprecated public static final String ARC_SDE_RASTER_FORMAT_ID
See these links for more information:
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.
name
of the default format responsible
for ArcSDE raster datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Values@Deprecated public static final String ARC_SDE_VECTOR_FORMAT_ID
See these links for more information:
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.
name
of the default format responsible
for ArcSDE vector datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String ORACLE_SPATIAL_FORMAT_ID
name
of the default format responsible
for Oracle Spatial datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String JPIP_FORMAT_ID
name
of the default format responsible
for JPIP datacreateDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String NETCDF_FORMAT_ID
name
of the default NetCDF format (handles GRIB data as well).createDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String GDAL_FORMAT_ID
name
of the default GDAL format.
GDAL is primarily used to decode ERDAS Imagine data.createDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String ECRG_FORMAT_ID
name
of the default ECRG format.createDefaultFormats(ALfnEngineEnvironment)
,
Constant Field Valuespublic static final String POSTGIS_FORMAT_ID
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.
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.
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 dataprotected 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.
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 dataprotected 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.
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 datapublic 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.
aModelDecoderFactory
- the model decoder factory, the name of which will be used as format IDaGXYLayerFactory
- 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 nonepublic 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).
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 or null
aModelDescriptorClasses
- the possible classes of the model descriptor or nonepublic 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.
aModelDecoderFactory
- the model decoder factory, the name of which will be used as format IDaGXYLayerFactory
- the GXY layer factory, which will be adapted to a ILcdSLDGXYLayerFactory
aHeightProviderFactory
- the height provider factoryaModelDescriptorTypeName
- the type name of the model descriptor or null
aModelDescriptorClasses
- the possible classes of the model descriptor or none forpublic 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).
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 or null
aModelDescriptorClasses
- the possible classes of the model descriptor or none forpublic static ALfnFormat newVectorFormat(ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdGXYLayerFactory aGXYLayerFactory, ILfnIdentityProviderFactory aFeatureIdProviderFactory, String aModelDescriptorTypeName, Class<? extends ILcdModelDescriptor>... aModelDescriptorClasses)
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.
aModelDecoderFactory
- the model decoder factory, the name of which will be used as format IDaGXYLayerFactory
- the GXY layer factory, which will be adapted to a ILcdSLDGXYLayerFactory
aFeatureIdProviderFactory
- the feature ID provider factory for vector dataaModelDescriptorTypeName
- the type name of the model descriptor or null
for anyaModelDescriptorClasses
- the possible classes of the model descriptor or none for anypublic static ALfnFormat newVectorFormat(String aFormatId, ILcdEarthModelDecoderFactory aModelDecoderFactory, ILcdSLDGXYLayerFactory aGXYLayerFactory, ILfnIdentityProviderFactory aFeatureIdProviderFactory, String aModelDescriptorTypeName, Class<? extends ILcdModelDescriptor>... aModelDescriptorClasses)
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).
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 or null
for anyaModelDescriptorClasses
- the possible classes of the model descriptor or none for anypublic 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.
"GeoTIFF"
public ILcdEarthModelDecoderFactory getModelDecoderFactory()
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.
null
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.
null
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.
null
public ILcdGXYLayerFactory getGXYLayerFactory()
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.
null
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.
null
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).
null
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:
VECTOR
as (source) asset data type, but currently only supports fusion to a target coverage with data type IMAGE
. 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.
aModel
- a model to create an asset fornull
if the model is not supportedcreateAsset(String, java.util.List)
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:
VECTOR
as (source) asset data type, but currently only supports fusion to a target coverage with data type IMAGE
. 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.
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 be null
or empty.null
if the source file is not supportedIOException
- any IO exception which occurs in the model decoder during the decoding of the modelcreateAsset(com.luciad.model.ILcdModel)
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.
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 be null
or empty.true
if the given source can be decoded to an asset and/or model, false
otherwise.createAsset(String, java.util.List)
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 AssetPart
s 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 AssetPart
s needs to be grouped together when an {@code ILcdDataSource} is created.
When this method groups the AssetPart
s 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.
aAssetMetadatas
- All the ALfnAssetMetadata
instances available in the coverage.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
.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.
aAssetPartsGroup
- A group of AssetPart
instances for which an ILcdDataSource
must be created.
All AssetPart
instances should have been created by this format.ILcdDataSource
representing all AssetPart
s contained in aAssetPartsGroup
public abstract boolean isModelOfFormat(ILcdModel aModel)
aModel
- the modeltrue
if the given model is of this format, false
otherwisepublic 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).
aAssetMetadata
- The assettrue
when aAssetMetadata
was created by this AlfnFormat
, false
otherwisepublic 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).
aAssetPart
- The asset parttrue
when aAssetPart
was created by this ALfnFormat
, false
otherwisepublic boolean isAssetSourcesInTileStoreSupported()
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.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:
PERMIT.TXT
or ENC.PMT
files need to be next to the CATALOG.031
file, or next to a specific cell file.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.
aEnvironment
- the environment for the default formats