Class Accessors
java.lang.Object
org.apache.sedona.common.S2Geography.Accessors
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleS2_area(GeographyCollection geographyCollection) static intS2_dimension(Geography geography) booleanS2_isCollection(Geography geog) Returns true if `geog` is a “collection” (i.e.static booleanS2_isCollection(PolygonGeography polygonGeography) static booleanS2_isEmpty(Geography geography) doublestatic intS2_numPoints(Geography geography) doubles2_perimeter(Geography geog) static doublestatic doubleExtract the Y coordinate (latitude in degrees) if this is exactly one point; otherwise returns NaN.static booleans2FindValidationError(GeographyCollection geog, com.google.common.geometry.S2Error error) Runs S2 validation on each member of a GeographyCollection.static booleans2FindValidationError(Geography geog, com.google.common.geometry.S2Error error) Master dispatch for any Geography type: points, lines, polygons, or collections.static booleans2FindValidationError(PolygonGeography geog, com.google.common.geometry.S2Error error) Runs S2 validation on a PolygonGeography.static booleans2FindValidationError(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.
-
Constructor Details
-
Accessors
public Accessors()
-
-
Method Details
-
S2_isEmpty
-
S2_isCollection
-
S2_isCollection
Returns true if `geog` is a “collection” (i.e. multi‐point, multi‐linestring, or multi‐polygon) rather than a single simple feature. -
S2_dimension
-
S2_numPoints
-
S2_area
-
s2_length
-
s2_perimeter
-
s2_X
-
s2_Y
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
-