Class BinaryWriter


  • public final class BinaryWriter
    extends Object
    A writer for building a binary or hex string representation of geometries.
    Author:
    Sebastian Baumhekel
    • 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