aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/geofence/GeofenceGeometry.java
diff options
context:
space:
mode:
authorAbyss777 <abyss@fox5.ru>2016-11-26 19:33:54 +0700
committerAbyss777 <abyss@fox5.ru>2016-11-26 19:33:54 +0700
commitb09d0e98541edc7122d992e85547741ffd57f72a (patch)
tree9b5011d5aefbcc32c378336ce103106e0a7e40d5 /src/org/traccar/geofence/GeofenceGeometry.java
parent6d022a7cbdacc747dd8517a8c82c3238d63637ac (diff)
downloadtrackermap-server-b09d0e98541edc7122d992e85547741ffd57f72a.tar.gz
trackermap-server-b09d0e98541edc7122d992e85547741ffd57f72a.tar.bz2
trackermap-server-b09d0e98541edc7122d992e85547741ffd57f72a.zip
Implement polyline geofence
Diffstat (limited to 'src/org/traccar/geofence/GeofenceGeometry.java')
-rw-r--r--src/org/traccar/geofence/GeofenceGeometry.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/org/traccar/geofence/GeofenceGeometry.java b/src/org/traccar/geofence/GeofenceGeometry.java
index 6b5b0acb7..d61e357ce 100644
--- a/src/org/traccar/geofence/GeofenceGeometry.java
+++ b/src/org/traccar/geofence/GeofenceGeometry.java
@@ -25,4 +25,33 @@ public abstract class GeofenceGeometry {
public abstract void fromWkt(String wkt) throws ParseException;
+ public static class Coordinate {
+
+ public static final double DEGREE360 = 360;
+
+ private double lat;
+ private double lon;
+
+ public double getLat() {
+ return lat;
+ }
+
+ public void setLat(double lat) {
+ this.lat = lat;
+ }
+
+ public double getLon() {
+ return lon;
+ }
+
+ // Need not to confuse algorithm by the abrupt reset of longitude
+ public double getLon360() {
+ return lon + DEGREE360;
+ }
+
+ public void setLon(double lon) {
+ this.lon = lon;
+ }
+ }
+
}