Class VisualizationOperator

java.lang.Object
org.apache.sedona.viz.core.VisualizationOperator
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ChoroplethMap, HeatMap, ScatterPlot

public abstract class VisualizationOperator extends Object implements Serializable
The Class VisualizationOperator.
See Also:
  • Field Details

    • rasterImage

      public BufferedImage rasterImage
      The raster image.
    • distributedRasterImage

      public org.apache.spark.api.java.JavaPairRDD<Integer,ImageSerializableWrapper> distributedRasterImage
      The distributed raster image.
    • vectorImage

      public List<String> vectorImage
      The vector image.
    • distributedVectorImage

      public org.apache.spark.api.java.JavaPairRDD<Integer,String> distributedVectorImage
      The distributed vector image.
    • colorizeOption

      protected ColorizeOption colorizeOption
      The colorize option.
    • maxPixelCount

      protected Double maxPixelCount
      The max pixel count.
    • reverseSpatialCoordinate

      protected boolean reverseSpatialCoordinate
      The reverse spatial coordinate.
    • resolutionX

      protected int resolutionX
      The resolution X.
    • resolutionY

      protected int resolutionY
      The resolution Y.
    • datasetBoundary

      protected org.locationtech.jts.geom.Envelope datasetBoundary
      The dataset boundary.
    • red

      protected int red
      The red.
    • green

      protected int green
      The green.
    • blue

      protected int blue
      The blue.
    • colorAlpha

      protected int colorAlpha
      The color alpha.
    • controlColorChannel

      protected Color controlColorChannel
      The control color channel.
    • useInverseRatioForControlColorChannel

      protected boolean useInverseRatioForControlColorChannel
      The use inverse ratio for control color channel.
    • distributedRasterCountMatrix

      protected org.apache.spark.api.java.JavaPairRDD<Pixel,Double> distributedRasterCountMatrix
      The distributed raster count matrix.
    • distributedRasterColorMatrix

      protected org.apache.spark.api.java.JavaPairRDD<Pixel,Integer> distributedRasterColorMatrix
      The distributed raster color matrix.
    • distributedVectorObjects

      protected org.apache.spark.api.java.JavaPairRDD<Object,Double> distributedVectorObjects
      The distributed vector objects.
    • distributedVectorColors

      protected org.apache.spark.api.java.JavaPairRDD<Object,Color> distributedVectorColors
      The distributed vector colors.
    • onlyDrawOutline

      protected boolean onlyDrawOutline
      The only draw outline.
    • PhotoFilterConvolutionMatrix

      protected Double[][] PhotoFilterConvolutionMatrix
      The Photo filter convolution matrix.
    • photoFilterRadius

      protected int photoFilterRadius
      The photo filter radius.
    • partitionX

      protected int partitionX
      The partition X.
    • partitionY

      protected int partitionY
      The partition Y.
    • partitionIntervalX

      protected int partitionIntervalX
      The partition interval X.
    • partitionIntervalY

      protected int partitionIntervalY
      The partition interval Y.
    • hasBeenSpatialPartitioned

      protected boolean hasBeenSpatialPartitioned
      The has been spatial partitioned.
    • parallelPhotoFilter

      protected boolean parallelPhotoFilter
      The parallel photo filter.
    • parallelRenderImage

      protected boolean parallelRenderImage
      The parallel render image.
  • Constructor Details

    • VisualizationOperator

      public VisualizationOperator(int resolutionX, int resolutionY, org.locationtech.jts.geom.Envelope datasetBoundary, ColorizeOption colorizeOption, boolean reverseSpatialCoordinate, int partitionX, int partitionY, boolean parallelPhotoFilter, boolean parallelRenderImage, boolean generateVectorImage)
      Instantiates a new visualization operator.
      Parameters:
      resolutionX - the resolution X
      resolutionY - the resolution Y
      datasetBoundary - the dataset boundary
      colorizeOption - the colorize option
      reverseSpatialCoordinate - the reverse spatial coordinate
      partitionX - the partition X
      partitionY - the partition Y
      parallelPhotoFilter - the parallel photo filter
      parallelRenderImage - the parallel render image
      generateVectorImage - the generate vector image
  • Method Details

    • InitPhotoFilterWeightMatrix

      protected boolean InitPhotoFilterWeightMatrix(PhotoFilter photoFilter)
      Inits the photo filter weight matrix.
      Parameters:
      photoFilter - the photo filter
      Returns:
      true, if successful
    • ApplyPhotoFilter

      protected org.apache.spark.api.java.JavaPairRDD<Pixel,Double> ApplyPhotoFilter(org.apache.spark.api.java.JavaSparkContext sparkContext) throws Exception
      Apply photo filter.
      Parameters:
      sparkContext - the spark context
      Returns:
      the java pair RDD
      Throws:
      Exception - the exception
    • Colorize

      protected boolean Colorize()
      Colorize.
      Returns:
      true, if successful
    • RenderImage

      protected boolean RenderImage(org.apache.spark.api.java.JavaSparkContext sparkContext) throws Exception
      Render image.
      Parameters:
      sparkContext - the spark context
      Returns:
      true, if successful
      Throws:
      Exception - the exception
    • setMaxPixelCount

      public boolean setMaxPixelCount(Double maxPixelCount)
      Sets the max pixel count.
      Parameters:
      maxPixelCount - the max pixel count
      Returns:
      true, if successful
    • CustomizeColor

      public boolean CustomizeColor(int red, int green, int blue, int colorAlpha, Color controlColorChannel, boolean useInverseRatioForControlColorChannel)
      Customize color.
      Parameters:
      red - the red
      green - the green
      blue - the blue
      colorAlpha - the color alpha
      controlColorChannel - the control color channel
      useInverseRatioForControlColorChannel - the use inverse ratio for control color channel
      Returns:
      true, if successful
    • EncodeToColor

      protected Color EncodeToColor(int normalizedCount) throws Exception
      Encode to color.
      Parameters:
      normalizedCount - the normalized count
      Returns:
      the color
      Throws:
      Exception - the exception
    • EncodeToRGB

      protected Integer EncodeToRGB(int normalizedCount) throws Exception
      Encode to RGB.
      Parameters:
      normalizedCount - the normalized count
      Returns:
      the integer
      Throws:
      Exception - the exception
    • Rasterize

      protected org.apache.spark.api.java.JavaPairRDD<Pixel,Double> Rasterize(org.apache.spark.api.java.JavaSparkContext sparkContext, SpatialRDD spatialRDD, boolean useSparkDefaultPartition)
      Rasterize.
      Parameters:
      sparkContext - the spark context
      spatialRDD - the spatial RDD
      useSparkDefaultPartition - the use spark default partition
      Returns:
      the java pair RDD
    • Rasterize

      protected org.apache.spark.api.java.JavaPairRDD<Pixel,Double> Rasterize(org.apache.spark.api.java.JavaSparkContext sparkContext, org.apache.spark.api.java.JavaPairRDD<org.locationtech.jts.geom.Polygon,Long> spatialPairRDD, boolean useSparkDefaultPartition)
      Rasterize.
      Parameters:
      sparkContext - the spark context
      spatialPairRDD - the spatial pair RDD
      useSparkDefaultPartition - the use spark default partition
      Returns:
      the java pair RDD