Class JtsBinaryCodec
- java.lang.Object
-
- org.locationtech.spatial4j.io.BinaryCodec
-
- org.locationtech.spatial4j.io.jts.JtsBinaryCodec
-
public class JtsBinaryCodec extends BinaryCodec
Writes shapes in WKB, if it isn't otherwise supported by the superclass.
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanuseFloat-
Fields inherited from class org.locationtech.spatial4j.io.BinaryCodec
ctx, TYPE_CIRCLE, TYPE_COLL, TYPE_GEOM, TYPE_POINT, TYPE_RECT
-
-
Constructor Summary
Constructors Constructor Description JtsBinaryCodec(JtsSpatialContext ctx, JtsSpatialContextFactory factory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected doublereadDim(DataInput dataInput)ShapereadJtsGeom(DataInput dataInput)protected ShapereadShapeByTypeIfSupported(DataInput dataInput, byte type)protected bytetypeForShape(Shape s)protected voidwriteDim(DataOutput dataOutput, double v)voidwriteJtsGeom(DataOutput dataOutput, Shape s)protected booleanwriteShapeByTypeIfSupported(DataOutput dataOutput, Shape s, byte type)-
Methods inherited from class org.locationtech.spatial4j.io.BinaryCodec
readCircle, readCollection, readPoint, readRect, readShape, writeCircle, writeCollection, writePoint, writeRect, writeShape, writeShapeByTypeIfSupported
-
-
-
-
Constructor Detail
-
JtsBinaryCodec
public JtsBinaryCodec(JtsSpatialContext ctx, JtsSpatialContextFactory factory)
-
-
Method Detail
-
readDim
protected double readDim(DataInput dataInput) throws IOException
- Overrides:
readDimin classBinaryCodec- Throws:
IOException
-
writeDim
protected void writeDim(DataOutput dataOutput, double v) throws IOException
- Overrides:
writeDimin classBinaryCodec- Throws:
IOException
-
typeForShape
protected byte typeForShape(Shape s)
- Overrides:
typeForShapein classBinaryCodec
-
readShapeByTypeIfSupported
protected Shape readShapeByTypeIfSupported(DataInput dataInput, byte type) throws IOException
- Overrides:
readShapeByTypeIfSupportedin classBinaryCodec- Throws:
IOException
-
writeShapeByTypeIfSupported
protected boolean writeShapeByTypeIfSupported(DataOutput dataOutput, Shape s, byte type) throws IOException
- Overrides:
writeShapeByTypeIfSupportedin classBinaryCodec- Throws:
IOException
-
readJtsGeom
public Shape readJtsGeom(DataInput dataInput) throws IOException
- Throws:
IOException
-
writeJtsGeom
public void writeJtsGeom(DataOutput dataOutput, Shape s) throws IOException
- Throws:
IOException
-
-