Joule
  • Welcome to Joule's Docs
  • Why Joule?
    • Joule capabilities
  • What is Joule?
    • Key features
    • The tech stack
  • Use case enablement
    • Use case building framework
  • Concepts
    • Core concepts
    • Low code development
    • Unified execution engine
    • Batch and stream processing
    • Continuous metrics
    • Key Joule data types
      • StreamEvent object
      • Contextual data
      • GeoNode
  • Tutorials
    • Getting started
    • Build your first use case
    • Stream sliding window quote analytics
    • Advanced tutorials
      • Custom missing value processor
      • Stateless Bollinger band analytics
      • IoT device control
  • FAQ
  • Glossary
  • Components
    • Pipelines
      • Use case anatomy
      • Data priming
        • Types of import
      • Processing unit
      • Group by
      • Emit computed events
      • Telemetry auditing
    • Processors
      • Common attributes
      • Filters
        • By type
        • By expression
        • Send on delta
        • Remove attributes
        • Drop all events
      • Enrichment
        • Key concepts
          • Anatomy of enrichment DSL
          • Banking example
        • Metrics
        • Dynamic contextual data
          • Caching architecture
        • Static contextual data
      • Transformation
        • Field Tokeniser
        • Obfuscation
          • Encryption
          • Masking
          • Bucketing
          • Redaction
      • Triggers
        • Change Data Capture
        • Business rules
      • Stream join
        • Inner stream joins
        • Outer stream joins
        • Join attributes & policy
      • Event tap
        • Anatomy of a Tap
        • SQL Queries
    • Analytics
      • Analytic tools
        • User defined analytics
          • Streaming analytics example
          • User defined analytics
          • User defined scripts
          • User defined functions
            • Average function library
        • Window analytics
          • Tumbling window
          • Sliding window
          • Aggregate functions
        • Analytic functions
          • Stateful
            • Exponential moving average
            • Rolling Sum
          • Stateless
            • Normalisation
              • Absolute max
              • Min max
              • Standardisation
              • Mean
              • Log
              • Z-Score
            • Scaling
              • Unit scale
              • Robust Scale
            • Statistics
              • Statistic summaries
              • Weighted moving average
              • Simple moving average
              • Count
            • General
              • Euclidean
        • Advanced analytics
          • Geospatial
            • Entity geo tracker
            • Geofence occupancy trigger
            • Geo search
            • IP address resolver
            • Reverse geocoding
            • Spatial Index
          • HyperLogLog
          • Distinct counter
      • ML inferencing
        • Feature engineering
          • Scripting
          • Scaling
          • Transform
        • Online predictive analytics
        • Model audit
        • Model management
      • Metrics engine
        • Create metrics
        • Apply metrics
        • Manage metrics
        • Priming metrics
    • Contextual data
      • Architecture
      • Configuration
      • MinIO S3
      • Apache Geode
    • Connectors
      • Sources
        • Kafka
          • Ingestion
        • RabbitMQ
          • Further RabbitMQ configurations
        • MQTT
          • Topic wildcards
          • Session management
          • Last Will and Testament
        • Rest endpoints
        • MinIO S3
        • File watcher
      • Sinks
        • Kafka
        • RabbitMQ
          • Further configurations
        • MQTT
          • Persistent messaging
          • Last Will and Testament
        • SQL databases
        • InfluxDB
        • MongoDB
        • Geode
        • WebSocket endpoint
        • MinIO S3
        • File transport
        • Slack
        • Email
      • Serialisers
        • Serialisation
          • Custom transform example
          • Formatters
        • Deserialisers
          • Custom parsing example
    • Observability
      • Enabling JMX for Joule
      • Meters
      • Metrics API
  • DEVELOPER GUIDES
    • Setting up developer environment
      • Environment setup
      • Build and deploy
      • Install Joule
        • Install Docker demo environment
        • Install with Docker
        • Install from source
        • Install Joule examples
    • Joulectl CLI
    • API Endpoints
      • Mangement API
        • Use case
        • Pipelines
        • Data connectors
        • Contextual data
      • Data access API
        • Query
        • Upload
        • WebSocket
      • SQL support
    • Builder SDK
      • Connector API
        • Sources
          • StreamEventParser API
        • Sinks
          • CustomTransformer API
      • Processor API
      • Analytics API
        • Create custom metrics
        • Define analytics
        • Windows API
        • SQL queries
      • Transformation API
        • Obfuscation API
        • FieldTokenizer API
      • File processing
      • Data types
        • StreamEvent
        • ReferenceDataObject
        • GeoNode
    • System configuration
      • System properties
  • Deployment strategies
    • Deployment Overview
    • Single Node
    • Cluster
    • GuardianDB
    • Packaging
      • Containers
      • Bare metal
  • Product updates
    • Public Roadmap
    • Release Notes
      • v1.2.0 Join Streams with stateful analytics
      • v1.1.0 Streaming analytics enhancements
      • v1.0.4 Predictive stream processing
      • v1.0.3 Contextual SQL based metrics
    • Change history
