public class

WKBGeometryWriter

extends Object
java.lang.Object
   ↳ com.carto.geometry.WKBGeometryWriter

Class Overview

A WKB writer. Generates binary version of the Well Known Text (WKT) representation of the geometry.
Supports both 2D and 3D coordinate serialization and big- and little-endian representations.

Summary

Public Constructors
WKBGeometryWriter()
Constructs a new WKBGeometryWriter objects with default settings.
Public Methods
synchronized void delete()
boolean getBigEndian()
Returns the endianness of output format.
boolean getZ()
Returns the state of Z coordinate serialization.
void setBigEndian(boolean bigEndian)
Sets the endianness of output format.
void setZ(boolean z)
Sets the state of Z coordinate serialization.
BinaryData writeGeometry(Geometry geometry)
Creates a WKB data corresponding to the specified geometry.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public WKBGeometryWriter ()

Constructs a new WKBGeometryWriter objects with default settings.

Public Methods

public synchronized void delete ()

public boolean getBigEndian ()

Returns the endianness of output format.

Returns
  • True when big-endian representation is used, false if little-endian. The default is little-endian.

public boolean getZ ()

Returns the state of Z coordinate serialization.

Returns
  • True if Z coordinate is stored in WKB output, false otherwise. The default is false.

public void setBigEndian (boolean bigEndian)

Sets the endianness of output format.

Parameters
bigEndian True if big-endian representation should be used, false if little-endian.

public void setZ (boolean z)

Sets the state of Z coordinate serialization.

Parameters
z True when Z coordinate should be serialized, false otherwise.

public BinaryData writeGeometry (Geometry geometry)

Creates a WKB data corresponding to the specified geometry.

Parameters
geometry The geometry to write.
Returns
  • The corresponding WKB data.
Throws
Exception If writing fails.