I'm looking for a Java library that is capable of performing spatial calculations on sets of lat/lon data. Here are some of the functions that I'm looking for:
- Calculate the Great Circle distance between two points
- Determine if a point lies within a simple closed polygon, where the polygon is defined by an ordered list of points
- Determine if the line between point "A" and point "B" intersects a simple closed polygon, where the polygon is defined by an ordered list of points
- Determine if point "A" is within a certain radius of point "B"
What I'm NOT looking for:
- I don't want a library that is dependent upon a database geospatial component, such as Oracle Spatial, and cannot function independently.
- I don't want a library whose purpose is to generate graphics/maps/etc. I am building an analysis module for an existing application and the end goal is not to create pretty pictures.
- I don't want a library for searching large amounts of spatial data. If it also happens to do this, that's ok, but I'm not going to use that feature.
The organization is planning to acquire a license for Oracle Spatial eventually (so spatial searching will be covered at that point), but for now I need to implement the analysis functions that I have mentioned above on small data sets without relying on database-supplied spatial support.