Interface IAGeofence

  • All Superinterfaces:
    Parcelable

    public interface IAGeofence
    extends Parcelable
    A data object representing a geofence defined by a set of vertices
    • Field Detail

      • GEOFENCE_TRANSITION_ENTER

        static final int GEOFENCE_TRANSITION_ENTER
        Geofence enter event. Enter event is triggered when entering a geofence.
        See Also:
        Constant Field Values
      • GEOFENCE_TRANSITION_EXIT

        static final int GEOFENCE_TRANSITION_EXIT
        Geofence exit event. Exit event is triggered when exiting a geofence.
        See Also:
        Constant Field Values
    • Method Detail

      • isIncluded

        boolean isIncluded​(double latitude,
                           double longitude,
                           Integer floor)
        Check whether a WGS84 coordinate (latitude & longitude) in specific floor is included in this geofence.
        Parameters:
        latitude - WGS84 coordinate latitude.
        longitude - WGS84 coordinate longitude.
        floor - Floor number of the position to be checked. If null, position can only be in the geofence if the geofence does not have floor number either.
      • getId

        String getId()
        Return the identification key for this geofence.
      • getName

        String getName()
        Return a human-readable name of the geofence. Empty string if not specified
      • getFloor

        Integer getFloor()
        Return the int floor number for this geofence if set, null otherwise.
      • hasFloor

        boolean hasFloor()
        Check whether the floor number has been set for this geofence.
        See Also:
        getFloor()
      • hasPayload

        boolean hasPayload()
        Check whether the payload is empty in this geofence.
        See Also:
        getPayload()
      • isCloudGeofence

        boolean isCloudGeofence()
        Returns:
        is this geofence cloud-defined (static) or run-time defined (dynamic)
      • getEdges

        ArrayList<double[]> getEdges()
        Return the list of vertices, as (latitude, longitude), pairs of this polygon. The edges are defined as the line segment between the consecutive points in the list and the line segment between the last and first points in the list (i.e., the first point is not stored twice).
        Returns:
        List of 2D doubles of defining the vertices of this polygon
      • getMaxLongitude

        double getMaxLongitude()
        Return the maximum longitude of the geofence in double.
      • getMinLongitude

        double getMinLongitude()
        Return the minimum longitude of the geofence in double.
      • getMaxLatitude

        double getMaxLatitude()
        Return the maximum latitude of the geofence in double.
      • getMinLatitude

        double getMinLatitude()
        Return the minimum latitude of the geofence in double.