Class BinaryWriter
- java.lang.Object
-
- io.github.sebasbaumh.postgis.binary.BinaryWriter
-
public final class BinaryWriter extends Object
A writer for building a binary or hex string representation of geometries.- Author:
- Sebastian Baumhekel
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static byte[]
writeBinary(Geometry geom)
Write a binary encoded geometry.static String
writeHexed(Geometry geom)
Write a hex encoded geometry.
-
-
-
Method Detail
-
writeBinary
public static byte[] writeBinary(Geometry geom)
Write a binary encoded geometry. The geometry you put in must be consistent, geom.checkConsistency() must return true. If not, the result may be invalid WKB.- Parameters:
geom
- the geometry to be written- Returns:
- byte arrray containing the encoded geometry
- See Also:
the consistency checker
-
writeHexed
public static String writeHexed(Geometry geom)
Write a hex encoded geometry. The geometry you put in must be consistent, geom.checkConsistency() must return true. If not, the result may be invalid WKB.- Parameters:
geom
- the geometry to be written- Returns:
- String containing the hex encoded geometry
- See Also:
the consistency checker
-
-