Packages

o

geotrellis.spark.clip

ClipToGrid

object ClipToGrid

These functions perform the following transformation:

RDD[Geometry] => RDD[(SpatialKey, Geometry)]

such that each original Geometry is clipped in some way. By default, this clips them to fit inside the Extent of each SpatialKey they touch.

If you'd like more customized clipping behaviour, you can compose over the clipFeatureToExtent function below, or write your own entirely, while following its type signature. That can then be passed into the appropriate apply method below.

A variety of overloads are provided here to help you work with either Geometry or Feature. The injected

RDD[Geometry].clipToGrid: LayoutDefinition => RDD[(SpatialKey, Geometry)]

may also be preferable to you.

Note: If your custom clipping function relies on Predicates, note that its method coveredBy will always return true if your Geometry fits inside the passed-in Extent. Please avoid writing clipping functions that do non-sensical things.

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

Type Members

  1. trait Predicates extends Serializable

    Trait which contains methods to be used in determining the most optimal way to clip geometries and features for ClipToGrid methods.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def apply[G <: Geometry, D](rdd: RDD[Feature[G, D]], layout: LayoutDefinition, clipFeature: (Extent, Feature[G, D], Predicates) ⇒ Option[Feature[Geometry, D]]): RDD[(SpatialKey, Feature[Geometry, D])]

    Clip each geometry in the RDD to the set of SpatialKeys which intersect it, where the SpatialKeys map to the given LayoutDefinition, using the given method to clip each geometry to the extent.

  5. def apply[G <: Geometry, D](rdd: RDD[Feature[G, D]], layout: LayoutDefinition): RDD[(SpatialKey, Feature[Geometry, D])]

    Clip each geometry in the RDD to the set of SpatialKeys which intersect it, where the SpatialKeys map to the given LayoutDefinition, using the given method to clip each geometry to the extent.

  6. def apply[G <: Geometry](rdd: RDD[G], layout: LayoutDefinition, clipGeom: (Extent, G, Predicates) ⇒ Option[Geometry])(implicit d: DummyImplicit): RDD[(SpatialKey, Geometry)]

    Clip each geometry in the RDD to the set of SpatialKeys which intersect it, where the SpatialKeys map to the given LayoutDefinition, using the given method to clip each geometry to the extent.

  7. def apply[G <: Geometry](rdd: RDD[G], layout: LayoutDefinition)(implicit d: DummyImplicit): RDD[(SpatialKey, Geometry)]

    Clip each geometry in the RDD to the set of SpatialKeys which intersect it, where the SpatialKeys map to the given LayoutDefinition.

  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clipFeatureToExtent[G <: Geometry, D](e: Extent, feature: Feature[G, D], preds: Predicates): Option[Feature[Geometry, D]]

    Clips a feature to the given extent, that uses the given predicates to avoid doing intersections where unnecessary.

  10. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  21. def toString(): String
    Definition Classes
    AnyRef → Any
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped