FGF and WKB

FDO API

 
FGF and WKB
 
 
 

WKB is a memory layout used to store geometry features. This format was created by the OpenGIS organization to allow the efficient exchange of geometry data between different components in an FDO system. Most pieces of the original specification defining the WKB format are in the document, 99-050.pdf, the OpenGIS Simple feature specification for OLE/COM that can be found at www.opengis.org.

FGF is an extended version of the Well Known Binary (WKB) format. The two formats differ in the following ways:

  • WKB defines a byte order of the data in every piece of geometry. This is stored as a byte field, which may change the memory alignment from word to byte. In FGF, only one memory alignment type is supported, which is the same alignment type used by the .NET framework and Windows; the encoding uses the little-endian byte order format. As a result, the byte flag does not need to be stored.
  • WKB is defined as a 2D format only. This is insufficient to represent 3D points, polylines and polygons. In FGF, the dimension flag has been added. In particular, a flag is included for each geometry piece to indicate whether the geometry is 2D, 3D, or even 4D (storing a measure value as used by dynamic segmentation.
  • FGF includes geometry types that are not yet covered by any WKB specification.