Class PostGISEWKBParser

java.lang.Object
org.gvsig.fmap.geom.jts.operation.fromwkb.PostGISEWKBParser

public class PostGISEWKBParser extends Object
Parse binary representation of geometries. Currently, only text rep (hexed) implementation is tested. It should be easy to add char[] and CharSequence ByteGetter instances, although the latter one is not compatible with older jdks. I did not implement real unsigned 32-bit integers or emulate them with long, as both java Arrays and Strings currently can have only 2^31-1 elements (bytes), so we cannot even get or build Geometries with more than approx. 2^28 coordinates (8 bytes each).
Author:
markus.schaber@logi-track.com https://github.com/postgis/postgis-java/blob/master/jdbc/src/main/java/org/postgis/binary/BinaryWriter.java
  • Constructor Details

    • PostGISEWKBParser

      public PostGISEWKBParser()
  • Method Details

    • parse

      public org.gvsig.fmap.geom.Geometry parse(byte[] value) throws org.gvsig.fmap.geom.exception.CreateGeometryException
      Parse a binary encoded geometry. Is synchronized to protect offset counter. (Unfortunately, Java does not have neither call by reference nor multiple return values.)
      Parameters:
      value -
      Returns:
      Throws:
      org.gvsig.fmap.geom.exception.CreateGeometryException
    • parseGeometry

      protected org.gvsig.fmap.geom.Geometry parseGeometry(ByteBuffer data) throws org.gvsig.fmap.geom.exception.CreateGeometryException
      Parse a geometry starting at offset.
      Parameters:
      data -
      Returns:
      Throws:
      org.gvsig.fmap.geom.exception.CreateGeometryException
    • parseTypeAndSRID

      protected int parseTypeAndSRID(ByteBuffer data)