Spatial4j

Primary tabs

Spatial4j is a general purpose spatial / geospatial ASL licensed open-source Java library. Its core capabilities are 3-fold: to provide common geospatially-aware shapes, to provide distance calculations and other math, and to read and write the shapes to strings.

Features

  • Shape classes that are geospatially aware(*)
    • Shapes: Point, Rectangle, Circle, Polygon (via JTS)
    • shape intersection logic, yielding: disjoint, contains, within, intersects
    • bounding box
    • area calculation
  • Distance math
    • Spherical: Law of Cosines, Haversine, Vincenty
  • Input and Output of shapes to strings using WKT
  • Integration with JTS to adapt its shapes to Spatial4j’s interfaces, including adding some geospatial awareness
  • No runtime dependencies unless JTS is needed

In addition, the code is well tested and it’s monitored via Travis-CI continuous integration.

(*) Geospatial awareness, AKA "geodetic" means it is aware of the implications of the international dateline and poles. It can’t pretend the earth is flat and infinitely large.

Latest Releases: 

From to February 20th, 2016

NameDateReview
0.6 Current2016-02-20Review
Contribution Activity: 
Commits on this project (last 12 months).