Class GeographyCollection
java.lang.Object
org.apache.sedona.common.S2Geography.Geography
org.apache.sedona.common.S2Geography.GeographyCollection
- Direct Known Subclasses:
MultiPolygonGeography
A Geography wrapping zero or more Geography objects, representing a GEOMETRYCOLLECTION.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sedona.common.S2Geography.Geography
Geography.GeographyKind -
Field Summary
FieldsModifier and TypeFieldDescriptionint -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an empty GeographyCollection.GeographyCollection(List<Geography> features) Wraps existing Geography features.GeographyCollection(Geography.GeographyKind kind, List<com.google.common.geometry.S2Polygon> polygons) -
Method Summary
Modifier and TypeMethodDescriptionstatic GeographyCollectionDecodes a GeographyCollection from a tagged input stream.intvoidencode(com.esotericsoftware.kryo.io.UnsafeOutput out, EncodeOptions opts) Returns an immutable copy of the features list.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
-
features
-
numShapesList
-
totalShapes
public int totalShapes
-
-
Constructor Details
-
GeographyCollection
public GeographyCollection()Constructs an empty GeographyCollection. -
GeographyCollection
public GeographyCollection(Geography.GeographyKind kind, List<com.google.common.geometry.S2Polygon> polygons) -
GeographyCollection
Wraps existing Geography features.
-
-
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. -
getFeatures
Returns an immutable copy of the features list. -
encode
public void encode(com.esotericsoftware.kryo.io.UnsafeOutput out, EncodeOptions opts) throws IOException - Specified by:
encodein classGeography- Throws:
IOException
-
decode
public static GeographyCollection decode(com.esotericsoftware.kryo.io.UnsafeInput in, EncodeTag tag) throws IOException Decodes a GeographyCollection from a tagged input stream.- Throws:
IOException
-