object SimpleCostDistance
Object housing various functions related to Cost-Distance computations.
- Alphabetic
- By Inheritance
- SimpleCostDistance
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
Value Members
-
def
apply(frictionTile: Tile, points: Seq[(Int, Int)], maxCost: Double = Double.PositiveInfinity, resolution: Double = 1): DoubleArrayTile
Generate a cost-distance raster based on a set of starting points and a friction raster.
Generate a cost-distance raster based on a set of starting points and a friction raster. This is an implementation of the standard algorithm cited in the "previous work" section of [1].
1. Tomlin, Dana. "Propagating radial waves of travel cost in a grid." International Journal of Geographical Information Science 24.9 (2010): 1391-1413.
- frictionTile
Friction tile; pixels are interpreted as "second per meter"
- points
List of starting points as tuples
- maxCost
The maximum cost before pruning a path (in units of "seconds")
- resolution
The resolution of the tiles (in units of "meters per pixel")
-
def
compute(frictionTile: Tile, costTile: DoubleArrayTile, maxCost: Double, resolution: Double, q: Q, edgeCallback: EdgeCallback): DoubleArrayTile
Compute a cost tile.
Compute a cost tile.
- frictionTile
The friction tile
- costTile
The tile that will contain the costs
- maxCost
The maximum cost before pruning a path (in units of "seconds")
- resolution
The resolution of the tiles (in units of "meters per pixel")
- q
A priority queue of Cost objects (a.k.a. candidate paths)
- edgeCallback
Called when a pixel on the edge of the tile is updated
-
def
generateEmptyCostTile(cols: Int, rows: Int): DoubleArrayTile
Generate an empty double-valued array tile of the correct dimensions.
Generate an empty double-valued array tile of the correct dimensions.
- cols
The number of cols of the friction tile (and therefore the cost tile)
- rows
The number of rows of the frition tile and cost tiles
-
def
generateEmptyQueue(cols: Int, rows: Int): Q
Generate a Queue suitable for working with a tile of the given dimensions.
Generate a Queue suitable for working with a tile of the given dimensions.
- cols
The number of columns of the friction tile
- rows
The number of rows of the friction tile
-
def
nop(cost: Cost): Unit
NOP EdgeCallback