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 2e5f64543 [DOCS] Fix grammar and spelling (#1517)
2e5f64543 is described below

commit 2e5f64543d9a9957fb5f4b47d802907fea08a735
Author: John Bampton <[email protected]>
AuthorDate: Wed Jul 10 03:07:58 2024 +1000

    [DOCS] Fix grammar and spelling (#1517)
---
 .../main/java/org/apache/sedona/common/raster/RasterAccessors.java | 6 +++---
 .../main/java/org/apache/sedona/common/subDivide/PivotFinder.java  | 2 +-
 .../main/java/org/apache/sedona/common/utils/GeometrySplitter.java | 4 ++--
 .../src/main/java/org/apache/sedona/common/utils/RasterUtils.java  | 7 +++----
 .../org/apache/sedona/common/raster/RasterBandEditorsTest.java     | 6 +++---
 .../java/org/apache/sedona/common/raster/RasterEditorsTest.java    | 2 +-
 .../core/formatMapper/shapefileParser/boundary/BoundBox.java       | 2 +-
 .../formatMapper/shapefileParser/parseUtils/shp/ShapeSerde.java    | 2 +-
 .../formatMapper/shapefileParser/parseUtils/shp/ShpFileParser.java | 2 +-
 .../formatMapper/shapefileParser/shapes/CombineShapeReader.java    | 2 +-
 .../java/org/apache/sedona/core/joinJudgement/DedupParams.java     | 2 +-
 .../sedona/core/spatialPartitioning/quadtree/StandardQuadTree.java | 6 +++---
 12 files changed, 21 insertions(+), 22 deletions(-)

diff --git 
a/common/src/main/java/org/apache/sedona/common/raster/RasterAccessors.java 
b/common/src/main/java/org/apache/sedona/common/raster/RasterAccessors.java
index 47a2407c7..0baccaff0 100644
--- a/common/src/main/java/org/apache/sedona/common/raster/RasterAccessors.java
+++ b/common/src/main/java/org/apache/sedona/common/raster/RasterAccessors.java
@@ -257,9 +257,9 @@ public class RasterAccessors {
    *
    * @param raster the raster
    * @return double[] with the following values: 0: upperLeftX: upper left x 
1: upperLeftY: upper
-   *     left y 2: width: number of pixels on x axis 3: height: number of 
pixels on y axis 4:
-   *     scaleX: pixel width 5: scaleY: pixel height 6: skewX: skew on x axis 
7: skewY: skew on y
-   *     axis 8: srid 9: numBands
+   *     left y 2: width: number of pixels on x-axis 3: height: number of 
pixels on y-axis 4:
+   *     scaleX: pixel width 5: scaleY: pixel height 6: skewX: skew on x-axis 
7: skewY: skew on
+   *     y-axis 8: srid 9: numBands
    * @throws FactoryException
    */
   public static double[] metadata(GridCoverage2D raster) throws 
FactoryException {
diff --git 
a/common/src/main/java/org/apache/sedona/common/subDivide/PivotFinder.java 
b/common/src/main/java/org/apache/sedona/common/subDivide/PivotFinder.java
index ec38d03e1..f3b71ba91 100644
--- a/common/src/main/java/org/apache/sedona/common/subDivide/PivotFinder.java
+++ b/common/src/main/java/org/apache/sedona/common/subDivide/PivotFinder.java
@@ -40,7 +40,7 @@ public class PivotFinder {
       LinearRing ringToTrim = lwPoly.getExteriorRing();
       // if the shell is too small, use the largest hole
       if (numberOfVertices >= 2 * lwPoly.getExteriorRing().getNumPoints()) {
-        // find the hole with largest area and assign to ringtotrim
+        // find the hole with the largest area and assign to ringtotrim
         double maxArea = 
geometryFactory.createPolygon(lwPoly.getExteriorRing()).getArea();
         for (int i = 0; i < lwPoly.getNumInteriorRing(); i++) {
           LinearRing curHole = lwPoly.getInteriorRingN(i);
diff --git 
a/common/src/main/java/org/apache/sedona/common/utils/GeometrySplitter.java 
b/common/src/main/java/org/apache/sedona/common/utils/GeometrySplitter.java
index a84ee6169..89c6a0898 100644
--- a/common/src/main/java/org/apache/sedona/common/utils/GeometrySplitter.java
+++ b/common/src/main/java/org/apache/sedona/common/utils/GeometrySplitter.java
@@ -51,7 +51,7 @@ public final class GeometrySplitter {
   /**
    * Split input geometry by the blade geometry. Input geometry can be lineal 
(LineString or
    * MultiLineString) or polygonal (Polygon or MultiPolygon). A 
GeometryCollection can also be used
-   * as an input but it must be homogeneous. For lineal geometry refer to the 
{@link
+   * as an input, but it must be homogeneous. For lineal geometry refer to the 
{@link
    * splitLines(Geometry, Geometry) splitLines} method for restrictions on the 
blade. Refer to
    * {@link splitPolygons(Geometry, Geometry) splitPolygons} for restrictions 
on the blade for
    * polygonal input geometry.
@@ -272,7 +272,7 @@ public final class GeometrySplitter {
     // avoid candidate polygons that are impossible
     Geometry bladeWithinPolygons = blade.intersection(polygons);
 
-    // a union will node all of the lines at intersections
+    // a union will node all the lines at intersections
     // these nodes are required for Polygonizer to work correctly
     Geometry totalLineWork = polygons.getBoundary().union(bladeWithinPolygons);
 
diff --git 
a/common/src/main/java/org/apache/sedona/common/utils/RasterUtils.java 
b/common/src/main/java/org/apache/sedona/common/utils/RasterUtils.java
index ee6c4a185..f18cf8b95 100644
--- a/common/src/main/java/org/apache/sedona/common/utils/RasterUtils.java
+++ b/common/src/main/java/org/apache/sedona/common/utils/RasterUtils.java
@@ -544,9 +544,8 @@ public class RasterUtils {
   public static Geometry convertCRSIfNeeded(
       Geometry geometry, CoordinateReferenceSystem targetCRS) {
     int geomSRID = geometry.getSRID();
-    // If the geometry has a SRID and it is not the same as the raster CRS, we 
need to transform the
-    // geometry
-    // to the raster CRS.
+    // If the geometry has a SRID, and it is not the same as the raster CRS, 
we need to transform
+    // the geometry to the raster CRS.
     // Note that:
     // In Sedona vector, we do not perform implicit CRS transform. Everything 
must be done
     // explicitly via ST_Transform
@@ -635,7 +634,7 @@ public class RasterUtils {
   }
 
   public static boolean isDataTypeIntegral(int dataTypeCode) {
-    // returns true if the datatype code refers to an int-like datatype (int, 
short, etc)
+    // returns true if the datatype code refers to an int-like datatype (int, 
short, etc.)
     switch (dataTypeCode) {
       case 3: // int
       case 0: // byte
diff --git 
a/common/src/test/java/org/apache/sedona/common/raster/RasterBandEditorsTest.java
 
b/common/src/test/java/org/apache/sedona/common/raster/RasterBandEditorsTest.java
index 3b0226324..f23aa279d 100644
--- 
a/common/src/test/java/org/apache/sedona/common/raster/RasterBandEditorsTest.java
+++ 
b/common/src/test/java/org/apache/sedona/common/raster/RasterBandEditorsTest.java
@@ -412,7 +412,7 @@ public class RasterBandEditorsTest extends RasterTestBase {
     assertArrayEquals(expectedBandValues, actualBandValues, 0.1d);
 
     // test preservation of original raster
-    // remove last index as that's number of bands and they wouldn't be equal
+    // remove last index as that's number of bands, and they wouldn't be equal
     double[] actualMetadata = 
Arrays.stream(RasterAccessors.metadata(actualRaster), 0, 9).toArray();
     double[] expectedMetadata = 
Arrays.stream(RasterAccessors.metadata(toRaster), 0, 9).toArray();
     assertArrayEquals(expectedMetadata, actualMetadata, 0.1d);
@@ -438,7 +438,7 @@ public class RasterBandEditorsTest extends RasterTestBase {
     assertArrayEquals(expectedBandValues, actualBandValues, 0.1d);
 
     // test preservation of original raster
-    // remove last index as that's number of bands and they wouldn't be equal
+    // remove last index as that's number of bands, and they wouldn't be equal
     double[] actualMetadata = 
Arrays.stream(RasterAccessors.metadata(actualRaster), 0, 9).toArray();
     double[] expectedMetadata = 
Arrays.stream(RasterAccessors.metadata(toRaster), 0, 9).toArray();
     assertArrayEquals(expectedMetadata, actualMetadata, 0.1d);
@@ -464,7 +464,7 @@ public class RasterBandEditorsTest extends RasterTestBase {
     assertArrayEquals(expectedBandValues, actualBandValues, 0.1d);
 
     // test preservation of original raster
-    // remove last index as that's number of bands and they wouldn't be equal
+    // remove last index as that's number of bands, and they wouldn't be equal
     double[] actualMetadata = 
Arrays.stream(RasterAccessors.metadata(actualRaster), 0, 9).toArray();
     double[] expectedMetadata = 
Arrays.stream(RasterAccessors.metadata(toRaster), 0, 9).toArray();
     assertArrayEquals(expectedMetadata, actualMetadata, 0.1d);
diff --git 
a/common/src/test/java/org/apache/sedona/common/raster/RasterEditorsTest.java 
b/common/src/test/java/org/apache/sedona/common/raster/RasterEditorsTest.java
index 9f5d3e1d2..378f9783f 100644
--- 
a/common/src/test/java/org/apache/sedona/common/raster/RasterEditorsTest.java
+++ 
b/common/src/test/java/org/apache/sedona/common/raster/RasterEditorsTest.java
@@ -4185,7 +4185,7 @@ public class RasterEditorsTest extends RasterTestBase {
         } else {
           // Should match with values retrieved from source raster. The 
transformed raster may not
           // have the
-          // same grid as the source raster so we need to fetch some nearby 
values from the source
+          // same grid as the source raster, so we need to fetch some nearby 
values from the source
           // raster and
           // see if any of them matches the transformed value. Please note 
that this requires us to
           // use the
diff --git 
a/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/boundary/BoundBox.java
 
b/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/boundary/BoundBox.java
index 8d260ee23..c77462830 100644
--- 
a/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/boundary/BoundBox.java
+++ 
b/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/boundary/BoundBox.java
@@ -45,7 +45,7 @@ public class BoundBox implements Serializable {
     this.bounds = otherbox.copyBounds();
   }
 
-  /** construct a initial boundBox with all value 0 */
+  /** construct an initial boundBox with all value 0 */
   public BoundBox() {
     bounds = new double[8];
   }
diff --git 
a/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/parseUtils/shp/ShapeSerde.java
 
b/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/parseUtils/shp/ShapeSerde.java
index 4e1a77b84..30ffaeae8 100644
--- 
a/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/parseUtils/shp/ShapeSerde.java
+++ 
b/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/parseUtils/shp/ShapeSerde.java
@@ -41,7 +41,7 @@ import org.locationtech.jts.geom.Polygon;
  * <p>First byte contains {@link ShapeType#id}. The rest is type specific. 
Point: 8 bytes for X
  * coordinate, followed by 8 bytes for Y coordinate. LineString is serialized 
as MultiLineString.
  * MultiLineString: 16 bytes for envelope, 4 bytes for the number of line 
strings, 4 bytes for total
- * number of vertices, 16 * num-vertices for XY coordinates of all the 
vertices. Polygons is
+ * number of vertices, 16 * num-vertices for XY coordinates of all the 
vertices. Polygons are
  * serialized as MultiPolygon. MultiPolygon: 16 bytes for envelope, 4 bytes 
for the total number of
  * exterior and interior rings of all polygons, 4 bytes for total number of 
vertices, 16 *
  * num-vertices for XY coordinates of all the vertices. The vertices are 
written one polygon at a
diff --git 
a/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/parseUtils/shp/ShpFileParser.java
 
b/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/parseUtils/shp/ShpFileParser.java
index ffc7fca81..a1fb476ef 100644
--- 
a/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/parseUtils/shp/ShpFileParser.java
+++ 
b/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/parseUtils/shp/ShpFileParser.java
@@ -35,7 +35,7 @@ public class ShpFileParser implements Serializable, 
ShapeFileConst {
   private long remainLength = 0;
 
   /**
-   * create a new shape file parser with a input source that is instance of 
DataInputStream
+   * create a new shape file parser with an input source that is instance of 
DataInputStream
    *
    * @param inputStream
    */
diff --git 
a/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/shapes/CombineShapeReader.java
 
b/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/shapes/CombineShapeReader.java
index ed2904be4..9414fceab 100644
--- 
a/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/shapes/CombineShapeReader.java
+++ 
b/spark/common/src/main/java/org/apache/sedona/core/formatMapper/shapefileParser/shapes/CombineShapeReader.java
@@ -86,7 +86,7 @@ public class CombineShapeReader extends 
RecordReader<ShapeKey, PrimitiveShape> {
                 paths[i], fileSplit.getOffset(i), fileSplit.getLength(i), 
fileSplit.getLocations());
       }
     }
-    // if shape file doesn't exists, throw an IOException
+    // if shape file doesn't exist, throw an IOException
     if (shpSplit == null) {
       throw new IOException("Can't find .shp file.");
     } else {
diff --git 
a/spark/common/src/main/java/org/apache/sedona/core/joinJudgement/DedupParams.java
 
b/spark/common/src/main/java/org/apache/sedona/core/joinJudgement/DedupParams.java
index b30b3df6b..59ffaaf7f 100644
--- 
a/spark/common/src/main/java/org/apache/sedona/core/joinJudgement/DedupParams.java
+++ 
b/spark/common/src/main/java/org/apache/sedona/core/joinJudgement/DedupParams.java
@@ -24,7 +24,7 @@ import java.util.Objects;
 import org.locationtech.jts.geom.Envelope;
 
 /**
- * Contains information necessary to activate de-dup logic in sub-classes of 
{@link JudgementBase}.
+ * Contains information necessary to activate de-dup logic in subclasses of 
{@link JudgementBase}.
  */
 public final class DedupParams implements Serializable {
   private final List<Envelope> partitionExtents;
diff --git 
a/spark/common/src/main/java/org/apache/sedona/core/spatialPartitioning/quadtree/StandardQuadTree.java
 
b/spark/common/src/main/java/org/apache/sedona/core/spatialPartitioning/quadtree/StandardQuadTree.java
index aeff52f21..21cd45dd0 100644
--- 
a/spark/common/src/main/java/org/apache/sedona/core/spatialPartitioning/quadtree/StandardQuadTree.java
+++ 
b/spark/common/src/main/java/org/apache/sedona/core/spatialPartitioning/quadtree/StandardQuadTree.java
@@ -39,7 +39,7 @@ public class StandardQuadTree<T> extends PartitioningUtils 
implements Serializab
   public static final int REGION_NE = 1;
   public static final int REGION_SW = 2;
   public static final int REGION_SE = 3;
-  // Maximum number of items in any given zone. When reached, a zone is 
sub-divided.
+  // Maximum number of items in any given zone. When reached, a zone is 
subdivided.
   private final int maxItemsPerZone;
   private final int maxLevel;
   private final int level;
@@ -48,7 +48,7 @@ public class StandardQuadTree<T> extends PartitioningUtils 
implements Serializab
   // current rectangle zone
   private final QuadRectangle zone;
   private int nodeNum = 0;
-  // the four sub regions,
+  // the four sub-regions,
   // may be null if not needed
   private StandardQuadTree<T>[] regions;
 
@@ -224,7 +224,7 @@ public class StandardQuadTree<T> extends PartitioningUtils 
implements Serializab
   /**
    * Traverses the tree top-down breadth-first and calls the visitor for each 
node. Stops traversing
    * if a call to Visitor.visit returns false. lineage will memorize the 
traversal path for each
-   * nodes
+   * node
    */
   private void traverseWithTrace(VisitorWithLineage<T> visitor, String 
lineage) {
     if (!visitor.visit(this, lineage)) {

Reply via email to