Skip to content

Commit

Permalink
codespell fixes: accomodate doesnt efficent isnt occures orginal simi…
Browse files Browse the repository at this point in the history
…liar thru wierd (#342)

Signed-off-by: Kurt Schwehr <schwehr@google.com>
  • Loading branch information
schwehr authored and dr-jts committed Nov 7, 2018
1 parent 8c54ca5 commit 8297bec
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 22 deletions.
2 changes: 1 addition & 1 deletion MIGRATION.md
Expand Up @@ -18,7 +18,7 @@ During that transition, the Java package names and Maven GAVs have changed. For
| Maven GroupId | com.vividsolutions | org.locationtech.jts |
| Package names | com.vividsolutions.jts.* | org.locationtech.jts.* |

To upgrade a Maven project (or another build tool using Maven dependency management), one can do a find and replace on ```pom.xml``` files (or similiar build files). In the source code, one could do a find and replace on the package names. As a concrete example, one could use these two commands to handle most of the migration.
To upgrade a Maven project (or another build tool using Maven dependency management), one can do a find and replace on ```pom.xml``` files (or similar build files). In the source code, one could do a find and replace on the package names. As a concrete example, one could use these two commands to handle most of the migration.

```
git grep -l com.vividsolutions | grep pom.xml | xargs sed -i "s/com.vividsolutions/org.locationtech.jts/g"
Expand Down
Expand Up @@ -70,7 +70,7 @@ public static Geometry delaunayTrianglesWithToleranceNoError(Geometry geom, doub
}
catch (LocateFailureException ex) {
System.out.println(ex);
// ignore this exception and drop thru
// ignore this exception and drop through
}
/**
* Get the triangles created up until the error
Expand Down
Expand Up @@ -212,7 +212,7 @@ public String getToolTipText(MouseEvent event) {
// if (event.getPoint().x < 100) return null;
Coordinate pt = viewport.toModelCoordinate(event.getPoint());
double toleranceInModel = AppConstants.TOLERANCE_PIXELS / getViewport().getScale();
// avoid wierd scale issues
// avoid weird scale issues
if (toleranceInModel <= 0.0) return null;
return GeometryLocationsWriter.writeLocation(getLayerList(), pt, toleranceInModel);
// return viewport.toModel(event.getPoint()).toString();
Expand Down
Expand Up @@ -278,7 +278,7 @@ public int getLength(Geometry geometry){
* Removed LEDatastream refs and replaced with EndianData[in/out]putstream
*
* Revision 1.1 2002/08/27 21:04:58 dblasby
* orginal
* original
*
* Revision 1.2 2002/03/05 10:23:59 jmacgill
* made sure geometries were created using the factory methods
Expand Down
Expand Up @@ -54,7 +54,7 @@ public Geometry read(EndianDataInputStream file,GeometryFactory geometryFactory,
actualReadWords += 2;

if (shapeType != myShapeType)
throw new InvalidShapefileException("pointhandler.read() - handler's shapetype doesnt match file's");
throw new InvalidShapefileException("pointhandler.read() - handler's shapetype doesn't match file's");

double x = file.readDoubleLE();
double y = file.readDoubleLE();
Expand Down
Expand Up @@ -222,7 +222,7 @@ public Geometry read( EndianDataInputStream file , GeometryFactory geometryFacto

Geometry result = geometryFactory.createMultiPolygon(polygons);
// if (!(result.isValid() ))
// System.out.println("geom isnt valid");
// System.out.println("geom isn't valid");
return result;
}

Expand Down Expand Up @@ -389,7 +389,7 @@ public int getLength(Geometry geometry){
* Removed LEDatastream refs and replaced with EndianData[in/out]putstream
*
* Revision 1.1 2002/08/27 21:04:58 dblasby
* orginal
* original
*
* Revision 1.3 2002/03/05 10:51:01 andyt
* removed use of factory from write method
Expand Down
Expand Up @@ -22,7 +22,7 @@

/**
* Thrown when an error relating to the shapefile
* occures
* occurs
*/
public class ShapefileException extends Exception{
public ShapefileException(){
Expand Down
Expand Up @@ -57,7 +57,7 @@ public class SVGWriter
*/
private static DecimalFormat createFormatter(PrecisionModel precisionModel) {
// the default number of decimal places is 16, which is sufficient
// to accomodate the maximum precision of a double.
// to accommodate the maximum precision of a double.
int decimalPlaces = precisionModel.getMaximumSignificantDigits();
// specify decimal separator explicitly to avoid problems in other locales
DecimalFormatSymbols symbols = new DecimalFormatSymbols();
Expand Down
Expand Up @@ -102,7 +102,7 @@ public Geometry createSineStar()
Coordinate[] pts = new Coordinate[nPts + 1];
int iPt = 0;
for (int i = 0; i < nPts; i++) {
// the fraction of the way thru the current arm - in [0,1]
// the fraction of the way through the current arm - in [0,1]
double ptArcFrac = (i / (double) nPts) * numArms;
double armAngFrac = ptArcFrac - Math.floor(ptArcFrac);

Expand Down
Expand Up @@ -7,7 +7,7 @@
</head>
<body bgcolor="white">

Classes to perform efficent unioning of collections of geometries.
Classes to perform efficient unioning of collections of geometries.

</body>
</html>
Expand Up @@ -47,7 +47,7 @@ public static Geometry intersection(Geometry geom0, Geometry geom1)
try {
CommonBitsOp cbo = new CommonBitsOp(true);
Geometry resultEP = cbo.intersection(geom0, geom1);
// check that result is a valid geometry after the reshift to orginal precision
// check that result is a valid geometry after the reshift to original precision
if (! resultEP.isValid())
throw originalEx;
return resultEP;
Expand Down Expand Up @@ -82,7 +82,7 @@ public static Geometry union(Geometry geom0, Geometry geom1)
try {
CommonBitsOp cbo = new CommonBitsOp(true);
Geometry resultEP = cbo.union(geom0, geom1);
// check that result is a valid geometry after the reshift to orginal precision
// check that result is a valid geometry after the reshift to original precision
if (! resultEP.isValid())
throw originalEx;
return resultEP;
Expand Down Expand Up @@ -117,7 +117,7 @@ public static Geometry difference(Geometry geom0, Geometry geom1)
try {
CommonBitsOp cbo = new CommonBitsOp(true);
Geometry resultEP = cbo.difference(geom0, geom1);
// check that result is a valid geometry after the reshift to orginal precision
// check that result is a valid geometry after the reshift to original precision
if (! resultEP.isValid())
throw originalEx;
return resultEP;
Expand Down Expand Up @@ -152,7 +152,7 @@ public static Geometry symDifference(Geometry geom0, Geometry geom1)
try {
CommonBitsOp cbo = new CommonBitsOp(true);
Geometry resultEP = cbo.symDifference(geom0, geom1);
// check that result is a valid geometry after the reshift to orginal precision
// check that result is a valid geometry after the reshift to original precision
if (! resultEP.isValid())
throw originalEx;
return resultEP;
Expand Down Expand Up @@ -190,7 +190,7 @@ public static Geometry buffer(Geometry geom, double distance)
try {
CommonBitsOp cbo = new CommonBitsOp(true);
Geometry resultEP = cbo.buffer(geom, distance);
// check that result is a valid geometry after the reshift to orginal precision
// check that result is a valid geometry after the reshift to original precision
if (! resultEP.isValid())
throw originalEx;
return resultEP;
Expand Down
Expand Up @@ -66,7 +66,7 @@ public Coordinate[] edit(Coordinate[] coordinates, Geometry geom) {
if (removeCollapsed)
collapsedCoords = null;

// return null or orginal length coordinate array
// return null or original length coordinate array
if (noRepeatedCoords.length < minLength) {
return collapsedCoords;
}
Expand Down
Expand Up @@ -141,7 +141,7 @@ public Coordinate[] edit(Coordinate[] coordinates, Geometry geom)
Coordinate[] collapsedCoords = reducedCoords;
if (removeCollapsed) collapsedCoords = null;

// return null or orginal length coordinate array
// return null or orignal length coordinate array
if (noRepeatedCoords.length < minLength) {
return collapsedCoords;
}
Expand Down
Expand Up @@ -102,7 +102,7 @@ public void test(Geometry g, List lines)

public int testOriginal(Geometry g, List lines)
{
System.out.println("Using orginal JTS algorithm");
System.out.println("Using original JTS algorithm");
int count = 0;
for (Iterator i = lines.iterator(); i.hasNext(); ) {
LineString line = (LineString) i.next();
Expand Down
Expand Up @@ -158,7 +158,7 @@ public void test(Geometry g, List lines)

public int testOriginal(int iter, Geometry g, List lines)
{
if (iter == 0) System.out.println("Using orginal JTS algorithm");
if (iter == 0) System.out.println("Using original JTS algorithm");
int count = 0;
for (Iterator i = lines.iterator(); i.hasNext(); ) {
LineString line = (LineString) i.next();
Expand Down
Expand Up @@ -56,7 +56,7 @@
</case>

<case>
<desc>L overlaps thru Y axis side</desc>
<desc>L overlaps through Y axis side</desc>
<a>
POLYGON((0 0, 100 0, 100 100, 0 100, 0 0))
</a>
Expand All @@ -67,7 +67,7 @@
</case>

<case>
<desc>L overlaps thru X axis side</desc>
<desc>L overlaps through X axis side</desc>
<a>
POLYGON((0 0, 100 0, 100 100, 0 100, 0 0))
</a>
Expand Down

0 comments on commit 8297bec

Please sign in to comment.