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. | 
JGeometry | 
getGeometry(T record)
Gets the geometry of the given record 
 | 
SparkRecordInfo | 
getRecordInfo(T record)
Gets a  
SparkRecordInfo containing information from the give record. | 
boolean | 
isPreSpatialFiltering()  | 
static boolean | 
isPreSpatialFiltering(SpatialOperationConfig spatialOpConf)  | 
public SpatialTransformationContext(SparkRecordInfoProvider<T> recordInfoProvider)
SparkRecordInfoProviderrecordInfoProvider -public SpatialTransformationContext(SparkRecordInfoProvider<T> recordInfoProvider, SpatialOperationConfig spatialOpConf)
SparkRecordInfoProvider and can filter using the specified SpatialOperationConfigrecordInfoProvider -spatialOpConf -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.Exceptionpublic boolean filter(T record, SpatialOperationConfig spatialOpConf) throws java.lang.Exception
SpatialOperationConfig.record -spatialOpConf -java.lang.Exceptionpublic JGeometry getGeometry(T record)
record - an RDD record which can be processed by the current SparkRecordInfoProviderSparkRecordInfoProviderpublic 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 SparkRecordInfoProviderSparkRecordInfo or null if the input record could not be processed by the current SparkRecordInfoProviderpublic boolean isPreSpatialFiltering()
public static boolean isPreSpatialFiltering(SpatialOperationConfig spatialOpConf)
Copyright © 2016 Oracle and/or its affiliates. All Rights Reserved.