22using namespace Qt::StringLiterals;
26 mP =
reinterpret_cast<unsigned char *
>( wkb.data() );
28 mEnd = mP + wkb.length();
38void QgsWkbPtr::verifyBound(
int size )
const
40 if ( !mP || mP +
size > mEnd )
46 mP =
reinterpret_cast< unsigned char *
>(
const_cast<char *
>( wkb.constData() ) );
54 mP =
const_cast< unsigned char *
>( p );
92 Q_ASSERT( skipZM >= 0 );
97 points.resize( nPoints );
98 QPointF *ptr = points.data();
100 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 Q_INVOKABLE int coordDimensions(Qgis::WkbType type)
Returns the coordinate dimension of the geometry type as an integer.