aboutsummaryrefslogtreecommitdiff
path: root/src/org
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-06-13 16:55:01 +0500
committerAbyss777 <abyss@fox5.ru>2016-06-13 16:55:01 +0500
commit3b5b60dace5ad75fe92bee5adef0c7e4c61b7757 (patch)
tree355cc0cd0d622cbbb7dbada1f5d04ff010367301 /src/org
parenta5cdddd4a304f75645a2b89b7e834e5750466c5b (diff)
downloadtrackermap-server-3b5b60dace5ad75fe92bee5adef0c7e4c61b7757.tar.gz
trackermap-server-3b5b60dace5ad75fe92bee5adef0c7e4c61b7757.tar.bz2
trackermap-server-3b5b60dace5ad75fe92bee5adef0c7e4c61b7757.zip
Style fixes
Diffstat (limited to 'src/org')
-rw-r--r--src/org/traccar/geofence/GeofenceCircle.java6
-rw-r--r--src/org/traccar/geofence/GeofenceGeometry.java4
-rw-r--r--src/org/traccar/geofence/GeofencePolygon.java22
3 files changed, 16 insertions, 16 deletions
diff --git a/src/org/traccar/geofence/GeofenceCircle.java b/src/org/traccar/geofence/GeofenceCircle.java
index 76d5a2816..e1c8f8a02 100644
--- a/src/org/traccar/geofence/GeofenceCircle.java
+++ b/src/org/traccar/geofence/GeofenceCircle.java
@@ -17,7 +17,7 @@ public class GeofenceCircle extends GeofenceGeometry {
public GeofenceCircle(String wkt) throws ParseException {
super();
- fromWKT(wkt);
+ fromWkt(wkt);
}
public GeofenceCircle(double latitude, double longitude, double radius) {
@@ -33,7 +33,7 @@ public class GeofenceCircle extends GeofenceGeometry {
}
@Override
- public String toWKT() {
+ public String toWkt() {
String wkt = "";
wkt = "CIRCLE (";
wkt += String.valueOf(centerLatitude);
@@ -47,7 +47,7 @@ public class GeofenceCircle extends GeofenceGeometry {
}
@Override
- public void fromWKT(String wkt) throws ParseException {
+ public void fromWkt(String wkt) throws ParseException {
if (!wkt.startsWith("CIRCLE")) {
throw new ParseException("Mismatch geometry type", 0);
}
diff --git a/src/org/traccar/geofence/GeofenceGeometry.java b/src/org/traccar/geofence/GeofenceGeometry.java
index c8f042413..83656a029 100644
--- a/src/org/traccar/geofence/GeofenceGeometry.java
+++ b/src/org/traccar/geofence/GeofenceGeometry.java
@@ -6,8 +6,8 @@ public abstract class GeofenceGeometry {
public abstract boolean containsPoint(double latitude, double longitude);
- public abstract String toWKT();
+ public abstract String toWkt();
- public abstract void fromWKT(String wkt) throws ParseException;
+ public abstract void fromWkt(String wkt) throws ParseException;
}
diff --git a/src/org/traccar/geofence/GeofencePolygon.java b/src/org/traccar/geofence/GeofencePolygon.java
index 08178375a..52920b7b1 100644
--- a/src/org/traccar/geofence/GeofencePolygon.java
+++ b/src/org/traccar/geofence/GeofencePolygon.java
@@ -11,7 +11,7 @@ public class GeofencePolygon extends GeofenceGeometry {
public GeofencePolygon(String wkt) throws ParseException {
super();
- fromWKT(wkt);
+ fromWkt(wkt);
}
private static class Coordinate {
@@ -94,9 +94,9 @@ public class GeofencePolygon extends GeofenceGeometry {
for (i = 0; i < polyCorners; j = i++) {
if (coordinates.get(i).getLon360() < longitude360
- && coordinates.get(j).getLon360() >= longitude360
- || coordinates.get(j).getLon360() < longitude360
- && coordinates.get(i).getLon360() >= longitude360) {
+ && coordinates.get(j).getLon360() >= longitude360
+ || coordinates.get(j).getLon360() < longitude360
+ && coordinates.get(i).getLon360() >= longitude360) {
oddNodes ^= longitude360 * multiple[i] + constant[i] < latitude;
}
}
@@ -104,7 +104,7 @@ public class GeofencePolygon extends GeofenceGeometry {
}
@Override
- public String toWKT() {
+ public String toWkt() {
StringBuffer buf = new StringBuffer();
buf.append("POLYGON (");
for (Coordinate coordinate : coordinates) {
@@ -117,7 +117,7 @@ public class GeofencePolygon extends GeofenceGeometry {
}
@Override
- public void fromWKT(String wkt) throws ParseException {
+ public void fromWkt(String wkt) throws ParseException {
if (coordinates == null) {
coordinates = new ArrayList<Coordinate>();
} else {
@@ -131,15 +131,15 @@ public class GeofencePolygon extends GeofenceGeometry {
if (content == null || content.equals("")) {
throw new ParseException("No content", 0);
}
- String[] commatokens = content.split(",");
- if (commatokens.length < 3) {
+ String[] commaTokens = content.split(",");
+ if (commaTokens.length < 3) {
throw new ParseException("Not valid content", 0);
}
- for (String commatoken : commatokens) {
- String[] tokens = commatoken.trim().split("\\s");
+ for (String commaToken : commaTokens) {
+ String[] tokens = commaToken.trim().split("\\s");
if (tokens.length != 2) {
- throw new ParseException("Here must be two coordinates: " + commatoken, 0);
+ throw new ParseException("Here must be two coordinates: " + commaToken, 0);
}
Coordinate coordinate = new Coordinate();
try {