Overview
The Geo module enables location-based queries in GenosDB using two powerful operators:- $near: Find nodes within a radius of a point
- $bbox: Find nodes within a rectangular bounding box
Enabling the Module
Coordinate Formats
The module supports flexible coordinate storage:Flat Structure
Nested Structure
$near Operator
Find nodes within a specified radius (in kilometers) of a point.Basic Syntax
Examples
Find Nearby Landmarks
Proximity Search
$bbox Operator
Find nodes within a rectangular bounding box defined by min/max latitude and longitude.Basic Syntax
Examples
Filter by Area
Map Viewport Query
Combining Operators
Geo + Type Filter
Geo + Multiple Conditions
Real-Time Geo Queries
Live Location Tracking
Dynamic User Location
Use Cases
Store Locator
Find nearest stores or branches
Delivery Tracking
Monitor deliveries in real-time
Social Check-ins
See friends nearby
Map Applications
Display POIs in viewport
Ride Sharing
Match drivers and passengers
Real Estate
Browse properties by area
Distance Calculation
The module uses the Haversine formula for accurate distance calculation:- Accounts for Earth’s curvature
- Accurate for short and medium distances
- Returns distances in kilometers
Performance Tips
Live Example
Geolocation with GenosDB Interactive demo showing geo queries in action.Related Operators
- Comparison Operators - Combine with geo queries
- Logical Operators - Complex geo conditions