GEOS: geos::WKBWriter Class Reference

- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# geos::WKBWriter Class Reference

Writes a Geometry into Well-Known Binary format. More...

`#include <geos.h>`

List of all members.

## Public Member Functions
void | write (const Geometry &g, ostream &os)
| Write a Geometry to an ostream.

## Detailed Description

Writes a Geometry into Well-Known Binary format.

The WKB format is specified in the OGC Simple Features for SQL specification. This implementation supports the extended WKB standard for representing 3-dimensional coordinates. The presence of 3D coordinates is signified by setting the high bit of the wkbType word.

Empty Points cannot be represented in WKB; an IllegalArgumentException will be thrown if one is written. The WKB specification does not support representing LinearRing they will be written as LineString

This class is designed to support reuse of a single instance to read multiple geometries. This class is not thread-safe; each thread should create its own instance.

See also:
  WKBReader

## Member Function Documentation

void geos::WKBWriter::write | ( | const Geometry & | g,
|  | ostream & | os |
| ) |  |  |

Write a Geometry to an ostream.

Parameters:

  | g | the geometry to write
  | os | the output stream

Exceptions:

  | IOException |

The documentation for this class was generated from the following files:

- io.h
- WKBWriter.cpp