Home    |    Concepts   |   API   |   Samples
Concepts > Geometry > Representations of Geometry
Binary

The well-known binary representation for OGC geometry (WKBGeometry), provides a portable representation of a geometry value as a contiguous stream of bytes. It permits geometry values to be exchanged between an ODBC client and an SQL database in binary form.

Functions are provided in the SQL, JAVA, and C-API to import and export the well-known binary representation of geometry.

The well-known binary representation of geometry defines an encoding for 2D simple feature geometry as defined by the OpenGIS Simple Features Specification for SQL, and ISO 19125. This encoding does not support elevations, measures, CAD, or annotation.

The well-known binary representation is a contiguous stream of bytes. It permits geometry to be exchanged between an ODBC client and an SQL database in binary form. Because these geometry functions require the definition of C structures to map the binary representation, they are intended for use within a 3GL program and are not suited to a 4GL environment.

The well-known binary representation for geometry is obtained by serializing a geometry instance as a sequence of numeric types drawn from the set {Unsigned Integer, Double} and then serializing each numeric type as a sequence of bytes using one of two well-defined, standard binary representations for numeric types (NDR, XDR). The specific binary encoding used for a geometry byte stream is described by a one-byte tag that precedes the serialized bytes. The only difference between the two encodings of geometry is byte order. The XDR encoding is big-endian, while the NDR encoding is little-endian.

Top

Top

Top

Top

feedback | privacy | legal