49 if ( dynamic_cast<const QgsCurveV2*>( geom ) )
55 elemMultiLineString.
appendChild( elemLineStringMember );
61 return elemMultiLineString;
69 if ( dynamic_cast<const QgsCurveV2*>( geom ) )
79 return elemMultiCurve;
85 QString json =
"{\"type\": \"MultiLineString\", \"coordinates\": [";
88 if ( dynamic_cast<const QgsCurveV2*>( geom ) )
107 if ( !dynamic_cast<QgsCurveV2*>( g ) )
122 if ( dynamic_cast<const QgsCurveV2*>( geom ) )
127 return reversedMultiCurve;
137 if ( !curve->isClosed() )
virtual bool addGeometry(QgsAbstractGeometryV2 *g) override
Adds a geometry and takes ownership.
QDomElement asGML3(QDomDocument &doc, int precision=17, const QString &ns="gml") const override
Returns a GML3 representation of the geometry.
int numGeometries() const
Returns the number of geometries within the collection.
QDomElement asGML2(QDomDocument &doc, int precision=17, const QString &ns="gml") const override
Returns a GML2 representation of the geometry.
QDomNode appendChild(const QDomNode &newChild)
void points(QgsPointSequenceV2 &pt) const override
Returns a list of points within the curve.
Circular string geometry type.
Multi curve geometry collection.
QgsMultiCurveV2 * clone() const override
Clones the geometry by performing a deep copy.
static QString pointsToJSON(const QgsPointSequenceV2 &points, int precision)
Returns a geoJSON coordinates string.
Abstract base class for all geometries.
bool fromWkt(const QString &wkt) override
Sets the geometry from a WKT string.
Multi point geometry collection.
QDomElement createElementNS(const QString &nsURI, const QString &qName)
Line string geometry type, with support for z-dimension and m-values.
Point geometry type, with support for z-dimension and m-values.
virtual QgsAbstractGeometryV2 * boundary() const override
Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the...
QgsWKBTypes::Type mWkbType
virtual bool addGeometry(QgsAbstractGeometryV2 *g) override
Adds a geometry and takes ownership.
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const
void setZMTypeFromSubGeometry(const QgsAbstractGeometryV2 *subggeom, QgsWKBTypes::Type baseGeomType)
Updates the geometry type based on whether sub geometries contain z or m values.
virtual QDomElement asGML3(QDomDocument &doc, int precision=17, const QString &ns="gml") const =0
Returns a GML3 representation of the geometry.
QgsMultiCurveV2 * reversed() const
Returns a copy of the multi curve, where each component curve has had its line direction reversed...
Compound curve geometry type.
QString asJSON(int precision=17) const override
Returns a GeoJSON representation of the geometry.
QVector< QgsAbstractGeometryV2 *> mGeometries
const T & at(int i) const
bool fromCollectionWkt(const QString &wkt, const QList< QgsAbstractGeometryV2 *> &subtypes, const QString &defaultChildWkbType=QString())
Reads a collection from a WKT string.
virtual bool addGeometry(QgsAbstractGeometryV2 *g)
Adds a geometry and takes ownership.
QDomElement asGML2(QDomDocument &doc, int precision=17, const QString &ns="gml") const override
Returns a GML2 representation of the geometry.
Abstract base class for curved geometry type.