Class LocationViewshed


public final class LocationViewshed extends Viewshed
LocationViewshed can be used to perform viewshed analysis that starts from a point location, known as the observer location, either provided by the user using setLocation(Point) or derived from a camera using updateFromCamera(Camera).

Viewshed direction can be controlled using setPitch(double) and setHeading(double).

Since:
100.2.0
  • Constructor Details

    • LocationViewshed

      public LocationViewshed(Camera camera, double minDistance, double maxDistance)
      Constructs a viewshed from the location, direction, and field of view information from a camera, and a min and max distance.
      Parameters:
      camera - the camera to be used to derive location, direction and field of view information
      minDistance - the minimum distance from the location where the viewshed starts to render, in meters within [0, Double.MAX_VALUE]
      maxDistance - the maximum distance from the location where the viewshed starts to render, in meters within [0, Double.MAX_VALUE]
      Throws:
      IllegalArgumentException - if camera is null
      Since:
      100.2.0
    • LocationViewshed

      public LocationViewshed(Point location, double heading, double pitch, double horizontalAngle, double verticalAngle, double minDistance, double maxDistance)
      Constructs a viewshed positioned at the specified location, with direction given by the heading and pitch, spread from horizontalAngle, verticalAngle, minDistance, and maxDistance.
      Parameters:
      location - observer location that represents the start of the viewshed
      heading - the heading value (azimuth) that defines the observer's view direction, in degrees. It is measured clockwise from north in a ENU (East, North, Up Ground reference frames)
      pitch - the pitch value (angle) of the observer's view, in degrees
      horizontalAngle - the horizontal angle of the observer's view. The value must be greater than 0, and no greater than 360.
      verticalAngle - the vertical angle of the observer's view. The value must be greater than 0, and no greater than 360.
      minDistance - the minimum distance from the location where the viewshed starts to render, in meters within [0, Double.MAX_VALUE]
      maxDistance - the maximum distance from the location where the viewshed starts to render, in meters within [0, Double.MAX_VALUE]
      Throws:
      IllegalArgumentException - if location is null
      Since:
      100.2.0
  • Method Details

    • getLocation

      public Point getLocation()
      Gets the observer location of the viewshed.
      Returns:
      the observer location of the viewshed
      Since:
      100.2.0
    • setLocation

      public void setLocation(Point location)
      Sets the observer location of the viewshed.
      Parameters:
      location - the observer location of the viewshed
      Throws:
      IllegalArgumentException - if location is null
      Since:
      100.2.0
    • getHeading

      public double getHeading()
      Gets the heading value (azimuth) that defines the observer's view direction, in degrees within [0, 360].
      Returns:
      the heading direction of the viewshed, in degrees within [0, 360]
      Since:
      100.2.0
    • setHeading

      public void setHeading(double heading)
      Sets the heading value (azimuth) that defines the observer's view direction, in degrees. It is measured clockwise from north in a ENU (East, North, Up Ground reference frames).

      Heading outside of [0, 360] is wrapped around.

      Parameters:
      heading - the heading direction of the viewshed, in degrees
      Since:
      100.2.0
    • getPitch

      public double getPitch()
      Gets the pitch value (angle) of the observer's view, in degrees.
      Returns:
      the pitch direction of the viewshed, in degrees
      Since:
      100.2.0
    • setPitch

      public void setPitch(double pitch)
      Sets the pitch value (angle) of the observer's view, in degrees, in degrees.
      Parameters:
      pitch - the pitch direction of the viewshed, in degrees
      Since:
      100.2.0
    • updateFromCamera

      public void updateFromCamera(Camera camera)
      Updates the frustum of the viewshed using the properties, such as position, pitch, and heading, of the supplied Camera.
      Parameters:
      camera - the camera to be used to derive various properties of the viewshed
      Throws:
      IllegalArgumentException - if camera is null
      Since:
      100.2.0