Interface ILcdLayerMeasureProviderFactory
- All Known Implementing Classes:
TLcdGXYASTERIXLayerMeasureProviderFactory
,TLcdGXYImageLayerMeasureProviderFactory
,TLcyCompositeLayerMeasureProviderFactory
,TLspASTERIXLayerMeasureProviderFactory
,TLspImageLayerMeasureProviderFactory
This interface provides a method to create a measure provider from a layer and a view.
Relation to the ILcdModelMeasureProviderFactory
This interface is similar to the ILcdModelMeasureProviderFactory
except
that it creates a measure provider from a layer and view instead of a model. The created measure
provider should return measurements as they are being used (ex. painted) by the layer at that time. In
other words, the returned measurements are in sync with the layer and view. Using a layer-based
measure provider often results in better performance because it uses the same data as the layer
(e.g. is likely that the necessary data is cached). Layer measure provider factories can for example
be used for a mouse read-out, whereas model measure provider factories are typically used for analysis.
Sample Code
// Create a measure provider factory.
ILcdLayerMeasureProviderFactory factory = ...
// Create a measure provider from a layer.
ALcdMeasureProvider measureProvider = factory.createMeasureProvider(aLayer, aView);
// Create a parameters object with an optional interpolation type.
Parameters parameters = Parameters.newBuilder().interpolationType(type).build();
// Retrieve measurements using this measure provider.
TLcdISO19103Measure[] measures = measureProvider.retrieveMeasuresAt(point, pointReference, parameters);
Note that instances of this interface can be used to configure a view measure provider that makes it easy to
retrieve measure for all layers in a view. See for example TLcdGXYViewMeasureProvider
.
Note that LuciadLightspeed uses more specific API for height values:
ILcdLayerHeightProviderFactory
- Since:
- 2015.0
-
Method Summary
Modifier and TypeMethodDescriptioncreateMeasureProvider
(ILcdLayer aLayer, ILcdView aView) Creates a new measure provider, based on the given layer and view, ornull
if no measure provider can be created.
-
Method Details
-
createMeasureProvider
Creates a new measure provider, based on the given layer and view, ornull
if no measure provider can be created.- Parameters:
aLayer
- the layer for which to create a measure provideraView
- the view for which to create a measure provider- Returns:
- a measure provider, or
null
if no measure provider can be created for the given layer and view.
-