← Back to carmenta.com
Carmenta Engine SDK Documentation
×

SightLine Enumeration

Used for TargetLineOfSightOperator.OutputSightLines to determine whether the operator shall generate free and/or interrupted lines of sight.

Namespace: Carmenta.Engine
NuGet/Assembly: Carmenta.Engine.5.16.2.nupkg (in the CEOperators assembly)

Syntax

C#
public enum SightLine

Values

Value nameValueDescription
None0

No lines shall be generated.

Line1

If the TargetLineOfSightOperator is used in binary mode: Every free line of sight between observer and target shall generate one line feature.

If the operator is used in continuous mode: A line feature shall be generated between any observer/target pair for which the custom propagation model gives a well-defined value (not a "no signal" value).

The line feature is intended only for a 2D map, so the z values are not important, and the line feature will contain only two points, starting at the observer and ending at the target. See Remarks below about attributes.

Line3D2

The behavior is the same as the previous choice, except that the lines will get intermediate points with interpolated z values, at most 5 km apart.

InterruptedLine3

Every interrupted line of sight from an observer toward a target shall generate two line features. The first line will start at the observer in the direction toward the target, and will stop at the first terrain obstruction. The second line will go the rest of the way from the first terrain obstruction to the target. The two line features can be distinguished by their attributes; see Remarks below. The line features are intended only for a 2D map, so the z values are not important, and each line will contain only two points. Note that the two line features will be generated only when terrain obstructs the line of sight, and there are other reasons why an observer may fail to see a target: it may be farther away than the maximal range, for example.

InterruptedLine3D4

The behavior is the same as the previous choice, except that the lines will get intermediate points with interpolated z values, at most 5 km apart.

AnyLine5

Line features shall be generated for both free and interrupted lines of sight, as described above. The lines are intended only for a 2D map, so the z values are not important, and each line will contain only two points. The various kinds of line features can be distinguished by their attributes; see Remarks below.

AnyLine3D6

The behavior is the same as the previous choice, except that the lines will get intermediate points with interpolated z values, at most 5 km apart.

Remarks

When the TargetLineOfSightOperator uses a custom propagation model, only the first two values are supported.

Accuracy: the 2D position of the first obstruction is calculated from the first terrain elevation cell that is above the straight line of sight. But strictly speaking, the true 2D position is somewhere between that cell and the previous, so the calculated 2D position is usually between 0.0 and 1.0 cells too close to the target.

Note also that the first obstruction is not necessarily the highest one.

A vertical profile of an interrupted line of sight.

Attributes

Each generated line feature will get the two attributes observer and target containing the names of the observer and target; see TargetLineOfSightOperator.ObserverName and TargetLineOfSightOperator.TargetName. Other line attributes depend on whether the TargetLineOfSightOperator is used in binary or continuous mode.

Binary mode

The three types of line features can be distinguished by a lineType attribute whose value is an Atom. The possible values of lineType are

  • free, the line feature represents a free line of sight from observer to target.

  • observerToFirstObstruction, the line feature represents the first part of an interrupted line of sight, from observer to first terrain obstruction.

  • firstObstructionToTarget, the line feature represents the second part of an interrupted line of sight, from first terrain obstruction to target.

Note that if these values are used in an Expression, they must be prefixed by a # character since they are Atom constants. For example, to display just the point of first obstruction, you can use a SymbolVisualizer with at set to 0, repeat set to No, and a condition with the expression

         lineType = #firstObstructionToTarget

Continuous mode

The line feature will get an attribute named propagation containing a Double: the value returned by the ICustomPropagation.Propagate method for the observer/target pair. And the lineType attribute will get the value

  • otherCustomPropagationType.

Selection

A generated line feature cannot be selected individually. The feature id for the line feature will be copied from the feature id of the target, so if the target is selected, selection visualizers will be applied to both the target feature and the corresponding line features.

Warning

If you have many targets outside the current View.Area, turning on line generation may make the TargetLineOfSightOperator much slower. This is because targets outside the view area must then be processed by the operator, since lines of sight toward them may pass through the view area.

Platforms

Windows, Linux, Android

By accessing the information on this site you accept our terms and conditions and privacy policy.
This site uses cookies to enhance your experience and provide additional functionality.

Accept