Object

geotrellis.spark.clip

ClipToGrid

Related Doc: package clip

Permalink

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
AnyRef, Any
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

    Permalink

    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

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    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])]

    Permalink

    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])]

    Permalink

    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)]

    Permalink

    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)]

    Permalink

    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

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

    Permalink

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

  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped