VisualizationOperator Class
Represents an operator that connects visualizers to features which determines how features are drawn.
NuGet/Assembly: Carmenta.Engine.5.16.2.nupkg (in the CECore assembly)
Syntax
public class VisualizationOperator : UnaryOperator
Remarks
A VisualizationOperator connects visualizers to features that pass through it. They determine how each Feature is visualized. Each Visualizer that is connected to a Feature defines a particular type of drawing operation. The actual drawing operation does not take place until the feature reaches an OrdinaryLayer. Then all the attached visualizers (there may be more than one) are applied to the feature in the order they were attached; usually the same order as they are defined in the VisualizationOperator.
There are three different lists of visualizers that may be applied to the features, Visualizers, HoverVisualizers and SelectionVisualizers. Which ones are used depends on whether the feature is normal, hovered and/or selected, and on the value of the AlwaysApplyVisualizers property:
alwaysApplyVisualizers = True | alwaysApplyVisualizers = False | |
---|---|---|
Not hovered or selected | ||
Hovered, but not selected | ||
Selected |
Each Visualizer has a Visualizer.Condition that must evaluate to True before it is connected to the Feature.
The Mode property is used to define how already connected visualizers, connected by another VisualizationOperator or in a data set (usually a color table from a raster file) or other operator such as GeoTextureMapOperator should be treated.
Example
// Create a simple operator chain that visualizes point features from a MemoryDataSet
public static VisualizationOperator CreatePointVisualization(MemoryDataSet dataSet)
{
// Create a ReadOperator that reads from the MemoryDataSet
ReadOperator readOperator = new ReadOperator(dataSet);
// Create a VisualizationOperator that visualizes features from the ReadOperator
VisualizationOperator visualizationOperator = new VisualizationOperator(readOperator);
// Create visualization for non-selected features
SymbolVisualizer nonSelected = new SymbolVisualizer();
// Set a Condition that only uses the visualization for point features
nonSelected.Condition = new Condition("geoType = #point");
// Use the built-in RoundedSquare symbol
nonSelected.Symbol = Symbol.RoundedSquare;
// Change color from the default red to blue
nonSelected.Color = Color.Blue;
// Add the non-selected visualization to the VisualizationOperator
visualizationOperator.Visualizers.Add(nonSelected);
// Create visualization for selected features
SymbolVisualizer selected = nonSelected.Clone() as SymbolVisualizer;
// Use yellow for selected features
selected.Color = Color.Yellow;
// Make the selected symbol larger
selected.Scale = 1.5;
// Add the selected visualization to the VisualizationOperator
visualizationOperator.SelectionVisualizers.Add(selected);
// Return the new visualization
return visualizationOperator;
}
Inheritance Hierarchy
System.Object (not available in C#)
EngineObject
Operator
UnaryOperator
VisualizationOperator
Platforms
Windows, Linux, Android
VisualizationOperator Members
The VisualizationOperator type has the following members.
Constructors
Name | Description |
---|---|
VisualizationOperator | Initializes a new instance of the VisualizationOperator class. |
Properties
Name | Description |
---|---|
AlwaysApplyVisualizers | Gets or sets a value that determines whether the normal visualizers are always applied. |
Description | Gets or sets a short description of the operator. Inherited from Operator |
DisplayName | Gets or sets a display name for the operator. Inherited from Operator |
HoverVisualizers | Gets the visualizers that are applied to features that are hovered in a View. |
Input | Gets or sets the input operator, from which this operator reads features. Inherited from UnaryOperator |
IsDisposed | Gets a value that tells whether the current VisualizationOperator has been disposed. Inherited from EngineObject |
IsoMetadataDocument | Gets or sets the path to an ISO 19139 metadata document for the operator. Inherited from Operator |
Mode | Gets or sets the mode the VisualizationOperator works in. |
Name | Gets or sets the name of the operator. Inherited from Operator |
NativeHandle | Gets the native Carmenta Engine kernel object the current VisualizationOperator represents. Inherited from EngineObject |
SelectionVisualizers | Gets the visualizers that are applied to features that are selected in a View. |
IUserProperties.UserProperties | Gets the AttributeSet that contains the user properties. Inherited from IUserProperties |
Visualizers | Gets the visualizers that are applied to all features read by the VisualizationOperator. |
Methods
Name | Description |
---|---|
Clone | Creates a copy of an object. Inherited from EngineObject |
Dispose | Releases the reference to the native Carmenta Engine kernel instance the EngineObject represents. Inherited from EngineObject |
Equals | Determines whether this instance is equal to another. Inherited from EngineObject |
FindChildObject | Overloaded. Finds the child object with the specified name. Inherited from Operator |
FlushCache | Marks the layer as flushed which will release cached resources during the next update. Inherited from Operator |
GetChildObjects | Overloaded. Gets the child objects of the current object. Inherited from Operator |
GetFeatures | Overloaded. Gets features from the operator chain. Inherited from Operator |
GetLocalizedDescription | Gets a localized version of the operator description in a specific language. Inherited from Operator |
GetLocalizedDisplayName | Gets a localized version of the operator display name in a specific language. Inherited from Operator |
GetLocalizedIsoMetadataDocument | Gets the path to an ISO 19139 metadata document for a specific language. Inherited from Operator |
GetRasterFeature | Overloaded. Gets raster features from the operator chain and merges them into a single raster. Inherited from Operator |
HasLocalizedDescription | Checks if a localized version of the operator description is available in a specific language. Inherited from Operator |
HasLocalizedDisplayName | Checks if a localized version of the operator display name is available in a specific language. Inherited from Operator |
HasLocalizedIsoMetadataDocument | Checks if an ISO 19139 metadata document is available for a specific language. Inherited from Operator |
SetLocalizedDescription | Sets a operator description in a specific language. Inherited from Operator |
SetLocalizedDisplayName | Sets a operator display name in a specific language. Inherited from Operator |
SetLocalizedIsoMetadataDocument | Sets the path to an ISO 19139 metadata document for the operator, for a specific language. Inherited from Operator |