Class BinaryWriter
java.lang.Object
io.github.sebasbaumh.postgis.binary.BinaryWriter
A writer for building a binary or hex string representation of geometries.
- Author:
- Sebastian Baumhekel
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
writeBinary
(Geometry geom) Write a binary encoded geometry.static String
writeHexed
(Geometry geom) Write a hex encoded geometry.
-
Method Details
-
writeBinary
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:
-
writeHexed
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:
-