Class MultiPolygonGeography
java.lang.Object
org.apache.sedona.common.S2Geography.Geography
org.apache.sedona.common.S2Geography.GeographyCollection
org.apache.sedona.common.S2Geography.MultiPolygonGeography
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.sedona.common.S2Geography.Geography
Geography.GeographyKind -
Field Summary
Fields inherited from class org.apache.sedona.common.S2Geography.GeographyCollection
features, numShapesList, totalShapes -
Constructor Summary
ConstructorsConstructorDescriptionMultiPolygonGeography(Geography.GeographyKind kind, List<com.google.common.geometry.S2Polygon> polygons) Wrap each raw S2Polygon in a PolygonGeography, then hand it off to GeographyCollection to do the rest (including serialization). -
Method Summary
Modifier and TypeMethodDescriptionstatic MultiPolygonGeographyThis is what decodeTagged() actually callsstatic MultiPolygonGeographyDecodes a GeographyCollection from a tagged input stream.intvoidencode(com.esotericsoftware.kryo.io.UnsafeOutput out, EncodeOptions opts) Returns an immutable copy of the features list.Methods inherited from class org.apache.sedona.common.S2Geography.GeographyCollection
numShapes, region, shapeMethods inherited from class org.apache.sedona.common.S2Geography.Geography
computeDimensionFromShapes, decodeTagged, encodeTagged, getCellUnionBound, getKind, getSRID, setSRID, toEWKT, toEWKT, toString, toString, toText
-
Constructor Details
-
MultiPolygonGeography
public MultiPolygonGeography(Geography.GeographyKind kind, List<com.google.common.geometry.S2Polygon> polygons) Wrap each raw S2Polygon in a PolygonGeography, then hand it off to GeographyCollection to do the rest (including serialization). -
MultiPolygonGeography
public MultiPolygonGeography()
-
-
Method Details
-
getFeatures
Description copied from class:GeographyCollectionReturns an immutable copy of the features list.- Overrides:
getFeaturesin classGeographyCollection
-
dimension
public int dimension()- Overrides:
dimensionin classGeographyCollection- Returns:
- 0, 1, or 2 if all Shape()s that are returned will have the same dimension (i.e., they are all points, all lines, or all polygons).
-
encode
public void encode(com.esotericsoftware.kryo.io.UnsafeOutput out, EncodeOptions opts) throws IOException - Overrides:
encodein classGeographyCollection- Throws:
IOException
-
decode
public static MultiPolygonGeography decode(com.esotericsoftware.kryo.io.Input in, EncodeTag tag) throws IOException This is what decodeTagged() actually calls- Throws:
IOException
-
decode
public static MultiPolygonGeography decode(com.esotericsoftware.kryo.io.UnsafeInput in, EncodeTag tag) throws IOException, EOFException Decodes a GeographyCollection from a tagged input stream.- Throws:
IOExceptionEOFException
-