# Package org.apache.lucene.geo

package org.apache.lucene.geo
Core geo-spatial types and utilities for handling geographical data and spatial operations in Lucene.

## Overview

This package provides classes for representing, indexing, and querying geographical data in Lucene. It uses the WGS84 coordinate system with latitude/longitude pairs to represent points on Earth.

## Core Concepts

- Coordinate System: WGS84 (World Geodetic System 1984)
  - Latitude: -90° to +90° (negative for South, positive for North)
  - Longitude: -180° to +180° (negative for West, positive for East)
- Distance calculations use haversine formula on a spherical Earth model
- Areas near poles and the dateline receive special handling

## Key Components

- `Point`: Represents a point on Earth's surface
- `Rectangle`: Defines a bounding box for spatial queries
- `Circle`: Represents a circular area with a center point and radius
- `Polygon`: Represents an arbitrary polygon shape
- `Line`: Represents a path or line string

## Common Operations

- Distance calculations between points
- Point-in-polygon testing
- Rectangle containment and intersection
- Creation of bounding boxes
- Polygon validation and preprocessing

## Usage Examples

     Rectangle bbox = Rectangle.fromPointDistance(51.5, -0.12, 5000); // 5km around London
     Circle circle = new Circle(48.8566, 2.3522, 1000); // 1km around Paris

- Class
  Description
  Circle
  Represents a circle on the Earth's surface defined by a center point and radius.
  Component2D
  2D Geometry object that supports spatial relationships with bounding boxes, triangles and points.
  Component2D.WithinRelation
  Used by withinTriangle to check the within relationship between a triangle and the query shape (e.g.
  GeoEncodingUtils
  reusable geopoint encoding methods
  GeoEncodingUtils.Component2DPredicate
  A predicate that checks whether a given point is within a component2D geometry.
  GeoEncodingUtils.DistancePredicate
  A predicate that checks whether a given point is within a distance of another point.
  Geometry
  Base class for `LatLonGeometry` and `XYGeometry`
  GeoUtils
  Utility methods for geo-spatial calculations and coordinate validation.
  GeoUtils.WindingOrder
  used to define the orientation of 3 points -1 = Clockwise 0 = Colinear 1 = Counter-clockwise
  LatLonGeometry
  Lat/Lon Geometry object.
  Line
  Represents a line on the earth's surface.
  Point
  Represents a point on the earth's surface.
  Polygon
  Represents a closed polygon on the earth's surface.
  Rectangle
  Represents a rectangular bounding box on Earth's surface.
  SimpleWKTShapeParser
  Parses shape geometry represented in WKT format
  SimpleWKTShapeParser.ShapeType
  Enumerated type for Shapes
  Tessellator
  Computes a triangular mesh tessellation for a given polygon.
  Tessellator.Monitor
  Implementation of this interface will receive calls with internal data at each step of the triangulation algorithm.
  Tessellator.Triangle
  Triangle in the tessellated mesh
  XYCircle
  Represents a circle on the XY plane.
  XYEncodingUtils
  reusable cartesian geometry encoding methods
  XYGeometry
  Cartesian Geometry object.
  XYLine
  Represents a line in cartesian space.
  XYPoint
  Represents a point on the earth's surface.
  XYPolygon
  Represents a polygon in cartesian space.
  XYRectangle
  Represents a x/y cartesian rectangle.