Packages

o

geotrellis.raster.costdistance

SimpleCostDistance

object SimpleCostDistance

Object housing various functions related to Cost-Distance computations.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SimpleCostDistance
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type Cost = (Int, Int, Double, Double)
  2. type EdgeCallback = (Cost) ⇒ Unit
  3. type Q = PriorityQueue[Cost]

Value Members

  1. 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")

  2. 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

  3. 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

  4. 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

  5. def nop(cost: Cost): Unit

    NOP EdgeCallback