java.lang.Object
com.esri.arcgisruntime.geoanalysis.Analysis
com.esri.arcgisruntime.geoanalysis.Viewshed
Direct Known Subclasses:
GeoElementViewshed, LocationViewshed

public abstract class Viewshed extends Analysis
Viewshed is a type of visibility analysis that shows the visible and obstructed areas covered by a directed field of view. Visible and obstructed areas are determined for an area defined by an observer location, horizontal and vertical view angles, and a minimum/maximum distance range. These properties define a frustum (a 3D solid) inside of which visibility is calculated.

Viewshed analysis is visual only - the result is rendered on to the GeoView, there is no API to get the visible and obstructed areas as geometries.

Viewshed analysis is reactive - whenever data changes (such as change in scene layer load status or visibility), the viewshed will automatically update.

Note: Maximum number of viewsheds per GeoView is 16. Viewsheds in excess of 16 will not be rendered.

Since:
100.2.0
  • Property Details

  • Method Details

    • visibleColorProperty

      public static ObjectProperty<Color> visibleColorProperty()
      The color with which visible areas of all viewsheds will be rendered.

      Areas of the scene view that are visible from the observer location and within the frustum defined for the viewshed analysis will be rendered using the specified color.

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

      Returns:
      the visibleColor property
      Since:
      200.0.0
      See Also:
    • getVisibleColor

      public static Color getVisibleColor()
      Gets the value of the visibleColor property.
      Property description:
      The color with which visible areas of all viewsheds will be rendered.

      Areas of the scene view that are visible from the observer location and within the frustum defined for the viewshed analysis will be rendered using the specified color.

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

      Returns:
      the value of the visibleColor property
      Since:
      200.0.0
      See Also:
    • setVisibleColor

      public static void setVisibleColor(Color color)
      Sets the value of the visibleColor property.
      Property description:
      The color with which visible areas of all viewsheds will be rendered.

      Areas of the scene view that are visible from the observer location and within the frustum defined for the viewshed analysis will be rendered using the specified color.

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

      Parameters:
      color - the value for the visibleColor property
      Since:
      200.0.0
      See Also:
    • 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 to render areas visible from the observer location and within the frustum.
      Parameters:
      visibleColor - the color of visible areas, as 0xAARRGGBB
      Since:
      100.2.0
    • obstructedColorProperty

      public static ObjectProperty<Color> obstructedColorProperty()
      The color to render areas not visible from the observer location and within the frustum.

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

      Returns:
      the obstructedColor property
      Since:
      200.0.0
      See Also:
    • getObstructedColor

      public static Color getObstructedColor()
      Gets the value of the obstructedColor property.
      Property description:
      The color to render areas not visible from the observer location and within the frustum.

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

      Returns:
      the value of the obstructedColor property
      Since:
      200.0.0
      See Also:
    • setObstructedColor

      public static void setObstructedColor(Color color)
      Sets the value of the obstructedColor property.
      Property description:
      The color to render areas not visible from the observer location and within the frustum.

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

      Parameters:
      color - the value for the obstructedColor property
      Since:
      200.0.0
      See Also:
    • 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 to render areas not visible from the observer location and within the frustum.
      Parameters:
      obstructedColor - the color of areas not visible, as 0xAARRGGBB
      Since:
      100.2.0
    • frustumOutlineColorProperty

      public static ObjectProperty<Color> frustumOutlineColorProperty()
      The color to render the frustum outline.

      The frustum (3D solid) within which visibility is evaluated can be symbolized with a specified outline color.

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

      Returns:
      the frustumOutlineColor property
      Since:
      200.0.0
      See Also:
    • getFrustumOutlineColor

      public static Color getFrustumOutlineColor()
      Gets the value of the frustumOutlineColor property.
      Property description:
      The color to render the frustum outline.

      The frustum (3D solid) within which visibility is evaluated can be symbolized with a specified outline color.

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

      Returns:
      the value of the frustumOutlineColor property
      Since:
      200.0.0
      See Also:
    • setFrustumOutlineColor

      public static void setFrustumOutlineColor(Color color)
      Sets the value of the frustumOutlineColor property.
      Property description:
      The color to render the frustum outline.

      The frustum (3D solid) within which visibility is evaluated can be symbolized with a specified outline color.

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

      Parameters:
      color - the value for the frustumOutlineColor property
      Since:
      200.0.0
      See Also:
    • setFrustumOutlineColor

      @Deprecated(since="200.0.0", forRemoval=true) public static void setFrustumOutlineColor(int frustumOutlineColor)
      Deprecated, for removal: This API element is subject to removal in a future version.
      as of 200.0.0, replaced by setFrustumOutlineColor(Color)
      Sets the color to render the frustum outline.
      Parameters:
      frustumOutlineColor - the color of the frustum outline, as 0xAARRGGBB
      Since:
      100.2.0
    • getHorizontalAngle

      public double getHorizontalAngle()
      Gets the horizontal spread of the viewshed, in degrees, > 0 and <= 360.

      Default is 90.

      Returns:
      the horizontal spread of the viewshed, in degrees, > 0 and <= 360
      Since:
      100.2.0
    • setHorizontalAngle

      public void setHorizontalAngle(double horizontalAngle)
      Sets the horizontal spread of the viewshed, in degrees, > 0 and <= 360.
      Parameters:
      horizontalAngle - the horizontal spread of the viewshed, in degrees, > 0 and <= 360
      Since:
      100.2.0
    • getVerticalAngle

      public double getVerticalAngle()
      Gets the vertical spread of the viewshed, in degrees, > 0 and <= 360.

      Default is 90.

      Returns:
      the vertical spread of the viewshed, in degrees, > 0 and <= 360
      Since:
      100.2.0
    • setVerticalAngle

      public void setVerticalAngle(double verticalAngle)
      Sets the vertical spread of the viewshed, in degrees, > 0 and <= 360.
      Parameters:
      verticalAngle - the vertical spread of the viewshed, in degrees, > 0 and <= 360
      Since:
      100.2.0
    • getMinDistance

      public double getMinDistance()
      Gets the minimum distance from the location where the viewshed starts to render, in meters within [0, Double.MAX_VALUE].
      Returns:
      the minimum distance from the location where the viewshed starts to render, in meters within [0, Double.MAX_VALUE]
      Since:
      100.2.0
    • setMinDistance

      public void setMinDistance(double minDistance)
      Sets the minimum distance from the location where the viewshed starts to render, in meters within [0, Double.MAX_VALUE].
      Parameters:
      minDistance - the minimum distance from the location where the viewshed starts to render, in meters within [0, Double.MAX_VALUE]
      Since:
      100.2.0
    • getMaxDistance

      public double getMaxDistance()
      Gets the maximum distance from the viewshed Location where the viewshed renders, in meters within [0, Double.MAX_VALUE].
      Returns:
      the maximum distance from the viewshed Location where the viewshed renders, in meters within [0, Double.MAX_VALUE]
      Since:
      100.2.0
    • setMaxDistance

      public void setMaxDistance(double maxDistance)
      Sets the maximum distance from the viewshed Location where the viewshed renders, in meters within [0, Double.MAX_VALUE].
      Parameters:
      maxDistance - the maximum distance from the viewshed Location where the viewshed renders, in meters within [0, Double.MAX_VALUE]
      Since:
      100.2.0
    • isFrustumOutlineVisibile

      public boolean isFrustumOutlineVisibile()
      Gets whether the outline of the frustum is visible.

      Default is false.

      Returns:
      true if the outline of the frustum is visible, otherwise false
      Since:
      100.2.0
    • setFrustumOutlineVisible

      public void setFrustumOutlineVisible(boolean frustumOutlineVisible)
      Sets whether the outline of the frustum should be visible.

      Default is false.

      Parameters:
      frustumOutlineVisible - true if the outline of the frustum should be visible, otherwise false
      Since:
      100.2.0