geotrellis.raster.op.focal

Slope

class Slope extends FocalOp1[Double, Raster] with HasAnalysisArea[Slope]

Calculates the slope of each cell in a raster.

Slope is the magnitude portion of the gradient vector. It is the maximum change of elevation from a raster cell to any immediate neighbor. It uses Horn's method for computing slope.

As with aspect, slope is calculated from estimates of the partial derivatives dz/dx and dz/dy.

Slope is computed in degrees from horizontal.

The expression for slope is:

val slope = atan(sqrt(pow(`dz/dy`,2) * pow(`dz/dx`,2)))
See also

Geospatial Analysis - A comprehensive guide (Smit, Longley, and Goodchild)

SurfacePoint for slope calculation logic.

Linear Supertypes
HasAnalysisArea[Slope], Cloneable, Cloneable, FocalOp1[Double, Raster], FocalOperation1[Double, Raster], FocalOperationBase, Operation[Raster], Product, Equals, AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Slope
  2. HasAnalysisArea
  3. Cloneable
  4. Cloneable
  5. FocalOp1
  6. FocalOperation1
  7. FocalOperationBase
  8. Operation
  9. Product
  10. Equals
  11. AnyRef
  12. Any
Implicitly
  1. by implicitLiteral
  2. by any2stringadd
  3. by any2stringfmt
  4. by any2ArrowAssoc
  5. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Slope(r: Op[Raster], zFactor: Op[Double])

    zFactor

    Number of map units to one elevation unit. The z factor is the multiplicative factor to convert elevation units

