QGIS API Documentation  2.12.0-Lyon
qgsmultipointv2.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmultipointv2.h
3  -------------------------------------------------------------------
4 Date : 29 Oct 2014
5 Copyright : (C) 2014 by Marco Hugentobler
6 email : marco.hugentobler at sourcepole dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSMULTIPOINTV2_H
17 #define QGSMULTIPOINTV2_H
18 
20 
27 class CORE_EXPORT QgsMultiPointV2: public QgsGeometryCollectionV2
28 {
29  public:
30  virtual QString geometryType() const override { return "MultiPoint"; }
31  QgsMultiPointV2* clone() const override;
32 
33  bool fromWkt( const QString& wkt ) override;
34 
35  // inherited: int wkbSize() const;
36  // inherited: unsigned char* asWkb( int& binarySize ) const;
37  // inherited: QString asWkt( int precision = 17 ) const;
38  QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
39  QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const override;
40  QString asJSON( int precision = 17 ) const override;
41 
42 
44  virtual bool addGeometry( QgsAbstractGeometryV2* g ) override;
45 
46  protected:
47 
48  virtual bool wktOmitChildType() const override { return true; }
49 
50 };
51 
52 #endif // QGSMULTIPOINTV2_H
Abstract base class for all geometries.
Multi point geometry collection.
QDomElement asGML2(QDomDocument &doc, int precision=17, const QString &ns="gml") const override
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.
virtual bool fromWkt(const QString &wkt) override
Sets the geometry from a WKT string.
virtual QgsGeometryCollectionV2 * clone() const override
Clones the geometry by performing a deep copy.
virtual QString geometryType() const override
Returns a unique string representing the geometry type.
virtual bool addGeometry(QgsAbstractGeometryV2 *g)
Adds a geometry and takes ownership.
virtual bool wktOmitChildType() const override
Returns whether child type names are omitted from Wkt representations of the collection.