21 mP =
reinterpret_cast<unsigned char *
>( wkb.data() );
23 mEnd = mP + wkb.length();
33void QgsWkbPtr::verifyBound(
int size )
const
35 if ( !mP || mP +
size > mEnd )
41 mP =
reinterpret_cast< unsigned char *
>(
const_cast<char *
>( wkb.constData() ) );
49 mP =
const_cast< unsigned char *
>( p );
87 Q_ASSERT( skipZM >= 0 );
92 points.resize( nPoints );
93 QPointF *ptr = points.data();
95 for (
unsigned int i = 0; i < nPoints; ++i, ++ptr )
WkbType
The WKB type describes the number of dimensions a geometry has.
static endian_t endian()
Returns whether this machine uses big or little endian.
QgsConstWkbPtr(const QByteArray &wkb)
Construct WKB pointer from QByteArray.
void read(T &v) const
Read a value.
void verifyBound(int size) const
Verify bounds.
Qgis::WkbType readHeader() const
readHeader
const QgsConstWkbPtr & operator>>(double &v) const
Custom exception class for Wkb related exceptions.
QgsWkbPtr(QByteArray &wkb)
Construct WKB pointer from QByteArray.
static int coordDimensions(Qgis::WkbType type)
Returns the coordinate dimension of the geometry type as an integer.