QGIS API Documentation  2.14.0-Essen
qgspolygonv2.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgspolygonv2.h
3  -------------------
4  begin : September 2014
5  copyright : (C) 2014 by Marco Hugentobler
6  email : marco at sourcepole dot ch
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef QGSPOLYGONV2_H
19 #define QGSPOLYGONV2_H
20 
21 #include "qgscurvepolygonv2.h"
22 
29 class CORE_EXPORT QgsPolygonV2: public QgsCurvePolygonV2
30 {
31  public:
32  QgsPolygonV2();
33 
34  bool operator==( const QgsPolygonV2& other ) const;
35  bool operator!=( const QgsPolygonV2& other ) const;
36 
37  virtual QString geometryType() const override { return "Polygon"; }
38  virtual QgsPolygonV2* clone() const override;
39 
40  virtual bool fromWkb( QgsConstWkbPtr wkb ) override;
41 
42  // inherited: bool fromWkt( const QString &wkt );
43 
44  int wkbSize() const override;
45  unsigned char* asWkb( int& binarySize ) const override;
46  // inherited: QString asWkt( int precision = 17 ) const;
47  // inherited: QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
48  // inherited: QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
49  // inherited: QString asJSON( int precision = 17 ) const;
50 
51  QgsPolygonV2* surfaceToPolygon() const override;
52 
53  void addInteriorRing( QgsCurveV2* ring ) override;
54  //overridden to handle LineString25D rings
55  virtual void setExteriorRing( QgsCurveV2* ring ) override;
56 
57 };
58 #endif // QGSPOLYGONV2_H
virtual QString geometryType() const override
Returns a unique string representing the geometry type.
Definition: qgspolygonv2.h:37
virtual void addInteriorRing(QgsCurveV2 *ring)
Adds an interior ring to the geometry (takes ownership)
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
QgsPolygonV2 * surfaceToPolygon() const override
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
int wkbSize() const override
Returns the size of the WKB representation of the geometry.
Polygon geometry type.
Definition: qgspolygonv2.h:29
unsigned char * asWkb(int &binarySize) const override
Returns a WKB representation of the geometry.
virtual QgsCurvePolygonV2 * clone() const override
Clones the geometry by performing a deep copy.
virtual void setExteriorRing(QgsCurveV2 *ring)
Sets the exterior ring of the polygon.
virtual bool fromWkb(QgsConstWkbPtr wkb) override
Sets the geometry from a WKB string.
Curve polygon geometry type.
Abstract base class for curved geometry type.
Definition: qgscurvev2.h:32