Package org.apache.sedona.viz.utils
Class RasterizationUtils
java.lang.Object
org.apache.sedona.viz.utils.RasterizationUtils
- All Implemented Interfaces:
Serializable
The Class RasterizationUtils.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDecode1DTo2DId(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.FindOnePixelCoordinate(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundaryOriginal, org.locationtech.jts.geom.Coordinate spatialCoordinateOriginal, boolean reverseSpatialCoordinate) Find one pixel coordinate.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.FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.LineString spatialObject, boolean reverseSpatialCoordinate) Find pixel coordinates.FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.Point spatialObject, ColorizeOption colorizeOption, boolean reverseSpatialCoordinate) Find pixel coordinates.FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.Polygon spatialObject, boolean reverseSpatialCoordinate) Find pixel coordinates.FindPixelCoordinates(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, org.locationtech.jts.geom.Polygon spatialObject, boolean reverseSpatialCoordinate, Double objectWeight) Find pixel coordinates.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.
-
Constructor Details
-
RasterizationUtils
public RasterizationUtils()
-
-
Method Details
-
FindOnePixelCoordinate
public 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 XresolutionY- the resolution YdatasetBoundaryOriginal- the dataset boundary originalspatialCoordinateOriginal- the spatial coordinate originalreverseSpatialCoordinate- the reverse spatial coordinate- Returns:
- the tuple 2
-
FindOnePixelCoordinate
public 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 XresolutionY- the resolution YdatasetBoundaryOriginal- the dataset boundary originalspatialCoordinateOriginal- the spatial coordinate originalreverseSpatialCoordinate- the reverse spatial coordinateflipOverX- the flip over XflipOverY- the flip over Y- Returns:
- the tuple 2
-
GetWidthFromHeight
public static int GetWidthFromHeight(int y, org.locationtech.jts.geom.Envelope boundary) Gets the width from height.- Parameters:
y- the yboundary- the boundary- Returns:
- the int
-
Encode2DTo1DId
public static int Encode2DTo1DId(int resolutionX, int resolutionY, int twoDimensionIdX, int twoDimensionIdY) throws Exception Encode 2 D to 1 D id.- Parameters:
resolutionX- the resolution XresolutionY- the resolution YtwoDimensionIdX- the two dimension id XtwoDimensionIdY- the two dimension id Y- Returns:
- the int
- Throws:
Exception- the exception
-
Decode1DTo2DId
public static scala.Tuple2<Integer,Integer> Decode1DTo2DId(int resolutionX, int resolutionY, int oneDimensionId) Decode 1 D to 2 D id.- Parameters:
resolutionX- the resolution XresolutionY- the resolution YoneDimensionId- the one dimension id- Returns:
- the tuple 2
-
FindPixelCoordinates
public 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 XresolutionY- the resolution YdatasetBoundary- the dataset boundaryspatialObject- the spatial objectcolorizeOption- the colorize optionreverseSpatialCoordinate- the reverse spatial coordinate- Returns:
- the list
-
FindPixelCoordinates
public 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 XresolutionY- the resolution YdatasetBoundary- the dataset boundarycoordinates- the coordinatesreverseSpatialCoordinate- the reverse spatial coordinateflipOverX- the flip over XflipOverY- the flip over Y- Returns:
- the coordinate[]
-
FindPixelCoordinates
public 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 XresolutionY- the resolution YdatasetBoundary- the dataset boundarycoordinate- the coordinatereverseSpatialCoordinate- the reverse spatial coordinateflipOverX- the flip over XflipOverY- the flip over Y- Returns:
- the coordinate
-
FindPixelCoordinates
public 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 XresolutionY- the resolution YdatasetBoundary- the dataset boundaryspatialObject- the spatial objectreverseSpatialCoordinate- the reverse spatial coordinate- Returns:
- the list
-
FindPixelCoordinates
public 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 XresolutionY- the resolution YdatasetBoundary- the dataset boundaryspatialObject- the spatial objectreverseSpatialCoordinate- the reverse spatial coordinateobjectWeight- the object weight- Returns:
- the list
-
FindPixelCoordinates
public 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 XresolutionY- the resolution YpixelCoordinate1- the pixel coordinate 1pixelCoordinate2- the pixel coordinate 2reverseSpatialCoordinate- the reverse spatial coordinate- Returns:
- the list
-
FindPixelCoordinates
public 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 XresolutionY- the resolution YdatasetBoundary- the dataset boundaryspatialObject- the spatial objectreverseSpatialCoordinate- the reverse spatial coordinate- Returns:
- the list
-
getImageTileName
public static String getImageTileName(int zoomLevel, int partitionOnX, int partitionOnY, int tileSerialId)
-