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
ConstructorsConstructorDescriptionDefault 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 anILcdGXYLayerfor representing anILcdModelon anILcdGXYView.final TLcdS52DisplaySettingsReturns the display settings used by this layer factory.doubleGets the scale factor for the S-52 symbols rendered by this layer factory, in pixels per millimeter.booleanIndicates whether the S-52 symbologies used by this layer factory use anti-aliasing or not.voidsetAntiAliasing(boolean aAntiAliasing) Indicates whether the S-52 symbologies used by this layer factory should use anti-aliasing or not.voidsetScaleFactor(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-truewhen 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:
truewhen anti-aliasing is turned on;falseotherwise
-
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:ILcdGXYLayerFactoryCreates anILcdGXYLayerfor representing anILcdModelon anILcdGXYView.- Specified by:
createGXYLayerin interfaceILcdGXYLayerFactory- Parameters:
aModel- a model that needs to be visualized in anILcdGXYView- Returns:
- a layer representing the given model, or
nullif such a layer cannot be created - See Also:
-