These functions perform the following transformation:
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
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.
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 returntrue
if your Geometry fits inside the passed-in Extent. Please avoid writing clipping functions that do non-sensical things.