Class HilbertPartitioning
- java.lang.Object
- 
- org.apache.sedona.core.spatialPartitioning.HilbertPartitioning
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class HilbertPartitioning extends Object implements Serializable - See Also:
- Serialized Form
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected int[]splitsThe splits.
 - 
Constructor SummaryConstructors Constructor Description HilbertPartitioning(List<org.locationtech.jts.geom.Envelope> samples, org.locationtech.jts.geom.Envelope boundary, int partitions)Instantiates a new hilbert partitioning.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static intcomputeHValue(int n, int x, int y)Compute H value.protected voidcreateFromHValues(int[] hValues, int partitions)Creates the from H values.List<org.locationtech.jts.geom.Envelope>getGrids()Gets the grids.int[]getPartitionBounds()Gets the partition bounds.static intgridID(org.locationtech.jts.geom.Envelope boundary, org.locationtech.jts.geom.Envelope spatialObject, int[] partitionBounds)Grid ID.static intlocationMapping(double axisMin, double axisLocation, double axisMax)Location mapping.static org.locationtech.jts.geom.EnvelopeupdateEnvelope(org.locationtech.jts.geom.Envelope envelope, org.locationtech.jts.geom.Envelope spatialObject)Update envelope.
 
- 
- 
- 
Constructor Detail- 
HilbertPartitioningpublic HilbertPartitioning(List<org.locationtech.jts.geom.Envelope> samples, org.locationtech.jts.geom.Envelope boundary, int partitions) throws Exception Instantiates a new hilbert partitioning.- Parameters:
- samples- the sample list
- boundary- the boundary
- partitions- the partitions
- Throws:
- Exception- the exception
 
 
- 
 - 
Method Detail- 
computeHValuepublic static int computeHValue(int n, int x, int y)Compute H value.- Parameters:
- n- the n
- x- the x
- y- the y
- Returns:
- the int
 
 - 
locationMappingpublic static int locationMapping(double axisMin, double axisLocation, double axisMax)Location mapping.- Parameters:
- axisMin- the axis min
- axisLocation- the axis location
- axisMax- the axis max
- Returns:
- the int
 
 - 
gridIDpublic static int gridID(org.locationtech.jts.geom.Envelope boundary, org.locationtech.jts.geom.Envelope spatialObject, int[] partitionBounds) throws ExceptionGrid ID.- Parameters:
- boundary- the boundary
- spatialObject- the spatial object
- partitionBounds- the partition bounds
- Returns:
- the int
- Throws:
- Exception- the exception
 
 - 
updateEnvelopepublic static org.locationtech.jts.geom.Envelope updateEnvelope(org.locationtech.jts.geom.Envelope envelope, org.locationtech.jts.geom.Envelope spatialObject) throws ExceptionUpdate envelope.- Parameters:
- envelope- the envelope
- spatialObject- the spatial object
- Returns:
- the envelope
- Throws:
- Exception- the exception
 
 - 
createFromHValuesprotected void createFromHValues(int[] hValues, int partitions)Creates the from H values.- Parameters:
- hValues- the h values
- partitions- the partitions
 
 - 
getPartitionBoundspublic int[] getPartitionBounds() Gets the partition bounds.- Returns:
- the partition bounds
 
 - 
getGridspublic List<org.locationtech.jts.geom.Envelope> getGrids() Gets the grids.- Returns:
- the grids
 
 
- 
 
-