QGIS API Documentation  2.18.3-Las Palmas (77b8c3d)
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  void clear() override;
40 
41  virtual bool fromWkb( QgsConstWkbPtr wkb ) override;
42 
43  // inherited: bool fromWkt( const QString &wkt );
44 
45  int wkbSize() const override;
46  unsigned char* asWkb( int& binarySize ) const override;
47  // inherited: QString asWkt( int precision = 17 ) const;
48  // inherited: QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
49  // inherited: QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
50  // inherited: QString asJSON( int precision = 17 ) const;
51 
52  QgsPolygonV2* surfaceToPolygon() const override;
53 
56  QgsAbstractGeometryV2* toCurveType() const override;
57 
58  void addInteriorRing( QgsCurveV2* ring ) override;
59  //overridden to handle LineString25D rings
60  virtual void setExteriorRing( QgsCurveV2* ring ) override;
61 
62  virtual QgsAbstractGeometryV2* boundary() const override;
63 
64 };
65 #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)
void clear() override
Clears the geometry, ie reset it to a null geometry.
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
QgsPolygonV2 * surfaceToPolygon() const override
bool operator!=(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
Abstract base class for all geometries.
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 QgsAbstractGeometryV2 * boundary() const override
Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the...
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
virtual QgsAbstractGeometryV2 * toCurveType() const
Returns the geometry converted to the more generic curve type.