GeofenceRegion

@Serializable
data class GeofenceRegion(val id: String, val latitude: Double, val longitude: Double, val radiusMeters: Float, val policyProfile: String, val priority: Int = 0, val transitionTypes: Set<TransitionType> = setOf( TransitionType.ENTER, TransitionType.EXIT, ), val displayName: String? = null)

Defines a geofence region with associated policy profile.

Privacy (GDPR Art. 5): Region definitions do not contain PII. Use opaque identifiers (e.g., "store-123", "warehouse-east").

Since

0.4.0

Constructors

Link copied to clipboard
constructor(id: String, latitude: Double, longitude: Double, radiusMeters: Float, policyProfile: String, priority: Int = 0, transitionTypes: Set<TransitionType> = setOf( TransitionType.ENTER, TransitionType.EXIT, ), displayName: String? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

Human-readable name for debugging (optional)

Link copied to clipboard
val id: String

Unique region identifier (must not be blank)

Link copied to clipboard

Center latitude (-90 to 90)

Link copied to clipboard

Center longitude (-180 to 180)

Link copied to clipboard

Policy profile to apply when inside this region

Link copied to clipboard

Higher priority wins when regions overlap (default 0)

Link copied to clipboard

Circular geofence radius (must be positive)

Link copied to clipboard

Which transitions to monitor (default: ENTER, EXIT)

Functions

Link copied to clipboard
fun contains(lat: Double, lon: Double): Boolean

Check if a point is within this region.