This is an automated email from the ASF dual-hosted git repository.
jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sedona.git
The following commit(s) were added to refs/heads/master by this push:
new 809b5a733 [SEDONA-649] Fix spelling in Java files (#1558)
809b5a733 is described below
commit 809b5a733621003973becf6d33eadffc74a098c7
Author: John Bampton <[email protected]>
AuthorDate: Sat Aug 24 06:57:46 2024 +1000
[SEDONA-649] Fix spelling in Java files (#1558)
normailized -> normalized
---
.../org/apache/sedona/viz/core/ColoringRule.java | 6 +++---
.../sedona/viz/core/VisualizationOperator.java | 24 +++++++++++-----------
.../coloringRule/GenericColoringRule.java | 18 ++++++++--------
.../viz/extension/coloringRule/LinearFunction.java | 16 +++++++--------
.../extension/coloringRule/PiecewiseFunction.java | 18 ++++++++--------
.../visualizationEffect/ChoroplethMap.java | 10 ++++-----
.../viz/extension/visualizationEffect/HeatMap.java | 18 ++++++++--------
7 files changed, 55 insertions(+), 55 deletions(-)
diff --git
a/spark/common/src/main/java/org/apache/sedona/viz/core/ColoringRule.java
b/spark/common/src/main/java/org/apache/sedona/viz/core/ColoringRule.java
index 11fdee4d5..92f85cd95 100644
--- a/spark/common/src/main/java/org/apache/sedona/viz/core/ColoringRule.java
+++ b/spark/common/src/main/java/org/apache/sedona/viz/core/ColoringRule.java
@@ -28,11 +28,11 @@ public abstract class ColoringRule implements Serializable {
/**
* Encode to RGB.
*
- * @param normailizedCount the normailized count
+ * @param normalizedCount the normalized count
* @param globalParameter the global parameter
* @return the integer
* @throws Exception the exception
*/
- public abstract Integer EncodeToRGB(
- Double normailizedCount, final GlobalParameter globalParameter) throws
Exception;
+ public abstract Integer EncodeToRGB(Double normalizedCount, final
GlobalParameter globalParameter)
+ throws Exception;
}
diff --git
a/spark/common/src/main/java/org/apache/sedona/viz/core/VisualizationOperator.java
b/spark/common/src/main/java/org/apache/sedona/viz/core/VisualizationOperator.java
index 5321fde2c..1bca8fc7f 100644
---
a/spark/common/src/main/java/org/apache/sedona/viz/core/VisualizationOperator.java
+++
b/spark/common/src/main/java/org/apache/sedona/viz/core/VisualizationOperator.java
@@ -773,23 +773,23 @@ public abstract class VisualizationOperator implements
Serializable {
/**
* Encode to color.
*
- * @param normailizedCount the normailized count
+ * @param normalizedCount the normalized count
* @return the color
* @throws Exception the exception
*/
- protected Color EncodeToColor(int normailizedCount) throws Exception {
+ protected Color EncodeToColor(int normalizedCount) throws Exception {
if (controlColorChannel.equals(Color.RED)) {
- red = useInverseRatioForControlColorChannel ? 255 - normailizedCount :
normailizedCount;
+ red = useInverseRatioForControlColorChannel ? 255 - normalizedCount :
normalizedCount;
} else if (controlColorChannel.equals(Color.GREEN)) {
- green = useInverseRatioForControlColorChannel ? 255 - normailizedCount :
normailizedCount;
+ green = useInverseRatioForControlColorChannel ? 255 - normalizedCount :
normalizedCount;
} else if (controlColorChannel.equals(Color.BLUE)) {
- blue = useInverseRatioForControlColorChannel ? 255 - normailizedCount :
normailizedCount;
+ blue = useInverseRatioForControlColorChannel ? 255 - normalizedCount :
normalizedCount;
} else {
throw new Exception(
"[Sedona-VizViz][GenerateColor] Unsupported changing color color
type. It should be in R,G,B");
}
- if (normailizedCount == 0) {
+ if (normalizedCount == 0) {
return new Color(red, green, blue, 0);
}
return new Color(red, green, blue, colorAlpha);
@@ -798,23 +798,23 @@ public abstract class VisualizationOperator implements
Serializable {
/**
* Encode to RGB.
*
- * @param normailizedCount the normailized count
+ * @param normalizedCount the normalized count
* @return the integer
* @throws Exception the exception
*/
- protected Integer EncodeToRGB(int normailizedCount) throws Exception {
+ protected Integer EncodeToRGB(int normalizedCount) throws Exception {
if (controlColorChannel.equals(Color.RED)) {
- red = useInverseRatioForControlColorChannel ? 255 - normailizedCount :
normailizedCount;
+ red = useInverseRatioForControlColorChannel ? 255 - normalizedCount :
normalizedCount;
} else if (controlColorChannel.equals(Color.GREEN)) {
- green = useInverseRatioForControlColorChannel ? 255 - normailizedCount :
normailizedCount;
+ green = useInverseRatioForControlColorChannel ? 255 - normalizedCount :
normalizedCount;
} else if (controlColorChannel.equals(Color.BLUE)) {
- blue = useInverseRatioForControlColorChannel ? 255 - normailizedCount :
normailizedCount;
+ blue = useInverseRatioForControlColorChannel ? 255 - normalizedCount :
normalizedCount;
} else {
throw new Exception(
"[Sedona-VizViz][GenerateColor] Unsupported changing color color
type. It should be in R,G,B");
}
- if (normailizedCount == 0) {
+ if (normalizedCount == 0) {
return new Color(red, green, blue, 0).getRGB();
}
return new Color(red, green, blue, colorAlpha).getRGB();
diff --git
a/spark/common/src/main/java/org/apache/sedona/viz/extension/coloringRule/GenericColoringRule.java
b/spark/common/src/main/java/org/apache/sedona/viz/extension/coloringRule/GenericColoringRule.java
index 4d42b2d59..29ad0260e 100644
---
a/spark/common/src/main/java/org/apache/sedona/viz/extension/coloringRule/GenericColoringRule.java
+++
b/spark/common/src/main/java/org/apache/sedona/viz/extension/coloringRule/GenericColoringRule.java
@@ -21,7 +21,7 @@ package org.apache.sedona.viz.extension.coloringRule;
import java.awt.Color;
public class GenericColoringRule {
- public static Integer EncodeToRGB(Double normailizedCount) {
+ public static Integer EncodeToRGB(Double normalizedCount) {
int alpha = 150;
Color[] colors =
new Color[] {
@@ -34,21 +34,21 @@ public class GenericColoringRule {
new Color(255, 85, 0, alpha),
new Color(255, 0, 0, alpha)
};
- if (normailizedCount == 0) {
+ if (normalizedCount == 0) {
return new Color(255, 255, 255, 0).getRGB();
- } else if (normailizedCount < 5) {
+ } else if (normalizedCount < 5) {
return colors[0].getRGB();
- } else if (normailizedCount < 15) {
+ } else if (normalizedCount < 15) {
return colors[1].getRGB();
- } else if (normailizedCount < 25) {
+ } else if (normalizedCount < 25) {
return colors[2].getRGB();
- } else if (normailizedCount < 35) {
+ } else if (normalizedCount < 35) {
return colors[3].getRGB();
- } else if (normailizedCount < 45) {
+ } else if (normalizedCount < 45) {
return colors[4].getRGB();
- } else if (normailizedCount < 60) {
+ } else if (normalizedCount < 60) {
return colors[5].getRGB();
- } else if (normailizedCount < 80) {
+ } else if (normalizedCount < 80) {
return colors[6].getRGB();
} else {
return colors[7].getRGB();
diff --git
a/spark/common/src/main/java/org/apache/sedona/viz/extension/coloringRule/LinearFunction.java
b/spark/common/src/main/java/org/apache/sedona/viz/extension/coloringRule/LinearFunction.java
index 987a033aa..627836340 100644
---
a/spark/common/src/main/java/org/apache/sedona/viz/extension/coloringRule/LinearFunction.java
+++
b/spark/common/src/main/java/org/apache/sedona/viz/extension/coloringRule/LinearFunction.java
@@ -31,7 +31,7 @@ public class LinearFunction extends ColoringRule {
* @see
org.datasyslab.babylon.core.internalobject.ColoringRule#EncodeToRGB(java.lang.Double,
org.datasyslab.babylon.core.parameters.GlobalParameter)
*/
@Override
- public Integer EncodeToRGB(Double normailizedCount, GlobalParameter
globalParameter)
+ public Integer EncodeToRGB(Double normalizedCount, GlobalParameter
globalParameter)
throws Exception {
int red = 0;
int green = 0;
@@ -39,24 +39,24 @@ public class LinearFunction extends ColoringRule {
if (globalParameter.controlColorChannel.equals(Color.RED)) {
red =
globalParameter.useInverseRatioForControlColorChannel
- ? 255 - normailizedCount.intValue()
- : normailizedCount.intValue();
+ ? 255 - normalizedCount.intValue()
+ : normalizedCount.intValue();
} else if (globalParameter.controlColorChannel.equals(Color.GREEN)) {
green =
globalParameter.useInverseRatioForControlColorChannel
- ? 255 - normailizedCount.intValue()
- : normailizedCount.intValue();
+ ? 255 - normalizedCount.intValue()
+ : normalizedCount.intValue();
} else if (globalParameter.controlColorChannel.equals(Color.BLUE)) {
blue =
globalParameter.useInverseRatioForControlColorChannel
- ? 255 - normailizedCount.intValue()
- : normailizedCount.intValue();
+ ? 255 - normalizedCount.intValue()
+ : normalizedCount.intValue();
} else {
throw new Exception(
"[Babylon][GenerateColor] Unsupported changing color color type. It
should be in R,G,B");
}
- if (normailizedCount == 0) {
+ if (normalizedCount == 0) {
return new Color(red, green, blue, 0).getRGB();
}
diff --git
a/spark/common/src/main/java/org/apache/sedona/viz/extension/coloringRule/PiecewiseFunction.java
b/spark/common/src/main/java/org/apache/sedona/viz/extension/coloringRule/PiecewiseFunction.java
index 75d39032c..01f25913e 100644
---
a/spark/common/src/main/java/org/apache/sedona/viz/extension/coloringRule/PiecewiseFunction.java
+++
b/spark/common/src/main/java/org/apache/sedona/viz/extension/coloringRule/PiecewiseFunction.java
@@ -31,7 +31,7 @@ public class PiecewiseFunction extends ColoringRule {
* @see
org.datasyslab.babylon.core.internalobject.ColoringRule#EncodeToRGB(java.lang.Double,
org.datasyslab.babylon.core.parameters.GlobalParameter)
*/
@Override
- public Integer EncodeToRGB(Double normailizedCount, GlobalParameter
globalParameter) {
+ public Integer EncodeToRGB(Double normalizedCount, GlobalParameter
globalParameter) {
int alpha = 150;
Color[] colors =
new Color[] {
@@ -44,21 +44,21 @@ public class PiecewiseFunction extends ColoringRule {
new Color(255, 85, 0, alpha),
new Color(255, 0, 0, alpha)
};
- if (normailizedCount == 0) {
+ if (normalizedCount == 0) {
return new Color(255, 255, 255, 0).getRGB();
- } else if (normailizedCount < 5) {
+ } else if (normalizedCount < 5) {
return colors[0].getRGB();
- } else if (normailizedCount < 15) {
+ } else if (normalizedCount < 15) {
return colors[1].getRGB();
- } else if (normailizedCount < 25) {
+ } else if (normalizedCount < 25) {
return colors[2].getRGB();
- } else if (normailizedCount < 35) {
+ } else if (normalizedCount < 35) {
return colors[3].getRGB();
- } else if (normailizedCount < 45) {
+ } else if (normalizedCount < 45) {
return colors[4].getRGB();
- } else if (normailizedCount < 60) {
+ } else if (normalizedCount < 60) {
return colors[5].getRGB();
- } else if (normailizedCount < 80) {
+ } else if (normalizedCount < 80) {
return colors[6].getRGB();
} else {
return colors[7].getRGB();
diff --git
a/spark/common/src/main/java/org/apache/sedona/viz/extension/visualizationEffect/ChoroplethMap.java
b/spark/common/src/main/java/org/apache/sedona/viz/extension/visualizationEffect/ChoroplethMap.java
index cecffe087..de51b34cd 100644
---
a/spark/common/src/main/java/org/apache/sedona/viz/extension/visualizationEffect/ChoroplethMap.java
+++
b/spark/common/src/main/java/org/apache/sedona/viz/extension/visualizationEffect/ChoroplethMap.java
@@ -191,19 +191,19 @@ public class ChoroplethMap extends VisualizationOperator {
* @see VisualizationOperator#EncodeToColor(int)
*/
@Override
- protected Color EncodeToColor(int normailizedCount) throws Exception {
+ protected Color EncodeToColor(int normalizedCount) throws Exception {
if (controlColorChannel.equals(Color.RED)) {
- red = useInverseRatioForControlColorChannel ? 255 - normailizedCount :
normailizedCount;
+ red = useInverseRatioForControlColorChannel ? 255 - normalizedCount :
normalizedCount;
} else if (controlColorChannel.equals(Color.GREEN)) {
- green = useInverseRatioForControlColorChannel ? 255 - normailizedCount :
normailizedCount;
+ green = useInverseRatioForControlColorChannel ? 255 - normalizedCount :
normalizedCount;
} else if (controlColorChannel.equals(Color.BLUE)) {
- blue = useInverseRatioForControlColorChannel ? 255 - normailizedCount :
normailizedCount;
+ blue = useInverseRatioForControlColorChannel ? 255 - normalizedCount :
normalizedCount;
} else {
throw new Exception(
"[VisualizationOperator][GenerateColor] Unsupported changing color
color type. It should be in R,G,B");
}
- if (normailizedCount == 0) {
+ if (normalizedCount == 0) {
return new Color(red, green, blue, 255);
}
return new Color(red, green, blue, colorAlpha);
diff --git
a/spark/common/src/main/java/org/apache/sedona/viz/extension/visualizationEffect/HeatMap.java
b/spark/common/src/main/java/org/apache/sedona/viz/extension/visualizationEffect/HeatMap.java
index 7760e892a..ea87a1baa 100644
---
a/spark/common/src/main/java/org/apache/sedona/viz/extension/visualizationEffect/HeatMap.java
+++
b/spark/common/src/main/java/org/apache/sedona/viz/extension/visualizationEffect/HeatMap.java
@@ -109,7 +109,7 @@ public class HeatMap extends VisualizationOperator {
* @see VisualizationOperator#EncodeToColor(int)
*/
@Override
- protected Integer EncodeToRGB(int normailizedCount) throws Exception {
+ protected Integer EncodeToRGB(int normalizedCount) throws Exception {
int alpha = 150;
Color[] colors =
new Color[] {
@@ -122,21 +122,21 @@ public class HeatMap extends VisualizationOperator {
new Color(255, 51, 0, alpha),
new Color(255, 0, 0, alpha)
};
- if (normailizedCount < 1) {
+ if (normalizedCount < 1) {
return new Color(255, 255, 255, 0).getRGB();
- } else if (normailizedCount < 30) {
+ } else if (normalizedCount < 30) {
return colors[0].getRGB();
- } else if (normailizedCount < 50) {
+ } else if (normalizedCount < 50) {
return colors[1].getRGB();
- } else if (normailizedCount < 70) {
+ } else if (normalizedCount < 70) {
return colors[2].getRGB();
- } else if (normailizedCount < 100) {
+ } else if (normalizedCount < 100) {
return colors[3].getRGB();
- } else if (normailizedCount < 130) {
+ } else if (normalizedCount < 130) {
return colors[4].getRGB();
- } else if (normailizedCount < 160) {
+ } else if (normalizedCount < 160) {
return colors[5].getRGB();
- } else if (normailizedCount < 190) {
+ } else if (normalizedCount < 190) {
return colors[6].getRGB();
} else {
return colors[7].getRGB();