Understand the core capabilities of Spatial4j
masterSpatial4j is a general-purpose geospatial Java library designed for three primary tasks:
- Shape Modeling: Provides common shapes (Point, Rectangle, Circle, LineString, Polygon, etc.) that work in both Euclidean (flat 2D) and geodesic (surface-of-a-sphere) world models.
- Spatial Math: Provides distance calculations (including great-circle distances) and other geometric math.
- Data I/O: Reads and writes shapes using formats like WKT (Well-Known Text), GeoJSON, and Polyshape.
It is particularly useful when working with spatial grid-square indexing schemes like Geohash.