Package com.thingworx.common.utils
Class LocationUtilities
java.lang.Object
com.thingworx.common.utils.LocationUtilities
@ThingworxExtensionApiClass(since={6,6},
canInstantiate=true)
public final class LocationUtilities
extends Object
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
calculateBearing
(Location loc1, Location loc2) calculateCircularGeoFence
(Location center, double radius, String units, int numberOfPoints) static String
calculateDirection
(Location loc1, Location loc2) static double
calculateDistance
(Location loc1, Location loc2, String units) static boolean
isInRegion
(List<Location> region, Location location) static boolean
isLocationWithinRegion
(Location regionNE, Location regionSW, Location location) static boolean
-
Constructor Details
-
LocationUtilities
public LocationUtilities()
-
-
Method Details
-
within
@ThingworxExtensionApiMethod(since={6,6}) public static boolean within(Location location, Location center, double distance, String units) -
isLocationWithinRegion
@ThingworxExtensionApiMethod(since={6,6}) public static boolean isLocationWithinRegion(Location regionNE, Location regionSW, Location location) -
calculateBearing
@ThingworxExtensionApiMethod(since={6,6}) public static double calculateBearing(Location loc1, Location loc2) -
calculateDirection
@ThingworxExtensionApiMethod(since={6,6}) public static String calculateDirection(Location loc1, Location loc2) -
calculateDistance
@ThingworxExtensionApiMethod(since={6,6}) public static double calculateDistance(Location loc1, Location loc2, String units) -
isInRegion
@ThingworxExtensionApiMethod(since={6,6}) public static boolean isInRegion(List<Location> region, Location location) -
calculateCircularGeoFence
-