Package org.apache.sedona.viz.utils
Class RasterizationUtils
- java.lang.Object
- 
- org.apache.sedona.viz.utils.RasterizationUtils
 
- 
- All Implemented Interfaces:
- Serializable
 
 public class RasterizationUtils extends Object implements Serializable The Class RasterizationUtils.- See Also:
- Serialized Form
 
- 
- 
Constructor SummaryConstructors Constructor Description RasterizationUtils()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static scala.Tuple2<Integer,Integer>Decode1DTo2DId(int resolutionX, int resolutionY, int oneDimensionId)Decode 1 D to 2 D id.static intEncode2DTo1DId(int resolutionX, int resolutionY, int twoDimensionIdX, int twoDimensionIdY)Encode 2 D to 1 D id.static scala.Tuple2<Integer,Integer>FindOnePixelCoordinate(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundaryOriginal, org.locationtech.jts.geom.Coordinate spatialCoordinateOriginal, boolean reverseSpatialCoordinate)Find one pixel coordinate.static scala.Tuple2<Integer,Integer>FindOnePixelCoordinate(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundaryOriginal, org.locationtech.jts.geom.Coordinate spatialCoordinateOriginal, boolean reverseSpatialCoordinate, boolean flipOverX, boolean flipOverY)Find one pixel coordinate.static org.locationtech.jts.geom.Coordinate[]FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.Coordinate[] coordinates, boolean reverseSpatialCoordinate, boolean flipOverX, boolean flipOverY)Find pixel coordinates.static org.locationtech.jts.geom.CoordinateFindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.Coordinate coordinate, boolean reverseSpatialCoordinate, boolean flipOverX, boolean flipOverY)Find pixel coordinates.static List<scala.Tuple2<Pixel,Double>>FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.LineString spatialObject, boolean reverseSpatialCoordinate)Find pixel coordinates.static List<scala.Tuple2<Pixel,Double>>FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.Point spatialObject, ColorizeOption colorizeOption, boolean reverseSpatialCoordinate)Find pixel coordinates.static List<scala.Tuple2<Pixel,Double>>FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.Polygon spatialObject, boolean reverseSpatialCoordinate)Find pixel coordinates.static List<scala.Tuple2<Pixel,Double>>FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.Polygon spatialObject, boolean reverseSpatialCoordinate, Double objectWeight)Find pixel coordinates.static List<scala.Tuple2<Pixel,Double>>FindPixelCoordinates(int resolutionX, int resolutionY, scala.Tuple2<Integer,Integer> pixelCoordinate1, scala.Tuple2<Integer,Integer> pixelCoordinate2, boolean reverseSpatialCoordinate)Find pixel coordinates.static StringgetImageTileName(int zoomLevel, int partitionOnX, int partitionOnY, int tileSerialId)static intGetWidthFromHeight(int y, org.locationtech.jts.geom.Envelope boundary)Gets the width from height.
 
- 
- 
- 
Method Detail- 
FindOnePixelCoordinatepublic static scala.Tuple2<Integer,Integer> FindOnePixelCoordinate(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundaryOriginal, org.locationtech.jts.geom.Coordinate spatialCoordinateOriginal, boolean reverseSpatialCoordinate) Find one pixel coordinate.- Parameters:
- resolutionX- the resolution X
- resolutionY- the resolution Y
- datasetBoundaryOriginal- the dataset boundary original
- spatialCoordinateOriginal- the spatial coordinate original
- reverseSpatialCoordinate- the reverse spatial coordinate
- Returns:
- the tuple 2
 
 - 
FindOnePixelCoordinatepublic static scala.Tuple2<Integer,Integer> FindOnePixelCoordinate(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundaryOriginal, org.locationtech.jts.geom.Coordinate spatialCoordinateOriginal, boolean reverseSpatialCoordinate, boolean flipOverX, boolean flipOverY) Find one pixel coordinate.- Parameters:
- resolutionX- the resolution X
- resolutionY- the resolution Y
- datasetBoundaryOriginal- the dataset boundary original
- spatialCoordinateOriginal- the spatial coordinate original
- reverseSpatialCoordinate- the reverse spatial coordinate
- flipOverX- the flip over X
- flipOverY- the flip over Y
- Returns:
- the tuple 2
 
 - 
GetWidthFromHeightpublic static int GetWidthFromHeight(int y, org.locationtech.jts.geom.Envelope boundary)Gets the width from height.- Parameters:
- y- the y
- boundary- the boundary
- Returns:
- the int
 
 - 
