module LavinMQ::AMQP::GISFilter

Overview

GIS filtering module for geographical data in stream queues. Provides spatial operations for filtering messages based on coordinates.

Defined in:

lavinmq/amqp/stream/filters/gis.cr

Constant Summary

EARTH_RADIUS_KM = 6371.0

Class Method Summary

Class Method Detail

def self.parse_bbox_filter(value : AMQ::Protocol::Table) : BoundingBoxFilter #

Parse bounding box filter from consumer arguments Expected format: {"min_lat": Float64, "max_lat": Float64, "min_lon": Float64, "max_lon": Float64}


[View source]
def self.parse_polygon_filter(value : AMQ::Protocol::Table) : PolygonFilter #

Parse polygon filter from consumer arguments Expected format: {"points": [[lat1, lon1], [lat2, lon2], ...]}


[View source]
def self.parse_radius_filter(value : AMQ::Protocol::Table) : RadiusFilter #

Parse radius filter from consumer arguments Expected format: {"lat": Float64, "lon": Float64, "radius_km": Float64}


[View source]
def self.to_float64(value : AMQ::Protocol::Field) : Float64 #

Helper to convert numeric AMQ::Protocol::Field to Float64


[View source]