T
-
public class SpatialTransformationContext<T>
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
SpatialTransformationContext(SparkRecordInfoProvider<T> recordInfoProvider)
Creates a new instance which uses the given
SparkRecordInfoProvider |
SpatialTransformationContext(SparkRecordInfoProvider<T> recordInfoProvider, SpatialOperationConfig spatialOpConf)
Creates a new instance which uses the given
SparkRecordInfoProvider and can filter using the specified SpatialOperationConfig |
Modifier and Type | Method and Description |
---|---|
boolean |
filter(T record)
Returns true if the given record passes the spatial filter specified by the current
SpatialOperationConfig if any. |
boolean |
filter(T record, SpatialOperationConfig spatialOpConf)
Returns if the given record passes the spatial filter specified by the given
SpatialOperationConfig . |
oracle.spatial.geometry.JGeometry |
getGeometry(T record)
Gets the geometry of the given record
|
SparkRecordInfo |
getRecordInfo(T record)
Gets a
SparkRecordInfo containing information from the give record. |
public SpatialTransformationContext(SparkRecordInfoProvider<T> recordInfoProvider)
SparkRecordInfoProvider
recordInfoProvider
-public SpatialTransformationContext(SparkRecordInfoProvider<T> recordInfoProvider, SpatialOperationConfig spatialOpConf)
SparkRecordInfoProvider
and can filter using the specified SpatialOperationConfig
recordInfoProvider
-spatialOpConf
-public SparkRecordInfo getRecordInfo(T record)
Gets a SparkRecordInfo
containing information from the give record.
SparkRecordInfo
instances can be reused so different calls with different input records may return the same instance with different data. If the record info will be part of a new RDD, a new record info instance should be created from the existing one. See SparkRecordInfo.SparkRecordInfo(SparkRecordInfo)
and SparkRecordInfo.setRecordInfo(SparkRecordInfo)
.record
- a record which can be processed by the current SparkRecordInfoProvider
SparkRecordInfo
or null if the input record could not be processed by the current SparkRecordInfoProvider
public oracle.spatial.geometry.JGeometry getGeometry(T record)
record
- an RDD record which can be processed by the current SparkRecordInfoProvider
SparkRecordInfoProvider
public boolean filter(T record) throws java.lang.Exception
SpatialOperationConfig
if any. A NullPointerException
will be thrown if there is not a SpatialOperationConfig
in the current context.record
-java.lang.Exception
public boolean filter(T record, SpatialOperationConfig spatialOpConf) throws java.lang.Exception
SpatialOperationConfig
.record
-spatialOpConf
-java.lang.Exception
Copyright © 2016 Oracle and/or its affiliates. All Rights Reserved.