29 #ifndef OGR_WKB_H_INCLUDED
30 #define OGR_WKB_H_INCLUDED
35 bool CPL_DLL OGRWKBGetGeomType(
const GByte *pabyWkb,
size_t nWKBSize,
36 bool &bNeedSwap, uint32_t &nType);
37 bool OGRWKBPolygonGetArea(
const GByte *&pabyWkb,
size_t &nWKBSize,
39 bool OGRWKBMultiPolygonGetArea(
const GByte *&pabyWkb,
size_t &nWKBSize,
42 bool CPL_DLL OGRWKBGetBoundingBox(
const GByte *pabyWkb,
size_t nWKBSize,
45 bool CPL_DLL OGRWKBGetBoundingBox(
const GByte *pabyWkb,
size_t nWKBSize,
48 bool CPL_DLL OGRWKBIntersectsPessimistic(
const GByte *pabyWkb,
size_t nWKBSize,
51 void CPL_DLL OGRWKBFixupCounterClockWiseExternalRing(
GByte *pabyWkb,
62 const GByte CPL_DLL *WKBFromEWKB(
GByte *pabyEWKB,
size_t nEWKBSize,
63 size_t &nWKBSizeOut,
int *pnSRIDOut);
84 if (nItemSize > m_nCapacity - m_nSize)
89 void *pRet =
static_cast<GByte *
>(m_pRawBuffer) + m_nSize;
102 size_t m_nCapacity = 0;
108 void *m_pRawBuffer =
nullptr;
113 virtual bool Grow(
size_t nItemSize) = 0;
128 bool m_bCanUseStrtod =
false;
141 size_t TranslateWKT(
void *pabyWKTStart,
size_t nLength,
142 bool bCanAlterByteAfter);
Append buffer that can be grown dynamically.
Definition: ogr_wkb.h:71
size_t GetSize() const
Return the number of valid bytes in the buffer.
Definition: ogr_wkb.h:95
void * GetPtrForNewBytes(size_t nItemSize)
Return the pointer at which nItemSize bytes can be written, or nullptr in case of error.
Definition: ogr_wkb.h:82
virtual bool Grow(size_t nItemSize)=0
Extend the capacity of m_pRawBuffer to be at least m_nSize + nItemSize large.
virtual ~OGRAppendBuffer()
Destructor.
OGRAppendBuffer()
Constructor.
Simple container for a bounding region in 3D.
Definition: ogr_core.h:216
Simple container for a bounding region (rectangle)
Definition: ogr_core.h:61
Translate WKT geometry to WKB geometry and append it to a buffer.
Definition: ogr_wkb.h:126
Core portability definitions for CPL.
unsigned char GByte
Unsigned byte type.
Definition: cpl_port.h:185
Core portability services for cross-platform OGR code.