Type Members

  1. type Args = List[Any]

    Definition Classes
    Operation
  2. type Steps = PartialFunction[Any, StepOutput[Raster]]

    Definition Classes
    Operation

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Slope to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (Slope, B)

    Implicit information
    This member is added by an implicit conversion from Slope to ArrowAssoc[Slope] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. def _run(context: Context): StepOutput[Raster]

    Definition Classes
    FocalOperation1Operation
  9. var analysisAreaOp: Operation[Option[RasterExtent]]

    Definition Classes
    FocalOperation1FocalOperationBase
  10. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  11. def canEqual(other: Any): Boolean

    Definition Classes
    FocalOperation1 → Equals
  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  13. val debug: Boolean

    Definition Classes
    Operation
  14. def dispatch(dispatcher: ActorRef): DispatchedOperation[Raster]

    Definition Classes
    Operation
  15. def ensuring(cond: (Slope) ⇒ Boolean, msg: ⇒ Any): Slope

    Implicit information
    This member is added by an implicit conversion from Slope to Ensuring[Slope] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: (Slope) ⇒ Boolean): Slope

    Implicit information
    This member is added by an implicit conversion from Slope to Ensuring[Slope] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: Boolean, msg: ⇒ Any): Slope

    Implicit information
    This member is added by an implicit conversion from Slope to Ensuring[Slope] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def ensuring(cond: Boolean): Slope

    Implicit information
    This member is added by an implicit conversion from Slope to Ensuring[Slope] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  21. def filter(f: (Raster) ⇒ Boolean): Operation[Raster]

    Definition Classes
    Operation
  22. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  23. def flatMap[U](f: (Raster) ⇒ Operation[U]): Operation[U]

    Create a new operation with a function that takes the result of this operation and returns a new operation.

    Create a new operation with a function that takes the result of this operation and returns a new operation.

    Definition Classes
    Operation
  24. def foreach[U](f: (Raster) ⇒ U): Unit

    Create an operation that applies the function f to the result of this operation, but returns nothing.

    Create an operation that applies the function f to the result of this operation, but returns nothing.

    Definition Classes
    Operation
  25. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Slope to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  26. def getCalculation(r: Raster, n: Neighborhood): FocalCalculation[Raster] with Initialization1[Double]

    Gets a calculation to be used with this focal operation for the given raster neighborhood.

    Gets a calculation to be used with this focal operation for the given raster neighborhood.

    Choosing the calculation based on on the raster and neighborhood allows flexibility in what calculation to use; if some calculations are faster for some neighborhoods (e.g., using a CellwiseCalculation for Square neighborhoods and a CursorCalculation for all other neighborhoods), or if you want to change the calculation based on the raster's data type, you can do so by returning the correct FocalCalculation from this function.

    r

    Raster that the focal calculation will run against.

    n

    Neighborhood that will be used in the focal operation.

    Definition Classes
    FocalOp1FocalOperation1
  27. final def getClass(): Class[_]

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

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

    Definition Classes
    Any
  30. def makeClone(): Slope

    Definition Classes
    HasAnalysisArea
  31. def map[U](f: (Raster) ⇒ U): Operation[U]

    Create a new operation that returns the result of the provided function that takes this operation's result as its argument.

    Create a new operation that returns the result of the provided function that takes this operation's result as its argument.

    Definition Classes
    Operation
  32. def name: String

    Return operation identified (class simple name).

    Return operation identified (class simple name).

    Definition Classes
    Operation
  33. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  34. val nextSteps: PartialFunction[Any, StepOutput[Raster]]

    Definition Classes
    FocalOperation1Operation
  35. final def notify(): Unit

    Definition Classes
    AnyRef
  36. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  37. def processNextSteps(args: Args): StepOutput[Raster]

    Definition Classes
    Operation
  38. def productArity: Int

    Definition Classes
    FocalOperation1 → Product
  39. def productElement(n: Int): Any

    Definition Classes
    FocalOperation1 → Product
  40. def productIterator: Iterator[Any]

    Definition Classes
    Product
  41. def productPrefix: String

    Definition Classes
    Product
  42. def run(context: Context): StepOutput[Raster]

    Execute this operation and return the result.

    Execute this operation and return the result.

    Definition Classes
    Operation
  43. def runAsync(args: Args): StepOutput[Raster]

    Definition Classes
    Operation
  44. def setAnalysisArea(op: Operation[Option[RasterExtent]]): Slope

    Definition Classes
    HasAnalysisArea
  45. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  46. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  50. def withResult[U](f: (Raster) ⇒ Operation[U]): Operation[U]

    Create a new operation with a function that takes the result of this operation and returns a new operation.

    Create a new operation with a function that takes the result of this operation and returns a new operation.

    Same as flatMap.

    Definition Classes
    Operation
  51. def [B](y: B): (Slope, B)

    Implicit information
    This member is added by an implicit conversion from Slope to ArrowAssoc[Slope] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implict Value Members

  1. def canEqual(that: Any): Boolean

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).canEqual(that)
    Definition Classes
    Equals
  2. val debug: Boolean

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).debug
    Definition Classes
    Operation
  3. def dispatch(dispatcher: ActorRef): DispatchedOperation[Slope]

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).dispatch(dispatcher)
    Definition Classes
    Operation
  4. def filter(f: (Slope) ⇒ Boolean): Operation[Slope]

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).filter(f)
    Definition Classes
    Operation
  5. def flatMap[U](f: (Slope) ⇒ Operation[U]): Operation[U]

    Create a new operation with a function that takes the result of this operation and returns a new operation.

    Create a new operation with a function that takes the result of this operation and returns a new operation.

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).flatMap(f)
    Definition Classes
    Operation
  6. def foreach[U](f: (Slope) ⇒ U): Unit

    Create an operation that applies the function f to the result of this operation, but returns nothing.

    Create an operation that applies the function f to the result of this operation, but returns nothing.

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).foreach(f)
    Definition Classes
    Operation
  7. def map[U](f: (Slope) ⇒ U): Operation[U]

    Create a new operation that returns the result of the provided function that takes this operation's result as its argument.

    Create a new operation that returns the result of the provided function that takes this operation's result as its argument.

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).map(f)
    Definition Classes
    Operation
  8. def name: String

    Return operation identified (class simple name).

    Return operation identified (class simple name).

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).name
    Definition Classes
    Operation
  9. val nextSteps: PartialFunction[Any, StepOutput[Slope]]

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).nextSteps
    Definition Classes
    Operation
  10. def processNextSteps(args: List[Any]): StepOutput[Slope]

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).processNextSteps(args)
    Definition Classes
    Operation
  11. def productArity: Int

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).productArity
    Definition Classes
    Product
  12. def productElement(n: Int): Any

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).productElement(n)
    Definition Classes
    Product
  13. def productIterator: Iterator[Any]

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).productIterator
    Definition Classes
    Product
  14. def productPrefix: String

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).productPrefix
    Definition Classes
    Product
  15. def run(context: Context): StepOutput[Slope]

    Execute this operation and return the result.

    Execute this operation and return the result.

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).run(context)
    Definition Classes
    Operation
  16. def runAsync(args: List[Any]): StepOutput[Slope]

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).runAsync(args)
    Definition Classes
    Operation
  17. val self: Any

    Implicit information
    This member is added by an implicit conversion from Slope to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (slope: StringAdd).self
    Definition Classes
    StringAdd
  18. val self: Any

    Implicit information
    This member is added by an implicit conversion from Slope to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (slope: StringFormat).self
    Definition Classes
    StringFormat
  19. def withResult[U](f: (Slope) ⇒ Operation[U]): Operation[U]

    Create a new operation with a function that takes the result of this operation and returns a new operation.

    Create a new operation with a function that takes the result of this operation and returns a new operation.

    Same as flatMap.

    Implicit information
    This member is added by an implicit conversion from Slope to Operation[Slope] performed by method implicitLiteral in geotrellis.Operation.
    Shadowing
    This implicitly inherited member is shadowed by one or more members in this class.
    To access this member you can use a type ascription:
    (slope: Operation[Slope]).withResult(f)
    Definition Classes
    Operation

Deprecated Value Members

  1. def x: Slope

    Implicit information
    This member is added by an implicit conversion from Slope to ArrowAssoc[Slope] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (slope: ArrowAssoc[Slope]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: Slope

    Implicit information
    This member is added by an implicit conversion from Slope to Ensuring[Slope] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (slope: Ensuring[Slope]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from HasAnalysisArea[Slope]

Inherited from Cloneable

Inherited from Cloneable

Inherited from FocalOp1[Double, Raster]

Inherited from FocalOperation1[Double, Raster]

Inherited from FocalOperationBase

Inherited from Operation[Raster]

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion implicitLiteral from Slope to Operation[Slope]

Inherited by implicit conversion any2stringadd from Slope to StringAdd

Inherited by implicit conversion any2stringfmt from Slope to StringFormat

Inherited by implicit conversion any2ArrowAssoc from Slope to ArrowAssoc[Slope]

Inherited by implicit conversion any2Ensuring from Slope to Ensuring[Slope]

Ungrouped