Package org.apache.sedona.viz.core
Class ImageGenerator
java.lang.Object
org.apache.sedona.viz.core.ImageGenerator
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
SedonaVizImageGenerator
The Class ImageGenerator.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleandeleteHadoopFile(String originalOutputPath, ImageType imageType) Delete hadoop file.booleandeleteLocalFile(String originalOutputPath, ImageType imageType) Delete local file.booleanSaveRasterImageAsHadoopFile(BufferedImage rasterImage, String originalOutputPath, ImageType imageType) Save raster image as hadoop file.booleanSaveRasterImageAsHadoopFile(org.apache.spark.api.java.JavaPairRDD<Integer, ImageSerializableWrapper> distributedImage, String outputPath, ImageType imageType, int zoomLevel, int partitionOnX, int partitionOnY) Save raster image as hadoop file.booleanSaveRasterImageAsLocalFile(BufferedImage rasterImage, String outputPath, ImageType imageType) Save raster image as local file.booleanSaveRasterImageAsLocalFile(org.apache.spark.api.java.JavaPairRDD<Integer, ImageSerializableWrapper> distributedImage, String outputPath, ImageType imageType) Save raster image as local file.booleanSaveRasterImageAsLocalFile(org.apache.spark.api.java.JavaPairRDD<Integer, ImageSerializableWrapper> distributedImage, String outputPath, ImageType imageType, int zoomLevel, int partitionOnX, int partitionOnY) Save raster image as local file.booleanSaveRasterImageAsS3File(BufferedImage rasterImage, String regionName, String accessKey, String secretKey, String bucketName, String path, ImageType imageType) Save raster image as S 3 file.booleanSaveRasterImageAsS3File(org.apache.spark.api.java.JavaPairRDD<Integer, ImageSerializableWrapper> distributedImage, String regionName, String accessKey, String secretKey, String bucketName, String path, ImageType imageType, int zoomLevel, int partitionOnX, int partitionOnY) Save raster image as S 3 file.booleanSaveVectorImageAsLocalFile(List<String> vectorImage, String outputPath, ImageType imageType) Save vector image as local file.booleanSaveVectorImageAsLocalFile(org.apache.spark.api.java.JavaPairRDD<Integer, String> distributedImage, String outputPath, ImageType imageType) Save vector image as local file.
-
Constructor Details
-
ImageGenerator
public ImageGenerator()
-
-
Method Details
-
SaveRasterImageAsLocalFile
public boolean SaveRasterImageAsLocalFile(org.apache.spark.api.java.JavaPairRDD<Integer, ImageSerializableWrapper> distributedImage, String outputPath, ImageType imageType, int zoomLevel, int partitionOnX, int partitionOnY) throws ExceptionSave raster image as local file.- Parameters:
distributedImage- the distributed imageoutputPath- the output pathimageType- the image typezoomLevel- the zoom levelpartitionOnX- the partition on XpartitionOnY- the partition on Y- Returns:
- true, if successful
- Throws:
Exception- the exception
-
SaveRasterImageAsLocalFile
public boolean SaveRasterImageAsLocalFile(org.apache.spark.api.java.JavaPairRDD<Integer, ImageSerializableWrapper> distributedImage, String outputPath, ImageType imageType) throws ExceptionSave raster image as local file.- Parameters:
distributedImage- the distributed imageoutputPath- the output pathimageType- the image type- Returns:
- true, if successful
- Throws:
Exception- the exception
-
SaveRasterImageAsHadoopFile
public boolean SaveRasterImageAsHadoopFile(org.apache.spark.api.java.JavaPairRDD<Integer, ImageSerializableWrapper> distributedImage, String outputPath, ImageType imageType, int zoomLevel, int partitionOnX, int partitionOnY) throws ExceptionSave raster image as hadoop file.- Parameters:
distributedImage- the distributed imageoutputPath- the output pathimageType- the image typezoomLevel- the zoom levelpartitionOnX- the partition on XpartitionOnY- the partition on Y- Returns:
- true, if successful
- Throws:
Exception- the exception
-
SaveRasterImageAsS3File
public boolean SaveRasterImageAsS3File(org.apache.spark.api.java.JavaPairRDD<Integer, ImageSerializableWrapper> distributedImage, String regionName, String accessKey, String secretKey, String bucketName, String path, ImageType imageType, int zoomLevel, int partitionOnX, int partitionOnY) Save raster image as S 3 file.- Parameters:
distributedImage- the distributed imageregionName- the region nameaccessKey- the access keysecretKey- the secret keybucketName- the bucket namepath- the pathimageType- the image typezoomLevel- the zoom levelpartitionOnX- the partition on XpartitionOnY- the partition on Y- Returns:
- true, if successful
-
SaveRasterImageAsLocalFile
public boolean SaveRasterImageAsLocalFile(BufferedImage rasterImage, String outputPath, ImageType imageType) throws Exception Save raster image as local file.- Parameters:
rasterImage- the raster imageoutputPath- the output pathimageType- the image type- Returns:
- true, if successful
- Throws:
Exception- the exception
-
SaveRasterImageAsHadoopFile
public boolean SaveRasterImageAsHadoopFile(BufferedImage rasterImage, String originalOutputPath, ImageType imageType) throws Exception Save raster image as hadoop file.- Parameters:
rasterImage- the raster imageoriginalOutputPath- the original output pathimageType- the image type- Returns:
- true, if successful
- Throws:
Exception- the exception
-
SaveRasterImageAsS3File
public boolean SaveRasterImageAsS3File(BufferedImage rasterImage, String regionName, String accessKey, String secretKey, String bucketName, String path, ImageType imageType) throws IOException Save raster image as S 3 file.- Parameters:
rasterImage- the raster imageregionName- the region nameaccessKey- the access keysecretKey- the secret keybucketName- the bucket namepath- the pathimageType- the image type- Returns:
- true, if successful
- Throws:
IOException- Signals that an I/O exception has occurred.
-
SaveVectorImageAsLocalFile
public boolean SaveVectorImageAsLocalFile(org.apache.spark.api.java.JavaPairRDD<Integer, String> distributedImage, String outputPath, ImageType imageType) throws ExceptionSave vector image as local file.- Parameters:
distributedImage- the distributed imageoutputPath- the output pathimageType- the image type- Returns:
- true, if successful
- Throws:
Exception- the exception
-
SaveVectorImageAsLocalFile
public boolean SaveVectorImageAsLocalFile(List<String> vectorImage, String outputPath, ImageType imageType) throws Exception Save vector image as local file.- Parameters:
vectorImage- the vector imageoutputPath- the output pathimageType- the image type- Returns:
- true, if successful
- Throws:
Exception- the exception
-
deleteHadoopFile
Delete hadoop file.- Parameters:
originalOutputPath- the original output pathimageType- the image type- Returns:
- true, if successful
- Throws:
Exception- the exception
-
deleteLocalFile
Delete local file.- Parameters:
originalOutputPath- the original output pathimageType- the image type- Returns:
- true, if successful
-