Encode2DTo1DIdpublic static int Encode2DTo1DId(int resolutionX, int resolutionY, int twoDimensionIdX, int twoDimensionIdY) throws ExceptionEncode 2 D to 1 D id.- Parameters:
- resolutionX- the resolution X
- resolutionY- the resolution Y
- twoDimensionIdX- the two dimension id X
- twoDimensionIdY- the two dimension id Y
- Returns:
- the int
- Throws:
- Exception- the exception
 
 - 
Decode1DTo2DIdpublic static scala.Tuple2<Integer,Integer> Decode1DTo2DId(int resolutionX, int resolutionY, int oneDimensionId) Decode 1 D to 2 D id.- Parameters:
- resolutionX- the resolution X
- resolutionY- the resolution Y
- oneDimensionId- the one dimension id
- Returns:
- the tuple 2
 
 - 
FindPixelCoordinatespublic static List<scala.Tuple2<Pixel,Double>> FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.Point spatialObject, ColorizeOption colorizeOption, boolean reverseSpatialCoordinate) Find pixel coordinates.- Parameters:
- resolutionX- the resolution X
- resolutionY- the resolution Y
- datasetBoundary- the dataset boundary
- spatialObject- the spatial object
- colorizeOption- the colorize option
- reverseSpatialCoordinate- the reverse spatial coordinate
- Returns:
- the list
 
 - 
FindPixelCoordinatespublic static org.locationtech.jts.geom.Coordinate[] FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.Coordinate[] coordinates, boolean reverseSpatialCoordinate, boolean flipOverX, boolean flipOverY)Find pixel coordinates.- Parameters:
- resolutionX- the resolution X
- resolutionY- the resolution Y
- datasetBoundary- the dataset boundary
- coordinates- the coordinates
- reverseSpatialCoordinate- the reverse spatial coordinate
- flipOverX- the flip over X
- flipOverY- the flip over Y
- Returns:
- the coordinate[]
 
 - 
FindPixelCoordinatespublic static org.locationtech.jts.geom.Coordinate FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.Coordinate coordinate, boolean reverseSpatialCoordinate, boolean flipOverX, boolean flipOverY)Find pixel coordinates.- Parameters:
- resolutionX- the resolution X
- resolutionY- the resolution Y
- datasetBoundary- the dataset boundary
- coordinate- the coordinate
- reverseSpatialCoordinate- the reverse spatial coordinate
- flipOverX- the flip over X
- flipOverY- the flip over Y
- Returns:
- the coordinate
 
 - 
FindPixelCoordinatespublic static List<scala.Tuple2<Pixel,Double>> FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.Polygon spatialObject, boolean reverseSpatialCoordinate) Find pixel coordinates.- Parameters:
- resolutionX- the resolution X
- resolutionY- the resolution Y
- datasetBoundary- the dataset boundary
- spatialObject- the spatial object
- reverseSpatialCoordinate- the reverse spatial coordinate
- Returns:
- the list
 
 - 
FindPixelCoordinatespublic static List<scala.Tuple2<Pixel,Double>> FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.Polygon spatialObject, boolean reverseSpatialCoordinate, Double objectWeight) Find pixel coordinates.- Parameters:
- resolutionX- the resolution X
- resolutionY- the resolution Y
- datasetBoundary- the dataset boundary
- spatialObject- the spatial object
- reverseSpatialCoordinate- the reverse spatial coordinate
- objectWeight- the object weight
- Returns:
- the list
 
 - 
FindPixelCoordinatespublic static List<scala.Tuple2<Pixel,Double>> FindPixelCoordinates(int resolutionX, int resolutionY, scala.Tuple2<Integer,Integer> pixelCoordinate1, scala.Tuple2<Integer,Integer> pixelCoordinate2, boolean reverseSpatialCoordinate) Find pixel coordinates.- Parameters:
- resolutionX- the resolution X
- resolutionY- the resolution Y
- pixelCoordinate1- the pixel coordinate 1
- pixelCoordinate2- the pixel coordinate 2
- reverseSpatialCoordinate- the reverse spatial coordinate
- Returns:
- the list
 
 - 
FindPixelCoordinatespublic static List<scala.Tuple2<Pixel,Double>> FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.LineString spatialObject, boolean reverseSpatialCoordinate) Find pixel coordinates.- Parameters:
- resolutionX- the resolution X
- resolutionY- the resolution Y
- datasetBoundary- the dataset boundary
- spatialObject- the spatial object
- reverseSpatialCoordinate- the reverse spatial coordinate
- Returns:
- the list
 
 - 
getImageTileNamepublic static String getImageTileName(int zoomLevel, int partitionOnX, int partitionOnY, int tileSerialId) 
 
- 
 
-