Skip to content

[GH-1996] Implement S2Geography support on Apache Sedona #1996

@ZhuochengShang

Description

@ZhuochengShang

PR links

  1. Point, PolyLine, Polygon implementation [GH-1996] Create object of S2Geography, and implement Point/Polyline/PolygonGeography with its encoder/decoder #1992

(This version of implementation is a mimic of original C++ from https://github.com/paleolimbot/s2geography, future optimization may be required)
The S2Geography framework provides a unified API for handling spherical geometries—points, polylines, polygons and multipolygons—by defining an abstract base class, S2Geography, and six concrete subclasses:

  • PointGeography
  • PolylineGeography
  • PolygonGeography
  • GeographyCollection
  • ShapeIndexGeography
  • EncodedShapeIndexGeography

Each subclass implements a consistent set of core operations:

  • dimension()
  • numShapes()
  • shape(int index)
  • region()
  • encoding and decoding via its dedicated encoder/decoder

On top of these primitives, S2Geography supports:

  • Construction of any geography type
  • Reading/Writing from and to WKT and WKB formats
  • Indexing for all S2geography objects
  • Projections between coordinate systems
  • Spatial operations such as: 1) distance computation, 2) equality testing, 3) intersection checks, 4) containment tests, and 5) within-predicate evaluations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions