Class GeometrySerializer
- java.lang.Object
-
- org.apache.pinot.segment.local.utils.GeometrySerializer
-
public final class GeometrySerializer extends Object
Provides methods to efficiently serialize and deserialize geometry types. This serialization is similar to Presto's https://github .com/prestodb/presto/blob/master/presto-geospatial-toolkit/src/main/java/com/facebook/presto/geospatial/serde /JtsGeometrySerde.java, with the following differences: - The geometry vs geography info is encoded in the type byte. - The envelope info is not serialized
-
-
Method Summary
Modifier and Type Method Description static org.locationtech.jts.geom.Geometrydeserialize(byte[] bytes)Deserializes bytes into a geometry objectstatic byte[]serialize(org.locationtech.jts.geom.Geometry geometry)Serializes a geometry object into bytes
-
-
-
Method Detail
-
serialize
public static byte[] serialize(org.locationtech.jts.geom.Geometry geometry)
Serializes a geometry object into bytes- Parameters:
geometry- the geometry object to serialize- Returns:
- the serialized bytes
-
deserialize
public static org.locationtech.jts.geom.Geometry deserialize(byte[] bytes)
Deserializes bytes into a geometry object- Parameters:
bytes- the bytes to deserialize- Returns:
- the deserialized object
-
-