An utility class for writing a PostGIS EWKB. More...
#include <EWKBWriter.h>
  
Public Member Functions | |
| EWKBWriter (char *ewkb, te::common::MachineByteOrder byteOrder=te::common::NDR) | |
| It constructs a new EWKB writer.  More... | |
| void | reset (char *ewkb, te::common::MachineByteOrder byteOrder=te::common::NDR) | 
| It resets the EWKB writer an allows a new geometry to be seriealized to a new buffer.  More... | |
| void | write (const te::gm::Geometry *geom) | 
| It serializes the geometry to an EWKB representation into the specified buffer.  More... | |
| ~EWKBWriter () | |
| Destructor.  More... | |
Static Public Member Functions | |
| static void | write (const te::gm::Geometry *geom, char *ewkb, te::common::MachineByteOrder byteOrder=te::common::NDR) | 
| It serializes the geometry to an EWKB representation into the specified buffer.  More... | |
Protected Member Functions | |
| void | visit (const te::gm::CircularString &) | 
| void | visit (const te::gm::CompoundCurve &) | 
| void | visit (const te::gm::Curve &) | 
| void | visit (const te::gm::CurvePolygon &) | 
| void | visit (const te::gm::Geometry &) | 
| void | visit (const te::gm::GeometryCollection &visited) | 
| void | visit (const te::gm::LinearRing &visited) | 
| void | visit (const te::gm::LineString &visited) | 
| void | visit (const te::gm::MultiCurve &) | 
| void | visit (const te::gm::MultiLineString &visited) | 
| void | visit (const te::gm::MultiPoint &visited) | 
| void | visit (const te::gm::MultiPolygon &visited) | 
| void | visit (const te::gm::MultiSurface &) | 
| void | visit (const te::gm::Point &visited) | 
| void | visit (const te::gm::Polygon &visited) | 
| void | visit (const te::gm::PolyhedralSurface &) | 
| void | visit (const te::gm::Surface &) | 
| void | visit (const te::gm::TIN &) | 
| void | visit (const te::gm::Triangle &) | 
Private Attributes | |
| te::common::MachineByteOrder | m_byteOrder | 
| The byte order used to encode the EWKB.  More... | |
| char * | m_ewkb | 
| A pointer that marks the current position in a buffer to be write when parsing the geometry.  More... | |
| bool | m_outputSRID | 
| If true we add a bit indicating that the srid will be outputed with the gometry.  More... | |
An utility class for writing a PostGIS EWKB.
Definition at line 48 of file EWKBWriter.h.
| te::pgis::EWKBWriter::EWKBWriter | ( | char * | ewkb, | 
| te::common::MachineByteOrder | byteOrder = te::common::NDR  | 
        ||
| ) | 
It constructs a new EWKB writer.
| ewkb | A pointer to a buffer to output the ewkb. It must have at least the size in bytes necessary to write the EWKB. | 
| byteOrder | The byte order to be used to encode the WKB. | 
| te::pgis::EWKBWriter::~EWKBWriter | ( | ) | 
Destructor.
| void te::pgis::EWKBWriter::reset | ( | char * | ewkb, | 
| te::common::MachineByteOrder | byteOrder = te::common::NDR  | 
        ||
| ) | 
It resets the EWKB writer an allows a new geometry to be seriealized to a new buffer.
| ewkb | A pointer to a buffer to output the ewkb. It must have at least the size in bytes necessary to write the EWKB. | 
| byteOrder | The byte order to be used to encode the EWKB. | 
      
  | 
  inlineprotectedvirtual | 
Implements te::gm::Visitor.
Definition at line 116 of file EWKBWriter.h.
      
  | 
  inlineprotectedvirtual | 
Implements te::gm::Visitor.
Definition at line 117 of file EWKBWriter.h.
      
  | 
  inlineprotectedvirtual | 
Implements te::gm::Visitor.
Definition at line 95 of file EWKBWriter.h.
      
  | 
  inlineprotectedvirtual | 
Implements te::gm::Visitor.
Definition at line 118 of file EWKBWriter.h.
      
  | 
  inlineprotectedvirtual | 
Implements te::gm::Visitor.
Definition at line 96 of file EWKBWriter.h.
      
  | 
  protectedvirtual | 
Implements te::gm::Visitor.
      
  | 
  protectedvirtual | 
Implements te::gm::Visitor.
      
  | 
  protectedvirtual | 
Implements te::gm::Visitor.
      
  | 
  inlineprotectedvirtual | 
Implements te::gm::Visitor.
Definition at line 100 of file EWKBWriter.h.
      
  | 
  protectedvirtual | 
Implements te::gm::Visitor.
      
  | 
  protectedvirtual | 
Implements te::gm::Visitor.
      
  | 
  protectedvirtual | 
Implements te::gm::Visitor.
      
  | 
  inlineprotectedvirtual | 
Implements te::gm::Visitor.
Definition at line 104 of file EWKBWriter.h.
      
  | 
  protectedvirtual | 
Implements te::gm::Visitor.
      
  | 
  protectedvirtual | 
Implements te::gm::Visitor.
      
  | 
  inlineprotectedvirtual | 
Implements te::gm::Visitor.
Definition at line 112 of file EWKBWriter.h.
      
  | 
  inlineprotectedvirtual | 
Implements te::gm::Visitor.
Definition at line 113 of file EWKBWriter.h.
      
  | 
  inlineprotectedvirtual | 
Implements te::gm::Visitor.
Definition at line 114 of file EWKBWriter.h.
      
  | 
  inlineprotectedvirtual | 
Implements te::gm::Visitor.
Definition at line 115 of file EWKBWriter.h.
| void te::pgis::EWKBWriter::write | ( | const te::gm::Geometry * | geom | ) | 
It serializes the geometry to an EWKB representation into the specified buffer.
| geom | The geometry to be serialized. | 
      
  | 
  static | 
It serializes the geometry to an EWKB representation into the specified buffer.
The ewkb parameter must have at least geom.getWkbSize() + 4 bytes in order to be used. Don't pass a NULL pointer or a buffer smaller than the size needed. Note that the EWKB will be on the specified byte order.
| geom | The geometry to be serialized. | 
| ewkb | The buffer where the geometry will be serialized. | 
| byteOrder | The byte order used to store/serialize the geometry. | 
      
  | 
  private | 
The byte order used to encode the EWKB.
Definition at line 123 of file EWKBWriter.h.
      
  | 
  private | 
A pointer that marks the current position in a buffer to be write when parsing the geometry.
Definition at line 122 of file EWKBWriter.h.
      
  | 
  private | 
If true we add a bit indicating that the srid will be outputed with the gometry.
Definition at line 124 of file EWKBWriter.h.