Class BinaryParser

java.lang.Object
io.github.sebasbaumh.postgis.binary.BinaryParser

public final class BinaryParser extends Object
A parser for reading geometries from a binary or hex string representation.
Author:
Sebastian Baumhekel
  • Method Details

    • parse

      public static Geometry parse(byte[] value, int offset)
      Parse a hex encoded geometry
      Parameters:
      value - byte array containing the data to be parsed
      offset - offset
      Returns:
      resulting geometry for the parsed data
      Throws:
      IllegalArgumentException - if a contained geometry is of the wrong type or the encoding type is unknown
    • parse

      public static Geometry parse(String value)
      Parse a hex encoded geometry
      Parameters:
      value - String containing the data to be parsed
      Returns:
      resulting geometry for the parsed data
      Throws:
      IllegalArgumentException - if a contained geometry is of the wrong type or the encoding type is unknown