public class TLcyLOSCoverageAddOn extends ALcyFormatAddOn
For line-of-sight support on a Lightspeed map, refer to TLcyLOSAddOn
and TLcyLspLOSAddOn
.
The back-end
performs the actual calculation. It can be used independently of the used
GUI.
The GUI's application pane is built by a ALcyApplicationPaneTool
, using the add-on's GUI factory
.
By default, this GUI uses the composite workspace preferences of the add-on's preferences tool
.
The add-on's functionality can be changed by extending the back-end, or by extending the GUI builder and tapping into the latter preferences object. See the TEA developer's guide for more information on using and extending TEA add-ons.
Note that this add-on depends on the LuciadLightspeed Terrain Analysis Engine component.
Modifier and Type | Field and Description |
---|---|
static String |
AUTO_UPDATE_KEY
Determines whether GUI changes should be automatically propagated to the layer and start a new contour
calculation.
|
static boolean |
AUTO_UPDATE_VALUE_DEFAULT |
static String |
COVERAGE_LIST_KEY
Property name for the available line-of-sight coverages.
|
static String |
LINKED_LAYER_KEY
The
ILcdGXYLayer that is linked to the GUI panel. |
static ILcdGXYLayer |
LINKED_LAYER_VALUE_DEFAULT
Default value for the property
LINKED_LAYER_KEY . |
static String |
OUTPUT_FORMAT_KEY
Property name for the used output format.
|
static String |
OUTPUT_FORMAT_RASTER_ID
Constant identifying a raster-based line-of-sight coverage.
|
static String |
OUTPUT_FORMAT_VALUE_DEFAULT
Default value for the property
OUTPUT_FORMAT_KEY . |
static String |
OUTPUT_FORMAT_VECTOR_ID
Constant identifying a vector-based line-of-sight coverage.
|
static String[] |
PROPAGATION_LIST_DEFAULT_VALUE
Default value for the property
PROPAGATION_LIST_KEY . |
static String |
PROPAGATION_LIST_KEY
Property name for the list of propagation functions to choose from.
|
static String |
QUALITY_DESCRIPTIONS_KEY
Property name for descriptions of the predefined quality levels to choose from.
|
static String[] |
QUALITY_DESCRIPTIONS_VALUE_DEFAULT
Default value for the
QUALITY_DESCRIPTIONS_KEY property. |
static String |
QUALITY_ITEMS_KEY
Property name for predefined quality levels to choose from.
|
static double[] |
QUALITY_ITEMS_VALUE_DEFAULT
Default value for the
QUALITY_ITEMS_KEY property. |
static String |
QUALITY_KEY
Quality property for calculations, expressed in meters per discretization step.
|
static double |
QUALITY_VALUE_DEFAULT
Default value for the
QUALITY_KEY property. |
static String |
SELECTED_COVERAGE_KEY
Property name for the currently selected coverage.
|
static String |
SELECTED_PROPAGATION_DEFAULT_VALUE
Default value for the property
SELECTED_PROPAGATION_KEY . |
static String |
SELECTED_PROPAGATION_KEY
Property name for the propagation function to use to calculate a line-of-sight coverage.
|
static String |
SPEEDUP_ENABLED_KEY
Property used to turn on/off using OpenCL for ILcdLOSCoverageMatrix calculations.
|
static boolean |
SPEEDUP_ENABLED_VALUE_DEFAULT
Default value for the OpenCL line-of-sight speedup enabled property.
|
Constructor and Description |
---|
TLcyLOSCoverageAddOn()
Default constructor for the line-of-sight coverage add-on.
|
Modifier and Type | Method and Description |
---|---|
protected ALcyApplicationPaneTool |
createApplicationPaneTool()
Returns the add-on's application pane tool.
|
protected ALcyFormat |
createBaseFormat()
Returns a new data format for this add-on.
|
ALcyFormat |
createFormatWrapper(ALcyFormat aBaseFormat)
Returns a new data format wrapper for this add-on.
|
protected ALcyGUIFactory<Component> |
createGUIFactory()
Returns a new GUI factory for this add-on.
|
protected TLcyLOSCoverageBackEnd |
createLOSCoverageBackEnd()
Returns a new back-end for line-of-sight coverage calculations.
|
protected TLcyPreferencesTool |
createPreferencesTool()
Creates the
TLcyPreferencesTool to be used by this add-on. |
ALcyApplicationPaneTool |
getApplicationPaneTool()
Returns the tool that creates the add-on's application pane.
|
ALcyGUIFactory<T> |
getGUIFactory()
Returns the GUI factory to create the add-on's application pane.
|
TLcyLOSCoverageBackEnd |
getLOSCoverageBackEnd()
The back-end that the GUI can use for performing line-of-sight coverage calculations.
|
void |
plugInto(ILcyLucyEnv aLucyEnv)
Builds a GUI, back-end and file format for line-of-sight coverage calculations and plugs in the GUI and file format.
|
void |
unplugFrom(ILcyLucyEnv aLucyEnv)
Unplugs the add-on's format, preferences tool and application pane tool.
|
createFormatTool, getFormat
getLongPrefix, getLucyEnv, getPreferences, getPreferencesTool, getShortPrefix
getConfigSourceName, getDisplayName, setConfigSourceName, setDisplayName
public static final String COVERAGE_LIST_KEY
SELECTED_COVERAGE_KEY
public static final String SELECTED_COVERAGE_KEY
TLcyLOSCoverageBackEnd
.
For example, the domain object for the coverage "Coverage23" can be found in the property named
""TLcyLOSCoverageAddOn.layer.tea.coverage."" + "Coverage23" + "." + TLcyLOSCoverageBackEnd.DOMAIN_OBJECT_CONTEXT_KEY
public static final String PROPAGATION_LIST_KEY
SELECTED_PROPAGATION_KEY
public static final String[] PROPAGATION_LIST_DEFAULT_VALUE
PROPAGATION_LIST_KEY
.public static final String SELECTED_PROPAGATION_KEY
TLcyLOSCoverageBackEnd
for the supported propagation functions.
TLcyLOSCoverageBackEnd.createPropagationFunction(com.luciad.lucy.util.properties.ALcyProperties)
is used to construct the actual provider.
The property value is used to define propagation function sub-property names.
The appropriate sub-property suffixes are defined in TLcyLOSCoverageBackEnd
.
For example, the altitude mode for the function TLcyLOSCoverageBackEnd.PROPAGATION_FUNCTION_VALUE_NORMAL
can be found in the sub-property named:
TLcyLOSCoverageBackEnd.PROPAGATION_FUNCTION_VALUE_NORMAL
+ "." + TLcyLOSCoverageBackEnd.ALTITUDE_MODE_KEY
public static final String SELECTED_PROPAGATION_DEFAULT_VALUE
SELECTED_PROPAGATION_KEY
.public static final String QUALITY_KEY
public static final double QUALITY_VALUE_DEFAULT
QUALITY_KEY
property.public static final String QUALITY_ITEMS_KEY
public static final double[] QUALITY_ITEMS_VALUE_DEFAULT
QUALITY_ITEMS_KEY
property.public static final String QUALITY_DESCRIPTIONS_KEY
public static final String[] QUALITY_DESCRIPTIONS_VALUE_DEFAULT
QUALITY_DESCRIPTIONS_KEY
property.public static final String OUTPUT_FORMAT_KEY
OUTPUT_FORMAT_RASTER_ID
or OUTPUT_FORMAT_VECTOR_ID
.public static final String OUTPUT_FORMAT_RASTER_ID
public static final String OUTPUT_FORMAT_VECTOR_ID
public static final String OUTPUT_FORMAT_VALUE_DEFAULT
OUTPUT_FORMAT_KEY
.public static final String LINKED_LAYER_KEY
ILcdGXYLayer
that is linked to the GUI panel. This value is automatically set when selecting
a contour layer in the active map's layer panel.
The corresponding property value is of type ILcdGXYLayer
public static final ILcdGXYLayer LINKED_LAYER_VALUE_DEFAULT
LINKED_LAYER_KEY
.public static final String AUTO_UPDATE_KEY
public static final boolean AUTO_UPDATE_VALUE_DEFAULT
public static final String SPEEDUP_ENABLED_KEY
public static final boolean SPEEDUP_ENABLED_VALUE_DEFAULT
TLcyLOSCoverageAddOn
.public TLcyLOSCoverageAddOn()
public void plugInto(ILcyLucyEnv aLucyEnv)
aLucyEnv
- the Lucy instance to plug intoALcyAddOn.unplugFrom(com.luciad.lucy.ILcyLucyEnv)
public TLcyLOSCoverageBackEnd getLOSCoverageBackEnd()
Override createLOSCoverageBackEnd()
to extend the back-end.
TLcyLOSCoverageBackEnd
object for performing line-of-sight coverage calculationscreateLOSCoverageBackEnd()
,
TLcyLOSCoverageBackEnd
protected TLcyLOSCoverageBackEnd createLOSCoverageBackEnd()
protected ALcyFormat createBaseFormat()
Returns a new data format for this add-on. Override this method to extend the default format with new functionality.
For example, to alter the icon of the layers of this format, you can decorate the layer factory created in the format:
@Override
protected ALcyFormat createBaseFormat() {
return new ALcyFormatWrapper(super.createBaseFormat()){
@Override
protected ILcdGXYLayerFactory createGXYLayerFactory(){
final ILcdGXYLayerFactory delegate = super.createGXYLayerFactory();
return new ILcdGXYLayerFactory(){
@Override
public ILcdGXYLayer createGXYLayer(ILcdModel aModel){
ILcdGXYLayer layer = delegate.createGXYLayer(aModel);
if (layer != null){
ILcdIcon icon = ...;
layer.setIcon(icon);
}
return layer;
}
}
}
}
}
Note that the created format is at least wrapped by a
TLcySafeGuardFormatWrapper
(or equivalent) before it is plugged in ILcyLucyEnv
(using e.g. TLcyFormatTool).
So it is safe to rely on the safety checks performed by that wrapper.
public final ALcyFormat createFormatWrapper(ALcyFormat aBaseFormat)
ALcyFormatAddOn
Returns a new data format wrapper for this add-on. A format wrapper extends the base format with aspects such as asynchronous painting, mutable file behavior, safe guarding, etc.
Overriding this method of an existing add-on should be done with extreme care as add-ons typically rely on the wrappers that should be present (e.g. a safe guard).
createFormatWrapper
in class ALcyFormatAddOn
aBaseFormat
- the base format to wrapALcyFormatWrapper
protected ALcyGUIFactory<Component> createGUIFactory()
For example, this add-on could return a new instance of TLcyLOSCoverageGUIFactory
protected ALcyApplicationPaneTool createApplicationPaneTool()
This add-on's application pane tool initializes the GUI factory with the add-on's composite workspace preferences. It also ensures that the panel is updated from the selected TEA layer's stored GUI properties.
TLcyLOSCoverageGUIFactory.UPDATE_LAYER_ACTION
public ALcyGUIFactory<T> getGUIFactory()
createGUIFactory()
if you want to override or extend the add-on's factory.public ALcyApplicationPaneTool getApplicationPaneTool()
createApplicationPaneTool()
if you want to override or extend the add-on's application pane tool.public void unplugFrom(ILcyLucyEnv aLucyEnv)
unplugFrom
in class ALcyFormatAddOn
aLucyEnv
- the Lucy environmentALcyAddOn.plugInto(com.luciad.lucy.ILcyLucyEnv)
protected TLcyPreferencesTool createPreferencesTool()
TLcyPreferencesTool
to be used by this add-on. Overwriting this method
for example allows to register additional ILcyPropertyConverter
s for (complex)
custom properties, to make sure they are correctly decoded from the add-on's configuration file
and/or saved to the workspace. Note that this isn't required for simple properties such as
String
, int
, double
, etc.createPreferencesTool
in class ALcyPreferencesAddOn
TLcyPreferencesTool
.