Package org.apache.sedona.viz.core
Class VisualizationPartitioner
- java.lang.Object
-
- org.apache.spark.Partitioner
-
- org.apache.sedona.viz.core.VisualizationPartitioner
-
- All Implemented Interfaces:
Serializable
,scala.Serializable
public class VisualizationPartitioner extends org.apache.spark.Partitioner implements Serializable
The Class VisualizationPartitioner.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description int
partitionIntervalX
The partition interval Y.int
partitionIntervalY
The partition interval Y.int
partitionX
The partition interval Y.int
partitionY
The partition interval Y.int
resolutionX
The partition interval Y.int
resolutionY
The partition interval Y.
-
Constructor Summary
Constructors Constructor Description VisualizationPartitioner(int resolutionX, int resolutionY, int partitionX, int partitionY)
Instantiates a new visualization partitioner.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description scala.Tuple2<Pixel,Double>
assignPartitionID(scala.Tuple2<Pixel,Double> pixelDoubleTuple2)
Assign partition ID.List<scala.Tuple2<Pixel,Double>>
assignPartitionIDs(scala.Tuple2<Pixel,Double> pixelDoubleTuple2, int photoFilterRadius)
Assign partition I ds.static scala.Tuple2<Integer,Integer>
Calculate2DPartitionId(int resolutionX, int resolutionY, int partitionX, int partitionY, int coordinateX, int coordinateY)
Calculate the 2D partition ID, in aformat static int
CalculatePartitionId(int resolutionX, int resolutionY, int partitionX, int partitionY, int coordinateX, int coordinateY)
Calculate partition id.int
getPartition(Object key)
int
numPartitions()
-
-
-
Field Detail
-
resolutionX
public int resolutionX
The partition interval Y.
-
resolutionY
public int resolutionY
The partition interval Y.
-
partitionX
public int partitionX
The partition interval Y.
-
partitionY
public int partitionY
The partition interval Y.
-
partitionIntervalX
public int partitionIntervalX
The partition interval Y.
-
partitionIntervalY
public int partitionIntervalY
The partition interval Y.
-
-
Constructor Detail
-
VisualizationPartitioner
public VisualizationPartitioner(int resolutionX, int resolutionY, int partitionX, int partitionY) throws Exception
Instantiates a new visualization partitioner.- Parameters:
resolutionX
- the resolution XresolutionY
- the resolution YpartitionX
- the partition XpartitionY
- the partition Y- Throws:
Exception
- the exception
-
-
Method Detail
-
CalculatePartitionId
public static int CalculatePartitionId(int resolutionX, int resolutionY, int partitionX, int partitionY, int coordinateX, int coordinateY)
Calculate partition id.- Parameters:
resolutionX
- the resolution XresolutionY
- the resolution YpartitionX
- the partition XpartitionY
- the partition YcoordinateX
- the coordinate XcoordinateY
- the coordinate Y- Returns:
- the int
-
Calculate2DPartitionId
public static scala.Tuple2<Integer,Integer> Calculate2DPartitionId(int resolutionX, int resolutionY, int partitionX, int partitionY, int coordinateX, int coordinateY)
Calculate the 2D partition ID, in aformat - Parameters:
resolutionX
-resolutionY
-partitionX
-partitionY
-coordinateX
-coordinateY
-- Returns:
-
getPartition
public int getPartition(Object key)
- Specified by:
getPartition
in classorg.apache.spark.Partitioner
-
numPartitions
public int numPartitions()
- Specified by:
numPartitions
in classorg.apache.spark.Partitioner
-
assignPartitionIDs
public List<scala.Tuple2<Pixel,Double>> assignPartitionIDs(scala.Tuple2<Pixel,Double> pixelDoubleTuple2, int photoFilterRadius)
Assign partition I ds.- Parameters:
pixelDoubleTuple2
- the pixel double tuple 2photoFilterRadius
- the photo filter radius- Returns:
- the list
-
-