com.mapinfo.midev.persistence.wkb

## Class WKBUtilities

- java.lang.Object
- - com.mapinfo.midev.persistence.wkb.WKBUtilities

    public final class WKBUtilities
    extends Object

A class used to create and parse OGC's "Well Known binary (WKB)" representation of geometry.

     Example:
     A WKB value that corresponds to POINT(1 1) consists of this sequence of 21 bytes (each represented here by two hex digits):
                    0101000000000000000000F03F000000000000F03F
     The sequence may be broken down into these components:
                    Byte order : 01
                    WKB type   : 01000000
                    X          : 000000000000F03F
                    Y          : 000000000000F03F

     Basic Type definitions:
                    byte : 1 byte
                    uint32 : 32 bit unsigned integer  (4 bytes)
                    double : double precision number (8 bytes)

     Version: OGC Simple Features SQL Specification v1.1.0

See Also:
  OpenGIS Simple Features Specification

### Method Summary

All Methods Static Methods Concrete Methods Deprecated Methods
`static IFeatureGeometry` `fromWKB(SpatialInfo spatialInfo, byte[] data)` Parse a WKB geometry representation into a geometry object.
`static IFeatureGeometry` `fromWKB(SpatialInfo spatialInfo, ByteBuffer buf)`
`static byte[]` `toWKB(IFeatureGeometry featureGeometry)` Deprecated.
`static byte[]` `toWKB(IFeatureGeometry featureGeometry, ByteOrder byteOrder)` Deprecated.
`static byte[]` `toWKB(IGeometry geometry)` Get a WKB representation of the specified geometry with `ByteOrder.LITTLE_ENDIAN`.
`static byte[]` `toWKB(IGeometry geometry, ByteOrder byteOrder)` Deprecated.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### fromWKB

    public static IFeatureGeometry fromWKB(SpatialInfo spatialInfo,
                                           byte[] data)

Parse a WKB geometry representation into a geometry object.

Parameters:
  `spatialInfo` - The coordinate system for the geometry.
  `data` - The WKB blob.

#### fromWKB

    public static IFeatureGeometry fromWKB(SpatialInfo spatialInfo,
                                           ByteBuffer buf)

#### toWKB

    @Deprecated
    public static byte[] toWKB(IFeatureGeometry featureGeometry)

Deprecated.
Get a WKB representation of the specified geometry with `ByteOrder.LITTLE_ENDIAN`.

#### toWKB

    @Deprecated
    public static byte[] toWKB(IFeatureGeometry featureGeometry,
                                            ByteOrder byteOrder)

Deprecated.
Get a WKB representation of the specified geometry in a specific byte order.

Parameters:
  `byteOrder` - The byte order for the WKB blob.

#### toWKB

    public static byte[] toWKB(IGeometry geometry)

Get a WKB representation of the specified geometry with `ByteOrder.LITTLE_ENDIAN`.

#### toWKB

    @Deprecated
    public static byte[] toWKB(IGeometry geometry,
                                            ByteOrder byteOrder)

Deprecated.
Get a WKB representation of the specified geometry in a specific byte order.

Parameters:
  `byteOrder` - The byte order for the WKB blob.