41 memcpy( &type, wkb + 1,
sizeof(
int ) );
56 if ( text.
startsWith(
"Point", Qt::CaseInsensitive ) )
60 else if ( text.
startsWith(
"LineString", Qt::CaseInsensitive ) )
64 else if ( text .startsWith(
"CircularString", Qt::CaseInsensitive ) )
68 else if ( text.
startsWith(
"CompoundCurve" , Qt::CaseInsensitive ) )
72 else if ( text.
startsWith(
"Polygon", Qt::CaseInsensitive ) )
76 else if ( text.
startsWith(
"CurvePolygon", Qt::CaseInsensitive ) )
80 else if ( text.
startsWith(
"MultiPoint", Qt::CaseInsensitive ) )
84 else if ( text.
startsWith(
"MultiCurve", Qt::CaseInsensitive ) )
88 else if ( text.
startsWith(
"MultiLineString", Qt::CaseInsensitive ) )
92 else if ( text.
startsWith(
"MultiSurface", Qt::CaseInsensitive ) )
96 else if ( text.
startsWith(
"MultiPolygon", Qt::CaseInsensitive ) )
100 else if ( text.
startsWith(
"GeometryCollection", Qt::CaseInsensitive ) )
109 delete geom;
return 0;
124 for ( ; ptIt != multipoint.
constEnd(); ++ptIt )
134 return linestringFromPolyline( polyline );
140 for (
int i = 0; i < multiline.
size(); ++i )
152 for (
int i = 0; i < polygon.
size(); ++i )
173 for (
int i = 0; i < multipoly.
size(); ++i )
201 for ( ; it != polyline.
constEnd(); ++it )
virtual bool addGeometry(QgsAbstractGeometryV2 *g) override
Adds a geometry and takes ownership.
void close()
Appends first point if not already closed.
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
Multi line string geometry collection.
static QgsAbstractGeometryV2 * geomFromWkt(const QString &text)
Construct geometry from a WKT string.
static Type flatType(Type type)
static QgsAbstractGeometryV2 * fromMultiPoint(const QgsMultiPoint &multipoint)
construct geometry from a multipoint
void append(const T &value)
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.
virtual bool fromWkb(const unsigned char *wkb)=0
Sets the geometry from a WKB string.
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.
static QgsAbstractGeometryV2 * geomFromWkb(const unsigned char *wkb)
Construct geometry from a WKB string.
const T & at(int i) const
const_iterator constBegin() const
static QgsAbstractGeometryV2 * fromRect(const QgsRectangle &rect)
construct geometry from a rectangle
void setPoints(const QList< QgsPointV2 > &points)
void setExteriorRing(QgsCurveV2 *ring)
Sets exterior ring (takes ownership)
static QgsAbstractGeometryV2 * fromMultiPolyline(const QgsMultiPolyline &multiline)
construct geometry from a multipolyline
Multi polygon geometry collection.
Curve polygon geometry type.
double xMinimum() const
Get the x minimum value (left side of rectangle)
void setInteriorRings(QList< QgsCurveV2 * > rings)
Sets all interior rings (takes ownership)