geotrellis

RasterExtent

case class RasterExtent(extent: Extent, cellwidth: Double, cellheight: Double, cols: Int, rows: Int) extends Product with Serializable

RasterExtent objects represent the geographic extent (envelope) of a raster.

The Raster extent has two coordinate concepts involved: map coordinates and grid coordinates. Map coordinates are what the Extent class uses, and specifies points using an X coordinate and a Y coordinate. The X coordinate is oriented along west to east such that the larger the X coordinate, the more eastern the point. The Y coordinate is along south to north such that the larger the Y coordinate, the more Northern the point.

This contrasts with the grid coordinate system. The grid coordinate system does not actually reference points on the map, but instead a cell of the raster that represents values for some square area of the map. The column axis is similar in that the number gets larger as one goes from west to east; however, the row axis is inverted from map coordinates: as the row number increases, the cell is heading south. The top row is labeled as 0, and the next 1, so that the highest indexed row is the southern most row of the raster. A cell has a height and a width that is in terms of map units. You can think of it as each cell is itself an extent, with width cellwidth and height cellheight. When a cell needs to be represented or thought of as a point, the center of the cell will be used. So when gridToMap is called, what is returned is the center point, in map coordinates.

Map points are considered to be 'inside' the cell based on these rules:

Note that based on these rules, the eastern and southern borders of an Extent are not actually considered to be part of the RasterExtent.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. RasterExtent
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RasterExtent(extent: Extent, cellwidth: Double, cellheight: Double, cols: Int, rows: Int)

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 RasterExtent to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (RasterExtent, B)

    Implicit information
    This member is added by an implicit conversion from RasterExtent to ArrowAssoc[RasterExtent] 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. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. val cellheight: Double

  10. val cellwidth: Double

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. val cols: Int

  13. def combine(that: RasterExtent): RasterExtent

    Combine two different GeoAttrs (which must have the same cellsizes).

    Combine two different GeoAttrs (which must have the same cellsizes). The result is a new extent at the same resolution.

    TODO: this version currently warps the grid. we need two versions.

    TODO: relatedly, the translate version should require the grids to be properly aligned.

  14. def compare(other: RasterExtent): Int

    Compare this object with another GeoAttrs object, as per the comparison rules in Extent#compare.

  15. def containsPoint(x: Double, y: Double): Boolean

    Determine if the underlying extent contains the given point.

  16. def ensuring(cond: (RasterExtent) ⇒ Boolean, msg: ⇒ Any): RasterExtent

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

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

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

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

    Definition Classes
    AnyRef
  21. val extent: Extent

  22. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  23. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from RasterExtent to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  24. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  25. def gridBoundsFor(subExtent: Extent): GridBounds

    Gets the GridBounds for this RasterExtent that is the smallest subgrid containing all points within the extent.

    Gets the GridBounds for this RasterExtent that is the smallest subgrid containing all points within the extent. The extent is considered inclusive on it's north and west borders, exclusive on it's east and south borders. See RasterExtent for a discussion of grid and extent boundary concepts.

  26. def gridToMap(col: Int, row: Int): (Double, Double)

    The map coordinate of a grid cell is the center point.

  27. val height: Double

  28. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  29. def mapToGrid(mapCoord: (Double, Double)): (Int, Int)

    Convert map coordinate tuple (x,y) to grid coordinates (col,row).

  30. def mapToGrid(x: Double, y: Double): (Int, Int)

    Convert map coordinates (x,y) to grid coordinates (col,row).

  31. def mapXToGrid(x: Double): Int

    Convert map coordinate x to grid coordinate column.

  32. def mapXToGridDouble(x: Double): Double

  33. def mapYToGrid(y: Double): Int

    Convert map coordinate y to grid coordinate row.

  34. def mapYToGridDouble(y: Double): Double

  35. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  38. val rows: Int

  39. def size: Int

    The size of the extent, e.

    The size of the extent, e.g. cols * rows.

  40. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  41. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  44. val width: Double

  45. def [B](y: B): (RasterExtent, B)

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

Shadowed Implict Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from RasterExtent 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:
    (rasterExtent: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from RasterExtent 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:
    (rasterExtent: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: RasterExtent

    Implicit information
    This member is added by an implicit conversion from RasterExtent to ArrowAssoc[RasterExtent] 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:
    (rasterExtent: ArrowAssoc[RasterExtent]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: RasterExtent

    Implicit information
    This member is added by an implicit conversion from RasterExtent to Ensuring[RasterExtent] 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:
    (rasterExtent: Ensuring[RasterExtent]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from RasterExtent to StringAdd

Inherited by implicit conversion any2stringfmt from RasterExtent to StringFormat

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

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

Ungrouped