# R2Viewshed

### Related Doc: package viewshed

#### object R2Viewshed extends Serializable

An implementation of the R2 [1] Viewshed algorithm.

1. Franklin, Wm Randolph, and Clark Ray. "Higher isn’t necessarily better: Visibility algorithms and experiments." Advances in GIS research: sixth international symposium on spatial data handling. Vol. 2. Taylor & Francis Edinburgh, 1994.

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
1. Alphabetic
2. By Inheritance
Inherited
1. R2Viewshed
2. Serializable
3. Serializable
4. AnyRef
5. Any
1. Hide All
2. Show All
Visibility
1. Public
2. All

### Value Members

1. #### final def !=(arg0: Any): Boolean

Definition Classes
AnyRef → Any
2. #### final def ##(): Int

Definition Classes
AnyRef → Any
3. #### final def ==(arg0: Any): Boolean

Definition Classes
AnyRef → Any

12. #### object RayComparator extends Comparator[Ray]

A Comparator for Rays which compares them by their theta angle.

A Comparator for Rays which compares them by their theta angle. This is used in the binary search that is performed in thetaToAlpha.

13. #### def apply(elevationTile: Tile, startCol: Int, startRow: Int, op: AggregationOperator = Or): Tile

Compute the viewshed of the tile using the R2 algorithm.

Compute the viewshed of the tile using the R2 algorithm. Makes use of the compute method of this object.

elevationTile

Elevations in units of meters

startCol

The x position of the vantage point

startRow

The y position of the vantage point

op

The aggregation operator to use (e.g. Or)

14. #### final def asInstanceOf[T0]: T0

Definition Classes
Any
15. #### def clone(): AnyRef

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( ... )
16. #### def compute(elevationTile: Tile, viewshedTile: MutableArrayTile, startCol: Int, startRow: Int, viewHeight: Double, from: From, rays: Array[Ray], tileCallback: TileCallback, resolution: Double, maxDistance: Double, curvature: Boolean, operator: AggregationOperator, altitude: Double = Double.NegativeInfinity, cameraDirection: Double = 0, cameraFOV: Double = 1.0, epsilon: Double = 1/math.Pi): Tile

Compute the viewshed of the elevatonTile using the R2 algorithm from [1].

Compute the viewshed of the elevatonTile using the R2 algorithm from [1]. The numbers in the elevationTile are assumed to be elevations in units of meters. The results are written into the viewshedTile.

1. Franklin, Wm Randolph, and Clark Ray. "Higher isn’t necessarily better: Visibility algorithms and experiments." Advances in GIS research: sixth international symposium on spatial data handling. Vol. 2. Taylor & Francis Edinburgh, 1994.

elevationTile

Elevations in units of meters

viewshedTile

The tile into which the viewshed will be written

startCol

The x position of the vantage point

startRow

The y position of the vantage point

viewHeight

The absolute height (above sea level) of the vantage point

from

The direction from which the rays are allowed to come

rays

Rays shining in from other tiles

tileCallback

A callback to communicate rays which have reached the periphery of the tile

resolution

The resolution of the elevationTile in units of meters/pixel

maxDistance

The maximum distance that any ray is allowed to travel

curvature

Whether to account for the Earth's curvature or not

operator

The aggregation operator to use

altitude

The absolute altitude (above sea level) to query; if -∞, use the terrain height

The direction (in radians) of the camera

cameraFOV

The camera field of view, rays whose dot product with the camera direction are less than this are filtered out

epsilon

Any ray within this many radians of vertical (horizontal) will be considered vertical (horizontal)

17. #### final def eq(arg0: AnyRef): Boolean

Definition Classes
AnyRef
18. #### def equals(arg0: Any): Boolean

Definition Classes
AnyRef → Any
19. #### def finalize(): Unit

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( classOf[java.lang.Throwable] )
20. #### def generateEmptyViewshedTile(cols: Int, rows: Int): MutableArrayTile

Generate an empty viewshed tile.

Generate an empty viewshed tile.

cols

The number of columns

rows

The number of rows

21. #### final def getClass(): Class[_]

Definition Classes
AnyRef → Any
22. #### def hashCode(): Int

Definition Classes
AnyRef → Any
23. #### final def isInstanceOf[T0]: Boolean

Definition Classes
Any
24. #### final def ne(arg0: AnyRef): Boolean

Definition Classes
AnyRef

26. #### final def notify(): Unit

Definition Classes
AnyRef
27. #### final def notifyAll(): Unit

Definition Classes
AnyRef
28. #### final def synchronized[T0](arg0: ⇒ T0): T0

Definition Classes
AnyRef
29. #### def toString(): String

Definition Classes
AnyRef → Any
30. #### final def wait(): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
31. #### final def wait(arg0: Long, arg1: Int): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
32. #### final def wait(arg0: Long): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )