Class ShapeIndexGeography
java.lang.Object
org.apache.sedona.common.S2Geography.Geography
org.apache.sedona.common.S2Geography.ShapeIndexGeography
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sedona.common.S2Geography.Geography
Geography.GeographyKind -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionBuild an empty ShapeIndexGeography.ShapeIndexGeography(int maxEdgesPerCell) Create a ShapeIndexGeography with a custom max-edges-per-cell.ShapeIndexGeography(Geography geog) Build and immediately add one Geography. -
Method Summary
Modifier and TypeMethodDescriptionvoidIndex every S2Shape from the given Geography.static ShapeIndexGeographyThis is what decodeTagged() actually callsintvoidencode(com.esotericsoftware.kryo.io.UnsafeOutput out, EncodeOptions opts) intcom.google.common.geometry.S2Regionregion()Returns an S2Region that represents the object.com.google.common.geometry.S2Shapeshape(int id) Returns the given S2Shape (where 0 <= id < num_shapes()).Methods inherited from class org.apache.sedona.common.S2Geography.Geography
computeDimensionFromShapes, decodeTagged, encodeTagged, getCellUnionBound, getKind, getSRID, setSRID, toEWKT, toEWKT, toString, toString, toText
-
Field Details
-
shapeIndex
public com.google.common.geometry.S2ShapeIndex shapeIndex
-
-
Constructor Details
-
ShapeIndexGeography
public ShapeIndexGeography()Build an empty ShapeIndexGeography. -
ShapeIndexGeography
Build and immediately add one Geography. -
ShapeIndexGeography
public ShapeIndexGeography(int maxEdgesPerCell) Create a ShapeIndexGeography with a custom max-edges-per-cell.
-
-
Method Details
-
dimension
public int dimension() -
numShapes
public int numShapes() -
shape
public com.google.common.geometry.S2Shape shape(int id) Description copied from class:GeographyReturns the given S2Shape (where 0 <= id < num_shapes()). The caller retains ownership of the S2Shape but the data pointed to by the object requires that the underlying Geography outlives the returned object. -
region
public com.google.common.geometry.S2Region region()Description copied from class:GeographyReturns an S2Region that represents the object. The caller retains ownership of the S2Region but the data pointed to by the object requires that the underlying Geography outlives the returned object. -
addIndex
Index every S2Shape from the given Geography. -
encode
public void encode(com.esotericsoftware.kryo.io.UnsafeOutput out, EncodeOptions opts) throws IOException - Specified by:
encodein classGeography- Throws:
IOException
-
decode
public static ShapeIndexGeography decode(com.esotericsoftware.kryo.io.UnsafeInput in, EncodeTag tag) throws IOException This is what decodeTagged() actually calls- Throws:
IOException
-