37 if ( dynamic_cast<const QgsPointV2*>( geom ) )
45 return elemMultiPoint;
53 if ( dynamic_cast<const QgsPointV2*>( geom ) )
61 return elemMultiPoint;
66 QString json =
"{\"type\": \"MultiPoint\", \"coordinates\": [";
69 if ( dynamic_cast<const QgsPointV2*>( geom ) )
85 if ( !dynamic_cast<QgsPointV2*>( g ) )
virtual bool addGeometry(QgsAbstractGeometryV2 *g) override
Adds a geometry and takes ownership.
QDomNode appendChild(const QDomNode &newChild)
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.
Multi point geometry collection.
QDomElement createElementNS(const QString &nsURI, const QString &qName)
QgsAbstractGeometryV2 * clone() const override
Clones the geometry by performing a deep copy.
bool fromWkt(const QString &wkt) override
Sets the geometry from a WKT string.
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.
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.
virtual QDomElement asGML2(QDomDocument &doc, int precision=17, const QString &ns="gml") const =0
Returns a GML2 representation of the geometry.
QDomElement asGML3(QDomDocument &doc, int precision=17, const QString &ns="gml") const override
Returns a GML3 representation of the geometry.
QString asJSON(int precision=17) const override
Returns a GeoJSON representation of the geometry.