QGIS/python/core/auto_generated/geometry/qgspolygon.sip.in
Nyall Dawson 7d648e5b51 Improve Python __repr__ handling for null geometries
Also avoid massive long __repr__ strings for complex geometries,
as these can flood the Python console (and first aid plugin),
and aren't useful for debugging anyway.

Refs #14640
2018-12-18 18:11:22 +10:00

88 lines
2.5 KiB
Plaintext

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgspolygon.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsPolygon: QgsCurvePolygon
{
%Docstring
Polygon geometry type.
.. versionadded:: 2.10
%End
%TypeHeaderCode
#include "qgspolygon.h"
%End
public:
QgsPolygon();
virtual QString geometryType() const;
virtual QgsPolygon *clone() const /Factory/;
virtual void clear();
virtual bool fromWkb( QgsConstWkbPtr &wkb );
virtual QByteArray asWkb() const;
virtual QgsPolygon *surfaceToPolygon() const /Factory/;
virtual QgsCurvePolygon *toCurveType() const /Factory/;
%Docstring
Returns the geometry converted to the more generic curve type :py:class:`QgsCurvePolygon`
:return: the converted geometry. Caller takes ownership*
%End
virtual void addInteriorRing( QgsCurve *ring /Transfer/ );
virtual void setExteriorRing( QgsCurve *ring /Transfer/ );
virtual QgsAbstractGeometry *boundary() const /Factory/;
double pointDistanceToBoundary( double x, double y ) const;
%Docstring
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.
.. versionadded:: 3.0
%End
virtual QgsPolygon *createEmptyWithSameType() const /Factory/;
SIP_PYOBJECT __repr__();
%MethodCode
QString wkt = sipCpp->asWkt();
if ( wkt.length() > 1000 )
wkt = wkt.left( 1000 ) + QStringLiteral( "..." );
QString str = QStringLiteral( "<QgsPolygon: %1>" ).arg( wkt );
sipRes = PyUnicode_FromString( str.toUtf8().constData() );
%End
protected:
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/geometry/qgspolygon.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/