2016-08-06 11:01:42 +02:00
|
|
|
class QgsPolygonV2: public QgsCurvePolygon
|
2015-05-15 15:41:56 +02:00
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
2016-08-07 17:33:22 +02:00
|
|
|
#include <qgspolygon.h>
|
2015-05-15 15:41:56 +02:00
|
|
|
%End
|
|
|
|
|
|
|
|
public:
|
2015-12-11 18:37:52 +11:00
|
|
|
QgsPolygonV2();
|
|
|
|
|
2015-12-15 22:36:41 +11:00
|
|
|
bool operator==( const QgsPolygonV2& other ) const;
|
|
|
|
bool operator!=( const QgsPolygonV2& other ) const;
|
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
virtual QString geometryType() const;
|
2016-11-05 12:10:25 +08:00
|
|
|
virtual QgsPolygonV2* clone() const /Factory/;
|
2016-06-06 09:39:09 +02:00
|
|
|
void clear();
|
2015-05-15 15:41:56 +02:00
|
|
|
|
2016-11-13 23:43:38 +08:00
|
|
|
virtual bool fromWkb( QgsConstWkbPtr& wkb );
|
2016-01-28 10:30:06 +01:00
|
|
|
|
2015-05-15 15:41:56 +02:00
|
|
|
// inherited: bool fromWkt( const QString &wkt );
|
|
|
|
|
2016-11-13 23:43:38 +08:00
|
|
|
QByteArray asWkb() const;
|
2015-05-15 15:41:56 +02:00
|
|
|
// inherited: QString asWkt( int precision = 17 ) const;
|
|
|
|
// inherited: QDomElement asGML2( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
|
|
|
|
// inherited: QDomElement asGML3( QDomDocument& doc, int precision = 17, const QString& ns = "gml" ) const;
|
|
|
|
// inherited: QString asJSON( int precision = 17 ) const;
|
|
|
|
|
2016-11-05 12:10:25 +08:00
|
|
|
QgsPolygonV2* surfaceToPolygon() const /Factory/;
|
2015-12-11 18:37:52 +11:00
|
|
|
|
2016-08-06 11:01:42 +02:00
|
|
|
/** Returns the geometry converted to the more generic curve type QgsCurvePolygon
|
2016-04-29 11:53:34 +02:00
|
|
|
@return the converted geometry. Caller takes ownership*/
|
2016-08-06 11:01:42 +02:00
|
|
|
QgsAbstractGeometry* toCurveType() const /Factory/;
|
2016-04-29 11:53:34 +02:00
|
|
|
|
2016-08-06 11:01:42 +02:00
|
|
|
void addInteriorRing( QgsCurve* ring /Transfer/ );
|
2015-12-15 22:36:41 +11:00
|
|
|
//overridden to handle LineString25D rings
|
2016-08-06 11:01:42 +02:00
|
|
|
virtual void setExteriorRing( QgsCurve* ring /Transfer/ );
|
2016-01-28 10:30:06 +01:00
|
|
|
|
2016-08-06 11:01:42 +02:00
|
|
|
virtual QgsAbstractGeometry* boundary() const /Factory/;
|
2016-11-10 15:58:18 +10:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the distance from a point to the boundary of the polygon (either the
|
|
|
|
* exterior ring or any closer interior rings). The returned distance will be
|
|
|
|
* negative if the point lies outside the polygon.
|
|
|
|
* @note added in QGIS 3.0
|
|
|
|
*/
|
|
|
|
double pointDistanceToBoundary( double x, double y ) const;
|
2015-05-15 15:41:56 +02:00
|
|
|
};
|