spatial4j icon indicating copy to clipboard operation
spatial4j copied to clipboard

Implementing a Geodesic Polygon

Open rfalford12 opened this issue 11 years ago • 2 comments
trafficstars

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

rfalford12 avatar Feb 17 '14 21:02 rfalford12

Is there any progress on this feature? I for one am in need of this.

henbjo avatar Feb 01 '16 18:02 henbjo

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.

dsmiley avatar Feb 02 '16 14:02 dsmiley