spatial4j
spatial4j copied to clipboard
Implementing a Geodesic Polygon
The goal of this project is to model a polygon that lies on the surface of a sphere, defined by a set of points in lat/long, where the line between each pair is the great circle distance (shortest distance between two points on the surface).
Specific Requirements Representation:
- The polygon will be represented internally in geocentric coordinates and direction cosines for fast computation.
- The polygon will provide both a lat/lon (2D) and 3D interface
- Extends from a Spatial4J shape
Modeling:
- Determine if an arbitrary point p on the surface of the sphere is within or outside the bounds of the polygon
- Given a rectangle, determine the spatial relationship between the polygon adn that rectangle. Is it contained, within, disjoint, or intersecting
Is there any progress on this feature? I for one am in need of this.
Spatial4j will soon be adding support for Lucene's "Geo3d" (spatial-3d module) which supports polygons on the surface of either a sphere or WGS84 ellipsoid (or other ellipsoid of configurable dimensions). We're in the middle of a release right now that has some major refactorings to decouple more of JTS, and then we can build a Spatial4j "ShapeFactory" (& SpatialContext w/ factory) that uses Geo3d. So that's fairly soon.