public class Wkb extends Object
Note that the WkbDecoder instances returned by the factory
methods are not thread-safe.
| Modifier and Type | Class and Description |
|---|---|
static class |
Wkb.Dialect |
| Constructor and Description |
|---|
Wkb() |
| Modifier and Type | Method and Description |
|---|---|
static Geometry<?> |
fromWkb(ByteBuffer byteBuffer)
Decodes a WKB representation in a
ByteBuffer to a Geometry. |
static Geometry<?> |
fromWkb(ByteBuffer byteBuffer,
Wkb.Dialect dialect)
Decodes a WKB representation in a
ByteBuffer to a Geometry. |
static WkbDecoder |
newDecoder()
Creates a
WkbDecoder for the default WKB Dialect. |
static WkbDecoder |
newDecoder(Wkb.Dialect dialect)
Creates a
WkbDecoder for the specified WKB Dialect. |
static WkbEncoder |
newEncoder()
Creates a
WkbEncoder for the default WKB Dialect. |
static WkbEncoder |
newEncoder(Wkb.Dialect dialect)
Creates a
WkbEncoder for the specified WKB Dialect. |
static ByteBuffer |
toWkb(Geometry<?> geometry,
ByteOrder byteOrder)
Encodes a
Geometry into a WKB representation using the specified byte-order. |
static ByteBuffer |
toWkb(Geometry<?> geometry,
ByteOrder byteOrder,
Wkb.Dialect dialect)
Encodes a
Geometry into a WKB representation using the specified byte-order. |
static <P extends Position> |
toWkb(Geometry<P> geometry)
Encodes a
Geometry into a WKB representation using the NDR (little-endian) byte-order. |
static <P extends Position> |
toWkb(Geometry<P> geometry,
Wkb.Dialect dialect)
Encodes a
Geometry into a WKB representation using the NDR (little-endian) byte-order. |
public static <P extends Position> ByteBuffer toWkb(Geometry<P> geometry)
Geometry into a WKB representation using the NDR (little-endian) byte-order.
This methods uses the default WKB dialect (Postgis v1.5 EWKB ).
geometry - The Geometry to be encoded as WKB.Geometry.public static ByteBuffer toWkb(Geometry<?> geometry, ByteOrder byteOrder, Wkb.Dialect dialect)
Geometry into a WKB representation using the specified byte-order.
This methods uses the default WKB dialect (Postgis v1.5 EWKB ).
public static <P extends Position> ByteBuffer toWkb(Geometry<P> geometry, Wkb.Dialect dialect)
Geometry into a WKB representation using the NDR (little-endian) byte-order.
This methods uses the default WKB dialect (Postgis v1.5 EWKB ).
geometry - The Geometry to be encoded as WKB.dialect - the WKB dialect to useGeometry.public static ByteBuffer toWkb(Geometry<?> geometry, ByteOrder byteOrder)
Geometry into a WKB representation using the specified byte-order.
This methods uses the default WKB dialect (Postgis v1.5 EWKB ).
public static Geometry<?> fromWkb(ByteBuffer byteBuffer)
ByteBuffer to a Geometry.
This methods uses the default WKB dialect (Postgis v1.5 EWKB ).
byteBuffer - A buffer of bytes that contains a WKB-encoded Geometry.Geometry that is encoded in the WKB.public static Geometry<?> fromWkb(ByteBuffer byteBuffer, Wkb.Dialect dialect)
ByteBuffer to a Geometry.
This methods uses the default WKB dialect (Postgis v1.5 EWKB ).
byteBuffer - A buffer of bytes that contains a WKB-encoded Geometry.dialect - the WKB dialect to useGeometry that is encoded in the WKB.public static WkbDecoder newDecoder(Wkb.Dialect dialect)
WkbDecoder for the specified WKB Dialect.dialect - the WKB dialectWkbDecoder that supports the specified dialectpublic static WkbDecoder newDecoder()
WkbDecoder for the default WKB Dialect.WkbDecoder that supports the specified dialectpublic static WkbEncoder newEncoder(Wkb.Dialect dialect)
WkbEncoder for the specified WKB Dialect.dialect - the WKB dialectWkbEncoder that supports the specified dialectpublic static WkbEncoder newEncoder()
WkbEncoder for the default WKB Dialect.WkbEncoder that supports the specified dialectCopyright © 2023 geolatte.org. All rights reserved.