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.
- Alphabetic
- By Inheritance
- ClipToGrid
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
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.
-
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.
-
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.
-
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.
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
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.
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()