Class Accessors

java.lang.Object
org.apache.sedona.common.S2Geography.Accessors

public class Accessors extends Object
  • Constructor Details

    • Accessors

      public Accessors()
  • Method Details

    • S2_isEmpty

      public static boolean S2_isEmpty(Geography geography)
    • S2_isCollection

      public static boolean S2_isCollection(PolygonGeography polygonGeography)
    • S2_isCollection

      public boolean S2_isCollection(Geography geog)
      Returns true if `geog` is a “collection” (i.e. multi‐point, multi‐linestring, or multi‐polygon) rather than a single simple feature.
    • S2_dimension

      public static int S2_dimension(Geography geography)
    • S2_numPoints

      public static int S2_numPoints(Geography geography)
    • S2_area

      public double S2_area(GeographyCollection geographyCollection)
    • s2_length

      public double s2_length(Geography geog)
    • s2_perimeter

      public double s2_perimeter(Geography geog)
    • s2_X

      public static double s2_X(Geography geog)
    • s2_Y

      public static double s2_Y(Geography geog)
      Extract the Y coordinate (latitude in degrees) if this is exactly one point; otherwise returns NaN.
    • s2FindValidationError

      public static boolean s2FindValidationError(PolylineGeography geog, com.google.common.geometry.S2Error error)
      Runs S2 validation on a PolylineGeography, writing into the provided S2Error and returning true if an error was found.
    • s2FindValidationError

      public static boolean s2FindValidationError(PolygonGeography geog, com.google.common.geometry.S2Error error)
      Runs S2 validation on a PolygonGeography.
    • s2FindValidationError

      public static boolean s2FindValidationError(GeographyCollection geog, com.google.common.geometry.S2Error error)
      Runs S2 validation on each member of a GeographyCollection.
    • s2FindValidationError

      public static boolean s2FindValidationError(Geography geog, com.google.common.geometry.S2Error error)
      Master dispatch for any Geography type: points, lines, polygons, or collections. Follows your C++ logic: 0-dim → always OK 1-dim → polyline path 2-dim → polygon path else → treat as collection of polygons