Class ImageGenerator

java.lang.Object
org.apache.sedona.viz.core.ImageGenerator
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
SedonaVizImageGenerator

public class ImageGenerator extends Object implements Serializable
The Class ImageGenerator.
See Also:
  • 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 Exception
      Save raster image as local file.
      Parameters:
      distributedImage - the distributed image
      outputPath - the output path
      imageType - the image type
      zoomLevel - the zoom level
      partitionOnX - the partition on X
      partitionOnY - 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 Exception
      Save raster image as local file.
      Parameters:
      distributedImage - the distributed image
      outputPath - the output path
      imageType - 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 Exception
      Save raster image as hadoop file.
      Parameters:
      distributedImage - the distributed image
      outputPath - the output path
      imageType - the image type
      zoomLevel - the zoom level
      partitionOnX - the partition on X
      partitionOnY - 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 image
      regionName - the region name
      accessKey - the access key
      secretKey - the secret key
      bucketName - the bucket name
      path - the path
      imageType - the image type
      zoomLevel - the zoom level
      partitionOnX - the partition on X
      partitionOnY - 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 image
      outputPath - the output path
      imageType - 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 image
      originalOutputPath - the original output path
      imageType - 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 image
      regionName - the region name
      accessKey - the access key
      secretKey - the secret key
      bucketName - the bucket name
      path - the path
      imageType - 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 Exception
      Save vector image as local file.
      Parameters:
      distributedImage - the distributed image
      outputPath - the output path
      imageType - 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 image
      outputPath - the output path
      imageType - the image type
      Returns:
      true, if successful
      Throws:
      Exception - the exception
    • deleteHadoopFile

      public boolean deleteHadoopFile(String originalOutputPath, ImageType imageType) throws Exception
      Delete hadoop file.
      Parameters:
      originalOutputPath - the original output path
      imageType - the image type
      Returns:
      true, if successful
      Throws:
      Exception - the exception
    • deleteLocalFile

      public boolean deleteLocalFile(String originalOutputPath, ImageType imageType)
      Delete local file.
      Parameters:
      originalOutputPath - the original output path
      imageType - the image type
      Returns:
      true, if successful