40 wkbPtr -= 1 +
sizeof( int );
66 if ( text.
startsWith(
"Point", Qt::CaseInsensitive ) )
70 else if ( text.
startsWith(
"LineString", Qt::CaseInsensitive ) )
74 else if ( text.
startsWith(
"CircularString", Qt::CaseInsensitive ) )
78 else if ( text.
startsWith(
"CompoundCurve" , Qt::CaseInsensitive ) )
82 else if ( text.
startsWith(
"Polygon", Qt::CaseInsensitive ) )
86 else if ( text.
startsWith(
"CurvePolygon", Qt::CaseInsensitive ) )
90 else if ( text.
startsWith(
"MultiPoint", Qt::CaseInsensitive ) )
94 else if ( text.
startsWith(
"MultiCurve", Qt::CaseInsensitive ) )
98 else if ( text.
startsWith(
"MultiLineString", Qt::CaseInsensitive ) )
102 else if ( text.
startsWith(
"MultiSurface", Qt::CaseInsensitive ) )
106 else if ( text.
startsWith(
"MultiPolygon", Qt::CaseInsensitive ) )
110 else if ( text.
startsWith(
"GeometryCollection", Qt::CaseInsensitive ) )
135 for ( ; ptIt != multipoint.
constEnd(); ++ptIt )
145 return linestringFromPolyline( polyline );
151 for (
int i = 0; i < multiline.
size(); ++i )
163 for (
int i = 0; i < polygon.
size(); ++i )
184 for (
int i = 0; i < multipoly.
size(); ++i )
212 for ( ; it != polyline.
constEnd(); ++it )
virtual bool addGeometry(QgsAbstractGeometryV2 *g) override
Adds a geometry and takes ownership.
void close()
Closes the line string by appending the first point to the end of the line, if it is not already clos...
A rectangle specified with double values.
void append(const T &value)
void push_back(const T &value)
virtual bool addGeometry(QgsAbstractGeometryV2 *g) override
Adds a geometry and takes ownership.
double yMaximum() const
Get the y maximum value (top side of rectangle)
Circular string geometry type.
Multi curve geometry collection.
const_iterator constEnd() const
static QgsAbstractGeometryV2 * fromPolygon(const QgsPolygon &polygon)
Construct geometry from a polygon.
Abstract base class for all geometries.
Multi point geometry collection.
static QgsAbstractGeometryV2 * fromPolyline(const QgsPolyline &polyline)
Construct geometry from a polyline.
virtual bool addGeometry(QgsAbstractGeometryV2 *g) override
Adds a geometry and takes ownership.
static QgsAbstractGeometryV2 * fromPoint(const QgsPoint &point)
Construct geometry from a point.
static QgsAbstractGeometryV2 * fromMultiPolygon(const QgsMultiPolygon &multipoly)
Construct geometry from a multipolygon.
static QgsAbstractGeometryV2 * geomFromWkb(QgsConstWkbPtr wkb)
Construct geometry from a WKB string.
Multi line string geometry collection.
double x() const
Get the x value of the point.
static QgsAbstractGeometryV2 * geomFromWkt(const QString &text)
Construct geometry from a WKT string.
QgsWKBTypes::Type readHeader() const
static QgsAbstractGeometryV2 * fromMultiPoint(const QgsMultiPoint &multipoint)
Construct geometry from a multipoint.
void setInteriorRings(const QList< QgsCurveV2 * > &rings)
Sets all interior rings (takes ownership)
void append(const T &value)
virtual void setExteriorRing(QgsCurveV2 *ring) override
Sets the exterior ring of the polygon.
double yMinimum() const
Get the y minimum value (bottom side of rectangle)
double xMaximum() const
Get the x maximum value (right side of rectangle)
Line string geometry type, with support for z-dimension and m-values.
virtual bool fromWkb(QgsConstWkbPtr wkb)=0
Sets the geometry from a WKB string.
void setPoints(const QgsPointSequenceV2 &points)
Resets the line string to match the specified list of points.
Point geometry type, with support for z-dimension and m-values.
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
Multi surface geometry collection.
static QgsAbstractGeometryV2 * geomFromWkbType(QgsWKBTypes::Type t)
Return empty geometry from wkb type.
virtual bool fromWkt(const QString &wkt)=0
Sets the geometry from a WKT string.
A class to represent a point.
Compound curve geometry type.
const T & at(int i) const
const_iterator constBegin() const
static QgsAbstractGeometryV2 * fromRect(const QgsRectangle &rect)
Construct geometry from a rectangle.
static QgsAbstractGeometryV2 * fromMultiPolyline(const QgsMultiPolyline &multiline)
Construct geometry from a multipolyline.
double y() const
Get the y value of the point.
static Type flatType(Type type)
Returns the flat type for a WKB type.
Multi polygon geometry collection.
Curve polygon geometry type.
double xMinimum() const
Get the x minimum value (left side of rectangle)