Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Fix grammar and spelling #1517

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,9 @@ private static void ensurePoint(Geometry geometry) throws IllegalArgumentExcepti
*
* @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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static double findPivot(
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public GeometrySplitter(GeometryFactory geometryFactory) {
/**
* 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.
Expand Down Expand Up @@ -272,7 +272,7 @@ private Geometry generateCandidatePolygons(Geometry polygons, Geometry blade) {
// 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);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -544,9 +544,8 @@ public static Raster getRaster(RenderedImage renderedImage) {
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
Expand Down Expand Up @@ -635,7 +634,7 @@ public static int getDataTypeCode(String s) {
}

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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ public static void testAddBand4Param(GridCoverage2D fromRaster, GridCoverage2D t
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);
Expand All @@ -438,7 +438,7 @@ public static void testAddBand3Param(GridCoverage2D fromRaster, GridCoverage2D t
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);
Expand All @@ -464,7 +464,7 @@ public static void testAddBand2Param(GridCoverage2D fromRaster, GridCoverage2D t
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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4185,7 +4185,7 @@ private void verifyReprojectMatchResult(
} 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public BoundBox(BoundBox otherbox) {
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];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
* <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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void initialize(InputSplit split, TaskAttemptContext context)
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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;

Expand Down Expand Up @@ -224,7 +224,7 @@ private void traverse(Visitor<T> visitor) {
/**
* 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)) {
Expand Down
Loading