Class S2TaggedShapeCoder
java.lang.Object
com.google.common.geometry.S2TaggedShapeCoder
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classA builder for creatingS2TaggedShapeCoderinstances. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final S2TaggedShapeCoderAn instance of aS2TaggedShapeCoderwhich encodes/decodesS2Shapes in the COMPACT encoding format.static final S2TaggedShapeCoderAn instance of aS2TaggedShapeCoderwhich encodes/decodesS2Shapes in the FAST encoding format. -
Method Summary
Modifier and TypeMethodDescriptionstatic S2TaggedShapeCoder.Builderbuilder()Returns a newS2TaggedShapeCoder.Builder.decode(PrimitiveArrays.Bytes data, PrimitiveArrays.Cursor cursor) voidencode(S2Shape value, OutputStream output) Encodesvaluetooutput.Returns a newS2TaggedShapeCoder.Builderinitialized with the currentS2TaggedShapeCoder.
-
Field Details
-
FAST
An instance of aS2TaggedShapeCoderwhich encodes/decodesS2Shapes in the FAST encoding format. The FAST format is optimized for fast encoding/decoding. -
COMPACT
An instance of aS2TaggedShapeCoderwhich encodes/decodesS2Shapes in the COMPACT encoding format. The COMPACT format is optimized for disk usage and memory footprint.
-
-
Method Details
-
encode
Description copied from interface:S2CoderEncodesvaluetooutput.- Specified by:
encodein interfaceS2Coder<S2Shape>- Throws:
IOException
-
decode
-
builder
Returns a newS2TaggedShapeCoder.Builder. -
toBuilder
Returns a newS2TaggedShapeCoder.Builderinitialized with the currentS2TaggedShapeCoder.
-