Enum FenceEnterExitSpatialRelationship

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<FenceEnterExitSpatialRelationship>

    public enum FenceEnterExitSpatialRelationship
    extends java.lang.Enum<FenceEnterExitSpatialRelationship>
    The spatial relationship that determines when a fence has been entered or exited.

    When determining whether a feed entity has entered or exited a fence polygon, there are two spatial operations that can be used:

    • Intersects, where the geometry of the feed must intersect the fence polygon.
    • Contains, where the geometry of the feed must be contained by the fence polygon.
    These operations can be used to determine whether a fence polygon has been entered, and also when it has been exited. Containment is a stricter version of intersection (e.g. when a fence polygon contains a feed entity they also intersect) so will tend to result in fewer notifications when the two geometries are nearby. By using different combinations of these rules for enter and exit you can control the likelihood that notifications will be sent.

    Note that when the feed geometry is a Point there is no difference between intersection and containment so these options will not affect behavior. When using a LocationGeotriggerFeed, set FenceGeotrigger.getFeedAccuracyMode() to FenceGeotriggerFeedAccuracyMode.USE_GEOMETRY_WITH_ACCURACY in order to create a polygon geometry that accounts for the area of uncertainty around a LocationDataSource.Location.getPosition().

    Since:
    100.13.0
    • Enum Constant Detail

      • ENTER_INTERSECTS_AND_EXIT_DOES_NOT_INTERSECT

        public static final FenceEnterExitSpatialRelationship ENTER_INTERSECTS_AND_EXIT_DOES_NOT_INTERSECT
        The fence polygon will be entered when it intersects the entity from a GeotriggerFeed and exited when it no longer intersects.

        This option will tend to increase the number of notifications sent as you approach a fence polygon. Use this option when you wish to receive all possible notifications - for example when you want to be warned that you are approaching a hazard.

        This option will have no effect unless the feed entity geometry is a Polygon. Set FenceGeotrigger.getFeedAccuracyMode() to FenceGeotriggerFeedAccuracyMode.USE_GEOMETRY_WITH_ACCURACY in order to create a polygon geometry that accounts for the area of uncertainty around a LocationDataSource.Location.getPosition().

        In the diagram below, the feed enters the fence on the left (shown in yellow) and exits on the right (shown in purple).

        diagram demonstrating the enter intersects and exit does not intersect relationship

        Since:
        100.13.0
      • ENTER_CONTAINS_AND_EXIT_DOES_NOT_INTERSECT

        public static final FenceEnterExitSpatialRelationship ENTER_CONTAINS_AND_EXIT_DOES_NOT_INTERSECT
        The fence polygon will be entered when it contains the entity from a GeotriggerFeed and exited when it no longer intersects.

        This option will tend to minimize the number of notifications sent. The entity must be fully within the fence polygon before entering and must also be fully outside before exiting. This combination acts to reduce the number of spurious notifications that occur as you move around the border of a fence. Use this option when you wish to limit notifications - for example when driving past properties on your way to a delivery address.

        This option will have no effect unless the feed entity geometry is a Polygon. Set FenceGeotrigger.getFeedAccuracyMode() to FenceGeotriggerFeedAccuracyMode.USE_GEOMETRY_WITH_ACCURACY in order to create a polygon geometry that accounts for the area of uncertainty around a LocationDataSource.Location.getPosition().

        In the diagram below, the feed enters the fence on the left (shown in yellow) and exits on the right (shown in purple).

        diagram demonstrating the enter contains and exit does not intersect relationship

        Since:
        100.13.0
    • Method Detail

      • values

        public static FenceEnterExitSpatialRelationship[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (FenceEnterExitSpatialRelationship c : FenceEnterExitSpatialRelationship.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static FenceEnterExitSpatialRelationship valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null