Skip to main content
Build location-based analytics with geospatial support powered by Apache Pinot’s spatial indexing capabilities. Query geographic data at scale with sub-second performance using H3 hexagonal indexing.

What is GeoSpatial Support?

GeoSpatial support enables you to:
  • Store and query location data efficiently using industry-standard formats
  • Perform spatial operations like distance calculations, containment checks, and area measurements
  • Accelerate spatial queries using H3 hexagonal indexing for sub-second performance
  • Analyze spatiotemporal data by combining location and time-series queries

Key Capabilities

GeoSpatial Data Types

  • Geometry: For Cartesian plane calculations (meters, feet, etc.)
  • Geography: For spherical Earth calculations (longitude/latitude)
  • Format Support: WKT (Well-Known Text), WKB (Well-Known Binary), and GeoJSON

Spatial Operations

  • Distance calculations (ST_Distance)
  • Containment relationships (ST_Within, ST_Contains)
  • Area and measurement functions (ST_Area)
  • Geometric constructors and converters

H3 Hexagonal Indexing

  • Hierarchical hexagonal grid system
  • Multiple resolution levels for different precision needs
  • Dramatically improves query performance
  • Industry-standard spatial indexing approach

Sample Query

Here’s a simple example of a geospatial query to find nearby stores:
SELECT store_name, address, 
       ST_Distance(location, ST_Point(-122.4194, 37.7749)) as distance_meters
FROM stores 
WHERE ST_Distance(location, ST_Point(-122.4194, 37.7749)) < 5000
ORDER BY distance_meters
LIMIT 10;
This query finds all stores within 5km of San Francisco city center, using the H3 index for fast filtering.

Common Use Cases

Location-Based Services

  • Find nearby restaurants, stores, or services
  • Delivery radius calculations
  • Service area analysis

Fleet & Asset Tracking

  • Vehicle location monitoring
  • Route optimization
  • Geofencing alerts

Real Estate & Urban Planning

  • Property search by location
  • Market analysis by geographic region
  • Demographic studies

IoT & Sensor Data

  • Environmental monitoring by location
  • Smart city analytics
  • Weather and climate analysis

Performance Benefits

With proper geospatial indexing, you can expect:
  • 10-100x faster spatial queries compared to non-indexed queries
  • Sub-second response times for complex spatial operations on large datasets
  • Scalable performance across distributed Pinot clusters
  • Efficient memory usage through H3’s hierarchical structure

Explore GeoSpatial Documentation

Data Types & Formats

Learn about geometry vs geography types, WKT, WKB, and GeoJSON format support

Functions Reference

Complete catalog of geospatial functions including constructors, measurements, and relationships

Index Configuration

H3 index setup, resolution selection, and performance configuration

Performance & Optimization

Query optimization, performance tuning, and best practices

Examples & Use Cases

Real-world examples, common patterns, and complete implementations