Package com.luciad.format.s52.gxy
Class TLcdS52GXYLayerFactory
java.lang.Object
com.luciad.format.s52.gxy.TLcdS52GXYLayerFactory
- All Implemented Interfaces:
ILcdGXYLayerFactory
@LcdService(service=ILcdGXYLayerFactory.class,
priority=20000)
public class TLcdS52GXYLayerFactory
extends Object
implements ILcdGXYLayerFactory
ILcdGXYLayerFactory
implementation which can create layers for S-57 models. Both
AML and ENC models are supported. The returned layer is an ILcdGXYEditableLabelsLayer
.
Example usage:
String source = ...;//can be a S-57 cell or catalogue file
TLcdS57UnifiedModelDecoder decoder = new TLcdS57UnifiedModelDecoder();
ILcdModel model = decoder.decode( source );
TLcdS52GXYLayerFactory layerFactory = new TLcdS52GXYLayerFactory();
ILcdGXYLayer layer = layerFactory.createGXYLayer( model );
- Since:
- 2013.1
- See Also:
-
Constructor Summary
ConstructorDescriptionDefault constructor.TLcdS52GXYLayerFactory
(TLcdS52DisplaySettings aDisplaySettings) Creates a layer factory which will use the specified display settings for all of the layers its creates. -
Method Summary
Modifier and TypeMethodDescriptioncreateGXYLayer
(ILcdModel aModel) Creates anILcdGXYLayer
for representing anILcdModel
on anILcdGXYView
.final TLcdS52DisplaySettings
Returns the display settings used by this layer factory.double
Gets the scale factor for the S-52 symbols rendered by this layer factory, in pixels per millimeter.boolean
Indicates whether the S-52 symbologies used by this layer factory use anti-aliasing or not.void
setAntiAliasing
(boolean aAntiAliasing) Indicates whether the S-52 symbologies used by this layer factory should use anti-aliasing or not.void
setScaleFactor
(double aScaleFactor) Sets the scale factor for the S-52 symbols rendered by this layer factory, in pixels per millimeter.
-
Constructor Details
-
TLcdS52GXYLayerFactory
public TLcdS52GXYLayerFactory()Default constructor. The layer factory created with this constructor will create its own display settings. If you want to specify the display settings, use theTLcdS52GXYLayerFactory(com.luciad.format.s52.TLcdS52DisplaySettings)
constructor.- See Also:
-
TLcdS52GXYLayerFactory
Creates a layer factory which will use the specified display settings for all of the layers its creates.- Parameters:
aDisplaySettings
- The display settings. Must not benull
- See Also:
-
-
Method Details
-
getDisplaySettings
Returns the display settings used by this layer factory. This display setting instance is used by all layers created by this layer factory (both future ones and layers which were already created). Making changes to the returned display settings instance will affect all those layers.- Returns:
- The display settings.
-
setAntiAliasing
public void setAntiAliasing(boolean aAntiAliasing) Indicates whether the S-52 symbologies used by this layer factory should use anti-aliasing or not. Anti-aliasing results in smoother icons and lines but may be slightly slower in rendering.
Changing this setting will only affect layers which are created after this setting has been changed. Layers which have been created earlier remain unaffected.
- Parameters:
aAntiAliasing
-true
when anti-aliasing should be turned on
-
isAntiAliasing
public boolean isAntiAliasing()Indicates whether the S-52 symbologies used by this layer factory use anti-aliasing or not. Anti-aliasing results in smoother icons and lines but may be slightly slower in rendering.
- Returns:
true
when anti-aliasing is turned on;false
otherwise
-
setScaleFactor
public void setScaleFactor(double aScaleFactor) Sets the scale factor for the S-52 symbols rendered by this layer factory, in pixels per millimeter. This setting affects the size of the rendered symbols: higher values yield larger symbols. The scale factor corresponds to a screen resolution. The default value is 3, which corresponds to a commodity screen resolution.- Parameters:
aScaleFactor
- a scale factor, in pixels per millimeter
-
getScaleFactor
public double getScaleFactor()Gets the scale factor for the S-52 symbols rendered by this layer factory, in pixels per millimeter. The scale factor corresponds to a screen resolution. The default value is 3, which corresponds to a commodity screen resolution.- Returns:
- the scale factor
-
createGXYLayer
Description copied from interface:ILcdGXYLayerFactory
Creates anILcdGXYLayer
for representing anILcdModel
on anILcdGXYView
.- Specified by:
createGXYLayer
in interfaceILcdGXYLayerFactory
- Parameters:
aModel
- a model that needs to be visualized in anILcdGXYView
- Returns:
- a layer representing the given model, or
null
if such a layer cannot be created - See Also:
-