37 QRegExp regex(
"^\\s*MultiPoint\\s*[ZM]*\\s*\\(\\s*[-\\d]" );
39 if ( regex.
indexIn( collectionWkt ) >= 0 )
53 if ( dynamic_cast<const QgsPointV2*>( geom ) )
61 return elemMultiPoint;
69 if ( dynamic_cast<const QgsPointV2*>( geom ) )
77 return elemMultiPoint;
82 QString json =
"{\"type\": \"MultiPoint\", \"coordinates\": ";
87 if ( dynamic_cast<const QgsPointV2*>( geom ) )
100 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 QgsPointSequenceV2 &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)
int indexIn(const QString &str, int offset, CaretMode caretMode) const
virtual QgsAbstractGeometryV2 * boundary() const override
Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the...
Point geometry type, with support for z-dimension and m-values.
QgsWKBTypes::Type mWkbType
bool fromWkt(const QString &wkt) override
Sets the geometry from a WKT string.
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.
void setCaseSensitivity(Qt::CaseSensitivity cs)
QVector< QgsAbstractGeometryV2 *> mGeometries
QString & replace(int position, int n, QChar after)
bool fromCollectionWkt(const QString &wkt, const QList< QgsAbstractGeometryV2 *> &subtypes, const QString &defaultChildWkbType=QString())
Reads a collection from a WKT string.
QgsMultiPointV2 * clone() const override
Clones the geometry by performing a deep copy.
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.