Powered by GitBook
On this page
  • Overview
  • Example & DSL attributes
  • Response
  • Attributes schema
  • Geofence Attribute
  • Attributes schema
  • Geo Tracking Info Response

Was this helpful?

  1. Components
  2. Analytics
  3. Analytic tools
  4. Advanced analytics
  5. Geospatial

Entity geo tracker

Real-time entity geo tracking for advanced use cases

PreviousGeospatialNextGeofence occupancy trigger

Last updated 6 months ago

Was this helpful?

Overview

Events with location information, longitude and latitude, can be used for entity based geo tracking. Entities such as mobile phone and GPS enabled devices with unique identifiers can used since they provide the required location attributes for the analytics to function.

This is a stateful based feature, once an entity enters a geofence it is tracked until it has exited. There are three states the entity triggers for further processing.

Key tracking features

  • Entry

  • Dwelling

  • Exit

Tracking information provided as an attribute geoTrackingInfo field within the the processed event, see the section below.

Example & DSL attributes

entity geo tracker:
    name: promotions
    entity key: imsi
    min dwelling time: 2
    timeUnit: MINUTES
    geofences:
      -
        id: 107
        coordinates: ["51.506645","-0.20406286"]
        radius: 150
      -
        id: 106
        coordinates: ["51.503845","-0.2172389"]
        radius: 150
      -
        id: 119
        coordinates: ["51.509743","-0.18553847"]
        radius: 150  

Response

The processor adds a geoTrackingInfo attribute with the following result

geoTrackingInfo:
    geoTrackingInfo:
        GeoTrackingInfo:
            trackingTag=1234567890, 
            currentSpeedAndDirection=Triple{x=0.018464618471082432, y=GeoDirection{description='NorthEast'}, z=58.10799195554135}, 
            previousSpeedAndDirection=Triple{x=0.03388915574387011, y=GeoDirection{description='East'}, z=79.01663649781628}, 
            distanceTraveled=92.32309235541216, 
            previousDistanceTraveled=169.44577871935053, 
            previousLat=51.504119873046875, 
            previousLng=-0.2196580022573471, 
            currentLat=51.50470733642578, 
            currentLng=-0.2187139093875885, 
            geoFenceOccupancyState={106=ENTERED}, 
            previousUpdatedTimestamp=1715617238476, 
            currentUpdatedTimestamp=1715617243476}, 
            latitude=51.50470697, 
            imsi=1234567890, 
            longitude=-0.218713905

Attributes schema

Attribute
Description
Data Type
Required

geofences

List of geofences to trigger entity

See geofence attribute section

entity key

Entity value to track. provide unique key

String

Default: id

geo tracking info

StreamEvent key to place tracking information

String

Default: geoTrackingInfo

latitude field

StreamEvent field holding latitude value

String

Default: latitude

longitude field

StreamEvent field holding longitude value

String

Default: longitude

dwelling time

Minimum dwelling time within a geofence

Long

Default: 15 Seconds

timeUnit

Time unit used to assess dwelling time.

Supported units:

  • SECONDS

  • MINUTES

  • HOURS

TimeUnit

Default: SECONDS

default radius

Geofence radius override to be applied if reference data is missing

Float

Default: 4.0f ( xx feet)

spatial index

An area is set out as a search tree. The default area is a flattened world divided out in to rectangles.

Geofence Attribute

A geofence is a circle defined up a unique Id, its centre point(latitude and longitude coordinates) and radius. One or more geofences are defined as a list.

geofences:
  -
    id: 1000
    coordinates: ["51.4623328","-0.1759467"]
    radius: 150
  -
    id: 2000
    coordinates: ["51.5136287","-0.1137969"]
    radius: 150

Attributes schema

Attribute
Description
Data Type
Required

id

Unique Id for the geofence

Integer

coordinates

Centre latitude and longitute coordinates defined as string to ensure correct resolution

String Array

radius

Radius of geofence in feet

Float

Geo Tracking Info Response

The geoTrackingInfo field, or the one specified by the developer, is added to the processed StreamEvent object on processing completion. A GeoTrackingInfo object is assigned to the field. Below are the attributes held within the object.

Key: geoTrackingInfo 
Value: GeoTrackingInfo
      - trackingTag
      - currentSpeedAndDirection
      - previousSpeedAndDirection
      - distanceTraveled
      - previousDistanceTraveled
      - previousLat
      - previousLng
      - currentLat
      - currentLng
      - geoFenceOccupancyState
      - previousUpdatedTimestamp
      - currentUpdatedTimestamp

See

Geo Tracking Info Response
spatial index documentation