47 for (
int i = 0; i < nRings; ++i )
71 int size =
sizeof( char ) +
sizeof( quint32 ) +
sizeof( quint32 );
80 size += curve->
wkbSize() - (
sizeof( char ) +
sizeof( quint32 ) );
88 unsigned char* geomPtr =
new unsigned char[binarySize];
91 wkb << static_cast<quint32>(
wkbType() );
QgsWKBTypes::Type wkbType() const
Returns the WKB type of the geometry.
void clear() override
Clears the geometry, ie reset it to a null geometry.
virtual void points(QList< QgsPointV2 > &pt) const =0
Returns a list of points within the curve.
unsigned char * asWkb(int &binarySize) const override
Returns a WKB representation of the geometry.
static endian_t endian()
Returns whether this machine uses big or little endian.
virtual int wkbSize() const =0
Returns the size of the WKB representation of the geometry.
QgsWKBTypes::Type readHeader() const
static Type flatType(Type type)
bool is3D() const
Returns true if the geometry is 3D and contains a z-value.
void append(const T &value)
bool isMeasure() const
Returns true if the geometry contains m values.
Line string geometry type.
void fromWkbPoints(QgsWKBTypes::Type type, const QgsConstWkbPtr &wkb)
QgsWKBTypes::Type mWkbType
virtual QgsPolygonV2 * clone() const override
Clones the geometry by performing a deep copy.
QList< QgsCurveV2 * > mInteriorRings
QgsPolygonV2 * surfaceToPolygon() const override
Abstract base class for curved geometry type.
int wkbSize() const override
Returns the size of the WKB representation of the geometry.
static void pointsToWKB(QgsWkbPtr &wkb, const QList< QgsPointV2 > &points, bool is3D, bool isMeasure)
Returns a LinearRing { uint32 numPoints; Point points[numPoints]; }.
virtual bool fromWkb(const unsigned char *wkb) override
Sets the geometry from a WKB string.
QgsCurveV2 * mExteriorRing