public class SpatialPartition
extends java.lang.Object
implements org.apache.spark.Partition, java.io.Serializable, org.apache.hadoop.io.Writable
Modifier and Type | Field and Description |
---|---|
protected int |
index |
protected double[] |
mbr |
Constructor and Description |
---|
SpatialPartition()
Creates a new instance
|
SpatialPartition(int index, double[] mbr)
Creates a new instance with the given data
|
Modifier and Type | Method and Description |
---|---|
boolean |
contains(oracle.spatial.geometry.JGeometry geom)
Returns true if the partition contains the given geometry
|
boolean |
equals(java.lang.Object obj) |
double[] |
getMbr()
Gets the partition's minimum bounding rectangle
|
int |
hashCode() |
int |
index() |
void |
readFields(java.io.DataInput in) |
void |
setIndex(int index)
Sets the partition index
|
java.lang.String |
toString() |
void |
write(java.io.DataOutput out) |
public SpatialPartition()
public SpatialPartition(int index, double[] mbr)
index
- the partition indexmbr
- a minimum bounding rectanglepublic void setIndex(int index)
index
-public int index()
index
in interface org.apache.spark.Partition
public double[] getMbr()
public boolean contains(oracle.spatial.geometry.JGeometry geom)
geom
-public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in interface org.apache.spark.Partition
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public void readFields(java.io.DataInput in) throws java.io.IOException
readFields
in interface org.apache.hadoop.io.Writable
java.io.IOException
public void write(java.io.DataOutput out) throws java.io.IOException
write
in interface org.apache.hadoop.io.Writable
java.io.IOException
Copyright © 2016 Oracle and/or its affiliates. All Rights Reserved.