39 if ( dynamic_cast<const QgsLineStringV2*>( geom ) )
45 elemMultiLineString.
appendChild( elemLineStringMember );
51 return elemMultiLineString;
59 if ( dynamic_cast<const QgsLineStringV2*>( geom ) )
69 return elemMultiCurve;
74 QString json =
"{\"type\": \"MultiLineString\", \"coordinates\": [";
77 if ( dynamic_cast<const QgsCurveV2*>( geom ) )
95 if ( !dynamic_cast<QgsLineStringV2*>( g ) )
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)
QgsMultiLineStringV2 * clone() const override
Clones the geometry by performing a deep copy.
bool fromWkt(const QString &wkt) override
Sets the geometry from a WKT string.
void points(QList< QgsPointV2 > &pt) const override
Returns a list of points within the curve.
virtual bool addGeometry(QgsAbstractGeometryV2 *g) override
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.
static QString pointsToJSON(const QList< QgsPointV2 > &points, int precision)
Returns a geoJSON coordinates string.
Abstract base class for all geometries.
QDomElement createElementNS(const QString &nsURI, const QString &qName)
Multi line string geometry collection.
QDomElement asGML3(QDomDocument &doc, int precision=17, const QString &ns="gml") const override
Returns a GML3 representation of the geometry.
Line string geometry type.
QDomElement asGML3(QDomDocument &doc, int precision=17, const QString &ns="gml") const override
Returns a GML3 representation of the geometry.
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.
bool fromCollectionWkt(const QString &wkt, const QList< QgsAbstractGeometryV2 * > &subtypes, const QString &defaultChildWkbType=QString())
Reads a collection from a WKT string.
QVector< QgsAbstractGeometryV2 * > mGeometries
virtual bool addGeometry(QgsAbstractGeometryV2 *g)
Adds a geometry and takes ownership.
QString asJSON(int precision=17) const override
Returns a GeoJSON representation of the geometry.