public class QuadTreePartitioner extends Partitioner
| Modifier and Type | Field and Description |
|---|---|
protected int[] |
leafNodeIDs
ID of all leaf nodes in partition tree
|
protected Rectangle |
mbr
The minimal bounding rectangle of the underlying file
|
| Constructor and Description |
|---|
QuadTreePartitioner()
A default constructor to be able to dynamically instantiate it
and deserialize it
|
| Modifier and Type | Method and Description |
|---|---|
void |
createFromPoints(Rectangle mbr,
Point[] points,
int numPartitions)
Populate this partitioner for a set of points and number of partitions
|
protected void |
createFromZValues(long[] zValues,
int partitions)
Create a ZCurvePartitioner from a list of points
|
CellInfo |
getPartition(int partitionID)
Returns the details of a specific partition given its ID.
|
CellInfo |
getPartitionAt(int index)
Returns the detail of a partition given its position starting from zero
and ending at partitionCount() - 1
|
int |
getPartitionCount()
Returns total number of partitions
|
static void |
main(java.lang.String[] args) |
int |
overlapPartition(Shape shape)
Returns only one overlapping partition.
|
void |
overlapPartitions(Shape shape,
ResultCollector<java.lang.Integer> matcher)
Overlap a shape with partitions and calls a matcher for each overlapping
partition.
|
void |
readFields(java.io.DataInput in) |
void |
write(java.io.DataOutput out) |
getPartitioner, setPartitionerprotected Rectangle mbr
protected int[] leafNodeIDs
public QuadTreePartitioner()
public void createFromPoints(Rectangle mbr, Point[] points, int numPartitions)
PartitionercreateFromPoints in class Partitionerprotected void createFromZValues(long[] zValues,
int partitions)
vsample - inMBR - partitions - public void write(java.io.DataOutput out)
throws java.io.IOException
java.io.IOExceptionpublic void readFields(java.io.DataInput in)
throws java.io.IOException
java.io.IOExceptionpublic int overlapPartition(Shape shape)
PartitioneroverlapPartition in class Partitionerpublic void overlapPartitions(Shape shape, ResultCollector<java.lang.Integer> matcher)
PartitioneroverlapPartitions in class Partitionerpublic int getPartitionCount()
PartitionergetPartitionCount in class Partitionerpublic CellInfo getPartitionAt(int index)
PartitionergetPartitionAt in class Partitionerpublic CellInfo getPartition(int partitionID)
PartitionergetPartition in class Partitionerpublic static void main(java.lang.String[] args)
throws java.io.IOException
java.io.IOException