21 #include "qgis_core.h"
45 if ( mBoundingBox.isNull() )
52 bool isValid( QString &error
SIP_OUT, Qgis::GeometryValidityFlags flags = Qgis::GeometryValidityFlags() )
const override;
73 return static_cast<const QgsSurface *
>( geom );
82 mutable bool mHasCachedValidity =
false;
Abstract base class for all geometries.
virtual QgsRectangle calculateBoundingBox() const
Default calculator for the minimal bounding box for the geometry.
virtual bool isValid(QString &error, Qgis::GeometryValidityFlags flags=Qgis::GeometryValidityFlags()) const =0
Checks validity of the geometry, and returns true if the geometry is valid.
virtual void clearCache() const
Clears any cached parameters associated with the geometry, e.g., bounding boxes.
QgsWkbTypes::Type wkbType() const SIP_HOLDGIL
Returns the WKB type of the geometry.
A rectangle specified with double values.
QgsRectangle boundingBox() const override
Returns the minimal bounding box for the geometry.
static const QgsSurface * cast(const QgsAbstractGeometry *geom)
Cast the geom to a QgsSurface.
QgsRectangle mBoundingBox
QString mValidityFailureReason
virtual QgsPolygon * surfaceToPolygon() const =0
Gets a polygon representation of this surface.
Type
The WKB type describes the number of dimensions a geometry has.
static Type flatType(Type type) SIP_HOLDGIL
Returns the flat type for a WKB type.