Class LineOfSight

  • Direct Known Subclasses:
    GeoElementLineOfSight, LocationLineOfSight

    public abstract class LineOfSight
    extends Analysis
    Line of Sight analysis calculates segments of visibility between two points.

    Maximum number of line of sights per GeoView is 64. Line of sights in excess of 64 will not be rendered.

    Since:
    10.2.0
    • Property Detail

      • visibleColor

        public static ObjectProperty<Color> visibleColorProperty
        The color used to render segments that are visible along LineOfSight analysis results.

        Sections of the line between the observer and the target that are visible are drawn with the specified color. This property is applied to all LineOfSight analyses in the view.

        Default is Color.LIME.

        Attempting to set the color to null will throw an exception.

        Since:
        200.0.0
        See Also:
        getVisibleColor(), setVisibleColor(Color)
      • obstructedColor

        public static ObjectProperty<Color> obstructedColorProperty
        The color used to render segments that are obstructed along the line of sight.

        Sections of the line between the observer and the target that are obstructed (not visible) are drawn with the specified color. This property is applied to all LineOfSight analyses in the view.

        Default is Color.RED.

        Attempting to set the color to null will throw an exception.

        Since:
        200.0.0
        See Also:
        getObstructedColor(), setObstructedColor(Color)
    • Method Detail

      • visibleColorProperty

        public static ObjectProperty<Color> visibleColorProperty()
        The color used to render segments that are visible along LineOfSight analysis results.

        Sections of the line between the observer and the target that are visible are drawn with the specified color. This property is applied to all LineOfSight analyses in the view.

        Default is Color.LIME.

        Attempting to set the color to null will throw an exception.

        Since:
        200.0.0
        See Also:
        getVisibleColor(), setVisibleColor(Color)
      • getVisibleColor

        public static Color getVisibleColor()
        Gets the value of the property visibleColor.
        Property description:
        The color used to render segments that are visible along LineOfSight analysis results.

        Sections of the line between the observer and the target that are visible are drawn with the specified color. This property is applied to all LineOfSight analyses in the view.

        Default is Color.LIME.

        Attempting to set the color to null will throw an exception.

        Since:
        200.0.0
      • setVisibleColor

        public static void setVisibleColor​(Color color)
        Sets the value of the property visibleColor.
        Property description:
        The color used to render segments that are visible along LineOfSight analysis results.

        Sections of the line between the observer and the target that are visible are drawn with the specified color. This property is applied to all LineOfSight analyses in the view.

        Default is Color.LIME.

        Attempting to set the color to null will throw an exception.

        Since:
        200.0.0
      • setVisibleColor

        @Deprecated(since="200.0.0",
                    forRemoval=true)
        public static void setVisibleColor​(int visibleColor)
        Deprecated, for removal: This API element is subject to removal in a future version.
        as of 200.0.0, replaced by setVisibleColor(Color)
        Sets the color used to render segments that are visible along the line of sight.

        This is applied to all instances.

        Parameters:
        visibleColor - the color used to render segments that are visible along the line of sight, in 0xAARRGGBB format
        Since:
        10.2.0
      • obstructedColorProperty

        public static ObjectProperty<Color> obstructedColorProperty()
        The color used to render segments that are obstructed along the line of sight.

        Sections of the line between the observer and the target that are obstructed (not visible) are drawn with the specified color. This property is applied to all LineOfSight analyses in the view.

        Default is Color.RED.

        Attempting to set the color to null will throw an exception.

        Since:
        200.0.0
        See Also:
        getObstructedColor(), setObstructedColor(Color)
      • getObstructedColor

        public static Color getObstructedColor()
        Gets the value of the property obstructedColor.
        Property description:
        The color used to render segments that are obstructed along the line of sight.

        Sections of the line between the observer and the target that are obstructed (not visible) are drawn with the specified color. This property is applied to all LineOfSight analyses in the view.

        Default is Color.RED.

        Attempting to set the color to null will throw an exception.

        Since:
        200.0.0
      • setObstructedColor

        public static void setObstructedColor​(Color color)
        Sets the value of the property obstructedColor.
        Property description:
        The color used to render segments that are obstructed along the line of sight.

        Sections of the line between the observer and the target that are obstructed (not visible) are drawn with the specified color. This property is applied to all LineOfSight analyses in the view.

        Default is Color.RED.

        Attempting to set the color to null will throw an exception.

        Since:
        200.0.0
      • setObstructedColor

        @Deprecated(since="200.0.0",
                    forRemoval=true)
        public static void setObstructedColor​(int obstructedColor)
        Deprecated, for removal: This API element is subject to removal in a future version.
        as of 200.0.0, replaced by setObstructedColor(Color)
        Sets the color used to render segments that are obstructed along the line of sight.

        This is applied to all instances.

        Parameters:
        obstructedColor - the color used to render segments that are obstructed along the line of sight, in 0xAARRGGBB format
        Since:
        10.2.0
      • getLineWidth

        public static float getLineWidth()
        Gets the line width used to render line of sight.

        Default is 1.0.

        Returns:
        the line width used to render line of sight, in dp
        Since:
        10.2.0
      • setLineWidth

        public static void setLineWidth​(float lineWidth)
        Sets the line width used to render line of sight.

        Default is 1.0.

        This is applied to all instances.

        Parameters:
        lineWidth - the line width used to render line of sight, in dp
        Since:
        10.2.0
      • getTargetVisibility

        public LineOfSight.TargetVisibility getTargetVisibility()
        Gets the target's visibility.
        Returns:
        the target's visibility
        Since:
        10.2.0
      • addTargetVisibilityChangedListener

        public void addTargetVisibilityChangedListener​(LineOfSight.TargetVisibilityChangedListener listener)
        Adds a listener for when the target visibility has changed.
        Parameters:
        listener - the listener
        Throws:
        java.lang.IllegalArgumentException - if the listener is null
        Since:
        100.2.0
      • removeTargetVisibilityChangedListener

        public boolean removeTargetVisibilityChangedListener​(LineOfSight.TargetVisibilityChangedListener listener)
        Removes a target visibility changed listener.
        Parameters:
        listener - the listener
        Returns:
        true if successful, otherwise false
        Since:
        100.2.0