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.
- Alphabetic
- By Inheritance
- R2Viewshed
- Serializable
- Serializable
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- sealed trait AggregationOperator extends AnyRef
- type Bundle = Map[From, ArrayBuffer[Ray]]
- sealed case class DirectedSegment(x0: Int, y0: Int, x1: Int, y1: Int, theta: Double) extends Product with Serializable
- sealed trait From extends AnyRef
- sealed case class Ray(theta: Double, alpha: Double) extends Product with Serializable
- type TileCallback = (Bundle) ⇒ Unit
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(elevationTile: Tile, startCol: Int, startRow: Int, op: AggregationOperator = Or, scatter: Boolean = false): 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)
- scatter
Whether to allow light to move (one pixel) normal to the ray
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
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, scatter: Boolean = true): 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
- cameraDirection
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)
- scatter
Whether to allow light to move (one pixel) normal to the ray
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
generateEmptyViewshedTile(cols: Int, rows: Int, debug: Int = 0): MutableArrayTile
Generate an empty viewshed tile.
Generate an empty viewshed tile.
- cols
The number of columns
- rows
The number of rows
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def nop(b: Bundle): Unit
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
- object And extends AggregationOperator with Product with Serializable
- object Debug extends AggregationOperator with Product with Serializable
- object FromEast extends From with Product with Serializable
- object FromInside extends From with Product with Serializable
- object FromNorth extends From with Product with Serializable
- object FromSouth extends From with Product with Serializable
- object FromWest extends From with Product with Serializable
- object Or extends AggregationOperator with Product with Serializable
-
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.