QGIS/python/core/geometry/qgspolygon.sip

47 lines
1.6 KiB
Plaintext
Raw Normal View History

2016-08-06 11:01:42 +02:00
class QgsPolygonV2: public QgsCurvePolygon
2015-05-15 15:41:56 +02:00
{
%TypeHeaderCode
#include <qgspolygon.h>
2015-05-15 15:41:56 +02:00
%End
public:
QgsPolygonV2();
bool operator==( const QgsPolygonV2& other ) const;
bool operator!=( const QgsPolygonV2& other ) const;
2015-05-15 15:41:56 +02:00
virtual QString geometryType() const;
virtual QgsPolygonV2* clone() const /Factory/;
void clear();
2015-05-15 15:41:56 +02: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 );
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;
QgsPolygonV2* surfaceToPolygon() const /Factory/;
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/ );
//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/;
/**
* 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
};