public class TLfnEngineFactory extends Object
A factory class for ALfnEngine
instances which perform the fusion on the
local system. Engines can be created using the createEngine(com.luciad.fusion.tilestore.ALfnTileStore, String)
method.
The engines created by this factory will perform the fusion on the local system. The target tile store
can be either local or remote. If you want to do the fusion on a remote system (the same system as the
tile store, or another system), you should use the TLfnLFSEngineFactory
class.
Example lifecycle:
createEngine
to create a new engine.
You cannot create an engine if one already exists. Use getEngines()
to see if an engine is already running.ALfnEngine.fuse(com.luciad.fusion.util.ILfnCallback<java.lang.Void>)
to start fusing. You can call this method more than once on the same engine.ALfnEngine.stop()
to stop the fusion process, if necessary.removeEngine(com.luciad.fusion.engine.ALfnEngine)
to remove the engine from the list of open engines.Modifier and Type | Class and Description |
---|---|
class |
TLfnEngineFactory.RasterSessionBuilder
Deprecated.
Sessions are not necessary anymore to create engines. See
migration details . (since 2013.0) |
static class |
TLfnEngineFactory.TileCombiningStrategy
The tile combining strategy defines how values of 4 tiles at level
N are combined into values of 1 tile at
level N - 1 . |
class |
TLfnEngineFactory.VectorSessionBuilder
Deprecated.
Sessions are not necessary anymore to create engines. See
migration details . (since 2013.0) |
Modifier and Type | Field and Description |
---|---|
static int[] |
ALL_LEVELS
Deprecated.
use
TLfnRasterCoverageMetadata.ALL_LEVELS instead (since 2013.0) |
Constructor and Description |
---|
TLfnEngineFactory()
Constructs an engine factory using the default engine environment and tile store provider.
|
TLfnEngineFactory(ALfnEngineEnvironment aEngineEnvironment)
Constructs an engine factory using a given engine environment and the default tile store provider.
|
TLfnEngineFactory(ALfnEngineEnvironment aEngineEnvironment,
ALfnTileStoreProvider aTileStoreProvider)
Constructs an engine factory using a given engine environment and tile store provider.
|
@Deprecated public static final int[] ALL_LEVELS
TLfnRasterCoverageMetadata.ALL_LEVELS
instead (since 2013.0)public TLfnEngineFactory(ALfnEngineEnvironment aEngineEnvironment, ALfnTileStoreProvider aTileStoreProvider)
aEngineEnvironment
- the engine environment, which may be null
to use the internal defaultaTileStoreProvider
- a tile store provider, which may be null
to use the internal defaultpublic TLfnEngineFactory(ALfnEngineEnvironment aEngineEnvironment)
aEngineEnvironment
- the engine environment, which may be null
to use the internal defaultpublic TLfnEngineFactory()
ALfnFormat.createDefaultFormats(ALfnEngineEnvironment)
.file:///mnt/LuciadFusion/tile-store.xml
or /mnt/LuciadFusion/tile-store.xml
.http://hostname:8081/LuciadFusion/lts
.@Deprecated public TLfnEngineFactory.RasterSessionBuilder newRasterSessionBuilder()
migration details
. (since 2013.0)The following properties must be set before a session can be built:
@Deprecated public TLfnEngineFactory.VectorSessionBuilder newVectorSessionBuilder()
migration details
. (since 2013.0)For vector data it is important to provide a multi-leveling geometry and simplification policy. The policy should ensure that the data density decreases as the levels get less detailed. This should be done by leaving out features and by simplifying the geometry of features sufficiently at less detailed levels.
The following properties must be set before a session can be built:
It is also highly recommended to set a geometry provider specific for your use case and enable simplification.
By default a fail-fast session handler is used, which will make the fusion abort on the first error.
public Collection<ALfnEngine> getEngines() throws IOException, TLfnServiceException
IOException
TLfnServiceException
removeEngine(com.luciad.fusion.engine.ALfnEngine)
@Deprecated public ALfnEngine createEngine(ALfnTileStore aTileStore, ILfnEngineSession aSession) throws IOException, TLfnServiceException
createEngine(ALfnTileStore, String)
instead (since 2013.0)
You can configure most options of raster
or vector
sessions on the coverage metadata, which eases the setup, and makes it persistent.
Common options:
assets
->
ALfnCoverageMetadata.Builder.assetInfos(ALfnCoverageMetadata.AssetInfo...)
asset order
->
TLfnRasterCoverageMetadata.Builder.preserveAssetOrder()
session handler
->
ALfnCoverageMetadata.Builder.ignoreNonFatalFailures()
and ALfnEngine.addSessionHandler(com.luciad.fusion.engine.raster.ILfnRasterSessionHandler)
Raster options:
Vector options:
IllegalArgumentException
upon violation.
The constraints are:
null
"INCOMPLETE"
.
In other words, it is not allowed to add additional assets to an existing coverage as long as that coverage has not yet been fully fusedaTileStore
- the LuciadFusion Tile Store that will host the coverageaSession
- the session information for the fusionIOException
- if a connection could not be made to the engineTLfnServiceException
- if a failure happens on the remote engineIllegalArgumentException
- in case the session is inconsistent in some wayIllegalStateException
- if an engine for the given coverage already existspublic ALfnEngine createEngine(ALfnTileStore aTileStore, String aCoverageID) throws IOException, TLfnServiceException
IllegalArgumentException
upon violation.
The constraints are:
null
aTileStore
- the LuciadFusion Tile Store that will host the coverageaCoverageID
- the id of the resource to fuse. The resource must exist in the Tile Store, otherwiseIOException
- if no connection could be made with the engineTLfnServiceException
- if a failure happens on the remote engineIllegalArgumentException
- in case the session is inconsistent in some way, or if no resource exists in the
Tile Store for the given ID.IllegalStateException
- if an engine for the given coverage already existspublic boolean removeEngine(ALfnEngine aEngine) throws IOException, TLfnServiceException
aEngine
- An engine, managed by this instance.true
if the engine existed, false otherwise.IOException
- if a connection could not be made to the engineTLfnServiceException
- if a failure happens on the remote enginecreateEngine(com.luciad.fusion.tilestore.ALfnTileStore, com.luciad.fusion.engine.ILfnEngineSession)