QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
QgsAbstractGeometryV2 Class Referenceabstract

Abstract base class for all geometries. More...

#include <qgsabstractgeometryv2.h>

Inheritance diagram for QgsAbstractGeometryV2:
Inheritance graph
[legend]

Public Types

enum  SegmentationToleranceType { MaximumAngle = 0, MaximumDifference }
 Segmentation tolerance as maximum angle or maximum difference between approximation and circle. More...
 

Public Member Functions

 QgsAbstractGeometryV2 ()
 
 QgsAbstractGeometryV2 (const QgsAbstractGeometryV2 &geom)
 
virtual ~QgsAbstractGeometryV2 ()
 
virtual bool addMValue (double mValue=0)=0
 Adds a measure to the geometry, initialized to a preset value. More...
 
virtual bool addZValue (double zValue=0)=0
 Adds a z-dimension to the geometry, initialized to a preset value. More...
 
virtual double area () const
 Returns the area of the geometry. More...
 
virtual QDomElement asGML2 (QDomDocument &doc, int precision=17, const QString &ns="gml") const =0
 Returns a GML2 representation of the geometry. More...
 
virtual QDomElement asGML3 (QDomDocument &doc, int precision=17, const QString &ns="gml") const =0
 Returns a GML3 representation of the geometry. More...
 
virtual QString asJSON (int precision=17) const =0
 Returns a GeoJSON representation of the geometry. More...
 
virtual unsigned char * asWkb (int &binarySize) const =0
 Returns a WKB representation of the geometry. More...
 
virtual QString asWkt (int precision=17) const =0
 Returns a WKT representation of the geometry. More...
 
virtual QgsAbstractGeometryV2boundary () const =0
 Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the geometry). More...
 
virtual QgsRectangle boundingBox () const =0
 Returns the minimal bounding box for the geometry. More...
 
virtual QgsPointV2 centroid () const
 Returns the centroid of the geometry. More...
 
virtual void clear ()=0
 Clears the geometry, ie reset it to a null geometry. More...
 
virtual QgsAbstractGeometryV2clone () const =0
 Clones the geometry by performing a deep copy. More...
 
virtual double closestSegment (const QgsPointV2 &pt, QgsPointV2 &segmentPt, QgsVertexId &vertexAfter, bool *leftOf, double epsilon) const =0
 Searches for the closest segment of the geometry to a given point. More...
 
virtual bool convertTo (QgsWKBTypes::Type type)
 Converts the geometry to a specified type. More...
 
virtual QgsCoordinateSequenceV2 coordinateSequence () const =0
 Retrieves the sequence of geometries, rings and nodes. More...
 
virtual bool deleteVertex (QgsVertexId position)=0
 Deletes a vertex within the geometry. More...
 
virtual int dimension () const =0
 Returns the inherent dimension of the geometry. More...
 
virtual void draw (QPainter &p) const =0
 Draws the geometry using the specified QPainter. More...
 
virtual bool dropMValue ()=0
 Drops any measure values which exist in the geometry. More...
 
virtual bool dropZValue ()=0
 Drops any z-dimensions which exist in the geometry. More...
 
virtual bool fromWkb (QgsConstWkbPtr wkb)=0
 Sets the geometry from a WKB string. More...
 
virtual bool fromWkt (const QString &wkt)=0
 Sets the geometry from a WKT string. More...
 
virtual QString geometryType () const =0
 Returns a unique string representing the geometry type. More...
 
virtual bool hasCurvedSegments () const
 Returns true if the geometry contains curved segments. More...
 
virtual bool insertVertex (QgsVertexId position, const QgsPointV2 &vertex)=0
 Inserts a vertex into the geometry. More...
 
bool is3D () const
 Returns true if the geometry is 3D and contains a z-value. More...
 
bool isEmpty () const
 Returns true if the geometry is empty. More...
 
bool isMeasure () const
 Returns true if the geometry contains m values. More...
 
virtual double length () const
 Returns the length of the geometry. More...
 
virtual bool moveVertex (QgsVertexId position, const QgsPointV2 &newPos)=0
 Moves a vertex within the geometry. More...
 
virtual int nCoordinates () const
 Returns the number of nodes contained in the geometry. More...
 
virtual bool nextVertex (QgsVertexId &id, QgsPointV2 &vertex) const =0
 Returns next vertex id and coordinates. More...
 
virtual QgsAbstractGeometryV2operator= (const QgsAbstractGeometryV2 &geom)
 
virtual int partCount () const =0
 Returns count of parts contained in the geometry. More...
 
virtual double perimeter () const
 Returns the perimeter of the geometry. More...
 
virtual int ringCount (int part=0) const =0
 
virtual QgsAbstractGeometryV2segmentize (double tolerance=M_PI/180., SegmentationToleranceType toleranceType=MaximumAngle) const
 Returns a version of the geometry without curves. More...
 
virtual QgsAbstractGeometryV2toCurveType () const
 Returns the geometry converted to the more generic curve type. More...
 
virtual void transform (const QgsCoordinateTransform &ct, QgsCoordinateTransform::TransformDirection d=QgsCoordinateTransform::ForwardTransform, bool transformZ=false)=0
 Transforms the geometry using a coordinate transform. More...
 
virtual void transform (const QTransform &t)=0
 Transforms the geometry using a QTransform object. More...
 
virtual double vertexAngle (QgsVertexId vertex) const =0
 Returns approximate angle at a vertex. More...
 
virtual QgsPointV2 vertexAt (QgsVertexId id) const =0
 Returns the point corresponding to a specified vertex id. More...
 
virtual int vertexCount (int part=0, int ring=0) const =0
 
virtual int wkbSize () const =0
 Returns the size of the WKB representation of the geometry. More...
 
QgsWKBTypes::Type wkbType () const
 Returns the WKB type of the geometry. More...
 
QString wktTypeStr () const
 Returns the WKT type string of the geometry. More...
 

Protected Member Functions

virtual QgsRectangle calculateBoundingBox () const
 Default calculator for the minimal bounding box for the geometry. More...
 
virtual void clearCache () const
 Clears any cached parameters associated with the geometry, eg bounding boxes. More...
 
void setZMTypeFromSubGeometry (const QgsAbstractGeometryV2 *subggeom, QgsWKBTypes::Type baseGeomType)
 Updates the geometry type based on whether sub geometries contain z or m values. More...
 

Protected Attributes

QgsWKBTypes::Type mWkbType
 

Detailed Description

Abstract base class for all geometries.

Note
added in QGIS 2.10

Definition at line 43 of file qgsabstractgeometryv2.h.

Member Enumeration Documentation

◆ SegmentationToleranceType

Segmentation tolerance as maximum angle or maximum difference between approximation and circle.

Enumerator
MaximumAngle 
MaximumDifference 

Definition at line 48 of file qgsabstractgeometryv2.h.

Constructor & Destructor Documentation

◆ QgsAbstractGeometryV2() [1/2]

QgsAbstractGeometryV2::QgsAbstractGeometryV2 ( )

Definition at line 25 of file qgsabstractgeometryv2.cpp.

◆ ~QgsAbstractGeometryV2()

QgsAbstractGeometryV2::~QgsAbstractGeometryV2 ( )
virtual

Definition at line 29 of file qgsabstractgeometryv2.cpp.

◆ QgsAbstractGeometryV2() [2/2]

QgsAbstractGeometryV2::QgsAbstractGeometryV2 ( const QgsAbstractGeometryV2 geom)

Definition at line 33 of file qgsabstractgeometryv2.cpp.

Member Function Documentation

◆ addMValue()

virtual bool QgsAbstractGeometryV2::addMValue ( double  mValue = 0)
pure virtual

Adds a measure to the geometry, initialized to a preset value.

Parameters
mValueinitial m-value for all nodes
Returns
true on success
Note
added in QGIS 2.12
See also
dropMValue()
addZValue()

Implemented in QgsLineStringV2, QgsPointV2, QgsCircularStringV2, QgsGeometryCollectionV2, QgsCurvePolygonV2, and QgsCompoundCurveV2.

◆ addZValue()

virtual bool QgsAbstractGeometryV2::addZValue ( double  zValue = 0)
pure virtual

Adds a z-dimension to the geometry, initialized to a preset value.

Parameters
zValueinitial z-value for all nodes
Returns
true on success
Note
added in QGIS 2.12
See also
dropZValue()
addMValue()

Implemented in QgsLineStringV2, QgsPointV2, QgsCircularStringV2, QgsGeometryCollectionV2, QgsCurvePolygonV2, and QgsCompoundCurveV2.

◆ area()

virtual double QgsAbstractGeometryV2::area ( ) const
inlinevirtual

Returns the area of the geometry.

See also
length()
perimeter()

Reimplemented in QgsGeometryCollectionV2, and QgsCurvePolygonV2.

Definition at line 296 of file qgsabstractgeometryv2.h.

◆ asGML2()

virtual QDomElement QgsAbstractGeometryV2::asGML2 ( QDomDocument doc,
int  precision = 17,
const QString ns = "gml" 
) const
pure virtual

Returns a GML2 representation of the geometry.

Parameters
docDOM document
precisionnumber of decimal places for coordinates
nsXML namespace
See also
asWkb
asWkt
asGML3
asJSON

Implemented in QgsPointV2, QgsLineStringV2, QgsGeometryCollectionV2, QgsCompoundCurveV2, QgsCircularStringV2, QgsCurvePolygonV2, QgsMultiCurveV2, QgsMultiLineStringV2, QgsMultiPointV2, QgsMultiPolygonV2, and QgsMultiSurfaceV2.

◆ asGML3()

virtual QDomElement QgsAbstractGeometryV2::asGML3 ( QDomDocument doc,
int  precision = 17,
const QString ns = "gml" 
) const
pure virtual

Returns a GML3 representation of the geometry.

Parameters
docDOM document
precisionnumber of decimal places for coordinates
nsXML namespace
See also
asWkb
asWkt
asGML2
asJSON

Implemented in QgsPointV2, QgsLineStringV2, QgsGeometryCollectionV2, QgsCompoundCurveV2, QgsCircularStringV2, QgsCurvePolygonV2, QgsMultiCurveV2, QgsMultiLineStringV2, QgsMultiPointV2, QgsMultiPolygonV2, and QgsMultiSurfaceV2.

◆ asJSON()

virtual QString QgsAbstractGeometryV2::asJSON ( int  precision = 17) const
pure virtual

Returns a GeoJSON representation of the geometry.

Parameters
precisionnumber of decimal places for coordinates
See also
asWkb
asWkt
asGML2
asGML3

Implemented in QgsPointV2, QgsLineStringV2, QgsGeometryCollectionV2, QgsCompoundCurveV2, QgsCircularStringV2, QgsCurvePolygonV2, QgsMultiCurveV2, QgsMultiLineStringV2, QgsMultiPointV2, QgsMultiPolygonV2, and QgsMultiSurfaceV2.

◆ asWkb()

virtual unsigned char* QgsAbstractGeometryV2::asWkb ( int &  binarySize) const
pure virtual

Returns a WKB representation of the geometry.

Parameters
binarySizewill be set to the size of the returned WKB string
See also
wkbSize
asWkt
asGML2
asGML3
asJSON

Implemented in QgsPointV2, QgsLineStringV2, QgsGeometryCollectionV2, QgsCompoundCurveV2, QgsCircularStringV2, QgsCurvePolygonV2, and QgsPolygonV2.

◆ asWkt()

virtual QString QgsAbstractGeometryV2::asWkt ( int  precision = 17) const
pure virtual

Returns a WKT representation of the geometry.

Parameters
precisionnumber of decimal places for coordinates
See also
asWkb
asGML2
asGML3
asJSON

Implemented in QgsPointV2, QgsLineStringV2, QgsGeometryCollectionV2, QgsCompoundCurveV2, QgsCircularStringV2, and QgsCurvePolygonV2.

◆ boundary()

virtual QgsAbstractGeometryV2* QgsAbstractGeometryV2::boundary ( ) const
pure virtual

Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the geometry).

For instance, a polygon geometry will have a boundary consisting of the linestrings for each ring in the polygon.

Returns
boundary for geometry. May be null for some geometry types.
Note
added in QGIS 2.18

Implemented in QgsPointV2, QgsCurveV2, QgsPolygonV2, QgsCurvePolygonV2, QgsGeometryCollectionV2, QgsMultiCurveV2, QgsMultiPolygonV2, QgsMultiPointV2, and QgsMultiSurfaceV2.

◆ boundingBox()

virtual QgsRectangle QgsAbstractGeometryV2::boundingBox ( ) const
pure virtual

Returns the minimal bounding box for the geometry.

Implemented in QgsPointV2, QgsCurveV2, QgsGeometryCollectionV2, and QgsSurfaceV2.

◆ calculateBoundingBox()

QgsRectangle QgsAbstractGeometryV2::calculateBoundingBox ( ) const
protectedvirtual

Default calculator for the minimal bounding box for the geometry.

Derived classes should override this method if a more efficient bounding box calculation is available.

Reimplemented in QgsLineStringV2, QgsGeometryCollectionV2, QgsCircularStringV2, QgsCurvePolygonV2, and QgsCompoundCurveV2.

Definition at line 111 of file qgsabstractgeometryv2.cpp.

◆ centroid()

QgsPointV2 QgsAbstractGeometryV2::centroid ( ) const
virtual

Returns the centroid of the geometry.

Reimplemented in QgsLineStringV2.

Definition at line 163 of file qgsabstractgeometryv2.cpp.

◆ clear()

virtual void QgsAbstractGeometryV2::clear ( )
pure virtual

Clears the geometry, ie reset it to a null geometry.

Implemented in QgsPointV2, QgsLineStringV2, QgsGeometryCollectionV2, QgsCompoundCurveV2, QgsCircularStringV2, QgsCurvePolygonV2, and QgsPolygonV2.

◆ clearCache()

virtual void QgsAbstractGeometryV2::clearCache ( ) const
inlineprotectedvirtual

Clears any cached parameters associated with the geometry, eg bounding boxes.

Reimplemented in QgsGeometryCollectionV2, QgsCurveV2, and QgsSurfaceV2.

Definition at line 393 of file qgsabstractgeometryv2.h.

◆ clone()

virtual QgsAbstractGeometryV2* QgsAbstractGeometryV2::clone ( ) const
pure virtual

◆ closestSegment()

virtual double QgsAbstractGeometryV2::closestSegment ( const QgsPointV2 pt,
QgsPointV2 segmentPt,
QgsVertexId vertexAfter,
bool *  leftOf,
double  epsilon 
) const
pure virtual

Searches for the closest segment of the geometry to a given point.

Parameters
ptspecifies the point to find closest segment to
segmentPtstorage for the closest point within the geometry
vertexAfterstorage for the ID of the vertex at the end of the closest segment
leftOfreturns whether the point lies on the left side of the nearest segment (true if point is to left of segment, false if point is to right of segment)
epsilonepsilon for segment snapping
Returns
squared distance to closest segment or negative value on error

Implemented in QgsLineStringV2, QgsPointV2, QgsCircularStringV2, QgsCompoundCurveV2, QgsCurvePolygonV2, and QgsGeometryCollectionV2.

◆ convertTo()

bool QgsAbstractGeometryV2::convertTo ( QgsWKBTypes::Type  type)
virtual

Converts the geometry to a specified type.

Returns
true if conversion was successful
Note
added in QGIS 2.14

Reimplemented in QgsLineStringV2, and QgsPointV2.

Definition at line 215 of file qgsabstractgeometryv2.cpp.

◆ coordinateSequence()

virtual QgsCoordinateSequenceV2 QgsAbstractGeometryV2::coordinateSequence ( ) const
pure virtual

Retrieves the sequence of geometries, rings and nodes.

Returns
coordinate sequence

Implemented in QgsPointV2, QgsCurvePolygonV2, QgsGeometryCollectionV2, and QgsCurveV2.

◆ deleteVertex()

virtual bool QgsAbstractGeometryV2::deleteVertex ( QgsVertexId  position)
pure virtual

Deletes a vertex within the geometry.

Parameters
positionvertex id for vertex to delete
Returns
true if delete was successful
See also
insertVertex
moveVertex

Implemented in QgsLineStringV2, QgsPointV2, QgsGeometryCollectionV2, QgsCircularStringV2, QgsCompoundCurveV2, and QgsCurvePolygonV2.

◆ dimension()

virtual int QgsAbstractGeometryV2::dimension ( ) const
pure virtual

Returns the inherent dimension of the geometry.

For example, this is 0 for a point geometry, 1 for a linestring and 2 for a polygon.

Implemented in QgsPointV2, QgsLineStringV2, QgsGeometryCollectionV2, QgsCompoundCurveV2, QgsCircularStringV2, and QgsCurvePolygonV2.

◆ draw()

virtual void QgsAbstractGeometryV2::draw ( QPainter p) const
pure virtual

Draws the geometry using the specified QPainter.

Parameters
pdestination QPainter

Implemented in QgsLineStringV2, QgsPointV2, QgsCircularStringV2, QgsCompoundCurveV2, QgsCurvePolygonV2, and QgsGeometryCollectionV2.

◆ dropMValue()

virtual bool QgsAbstractGeometryV2::dropMValue ( )
pure virtual

Drops any measure values which exist in the geometry.

Returns
true if m-values were present and have been removed
See also
addMValue()
dropZValue()
Note
added in QGIS 2.14

Implemented in QgsLineStringV2, QgsPointV2, QgsCircularStringV2, QgsGeometryCollectionV2, QgsCompoundCurveV2, and QgsCurvePolygonV2.

◆ dropZValue()

virtual bool QgsAbstractGeometryV2::dropZValue ( )
pure virtual

Drops any z-dimensions which exist in the geometry.

Returns
true if Z values were present and have been removed
See also
addZValue()
dropMValue()
Note
added in QGIS 2.14

Implemented in QgsLineStringV2, QgsPointV2, QgsCircularStringV2, QgsGeometryCollectionV2, QgsCompoundCurveV2, and QgsCurvePolygonV2.

◆ fromWkb()

virtual bool QgsAbstractGeometryV2::fromWkb ( QgsConstWkbPtr  wkb)
pure virtual

◆ fromWkt()

virtual bool QgsAbstractGeometryV2::fromWkt ( const QString wkt)
pure virtual

◆ geometryType()

virtual QString QgsAbstractGeometryV2::geometryType ( ) const
pure virtual

◆ hasCurvedSegments()

virtual bool QgsAbstractGeometryV2::hasCurvedSegments ( ) const
inlinevirtual

Returns true if the geometry contains curved segments.

Reimplemented in QgsCircularStringV2, QgsGeometryCollectionV2, QgsCompoundCurveV2, and QgsCurvePolygonV2.

Definition at line 307 of file qgsabstractgeometryv2.h.

◆ insertVertex()

virtual bool QgsAbstractGeometryV2::insertVertex ( QgsVertexId  position,
const QgsPointV2 vertex 
)
pure virtual

Inserts a vertex into the geometry.

Parameters
positionvertex id for position of inserted vertex
vertexvertex to insert
Returns
true if insert was successful
See also
moveVertex
deleteVertex

Implemented in QgsLineStringV2, QgsPointV2, QgsGeometryCollectionV2, QgsCircularStringV2, QgsCompoundCurveV2, and QgsCurvePolygonV2.

◆ is3D()

bool QgsAbstractGeometryV2::is3D ( ) const

Returns true if the geometry is 3D and contains a z-value.

See also
isMeasure

Definition at line 48 of file qgsabstractgeometryv2.cpp.

◆ isEmpty()

bool QgsAbstractGeometryV2::isEmpty ( ) const

Returns true if the geometry is empty.

Definition at line 246 of file qgsabstractgeometryv2.cpp.

◆ isMeasure()

bool QgsAbstractGeometryV2::isMeasure ( ) const

Returns true if the geometry contains m values.

See also
is3D

Definition at line 53 of file qgsabstractgeometryv2.cpp.

◆ length()

virtual double QgsAbstractGeometryV2::length ( ) const
inlinevirtual

Returns the length of the geometry.

See also
area()
perimeter()

Reimplemented in QgsLineStringV2, QgsGeometryCollectionV2, QgsCircularStringV2, and QgsCompoundCurveV2.

Definition at line 284 of file qgsabstractgeometryv2.h.

◆ moveVertex()

virtual bool QgsAbstractGeometryV2::moveVertex ( QgsVertexId  position,
const QgsPointV2 newPos 
)
pure virtual

Moves a vertex within the geometry.

Parameters
positionvertex id for vertex to move
newPosnew position of vertex
Returns
true if move was successful
See also
insertVertex
deleteVertex

Implemented in QgsLineStringV2, QgsPointV2, QgsGeometryCollectionV2, QgsCircularStringV2, QgsCompoundCurveV2, and QgsCurvePolygonV2.

◆ nCoordinates()

int QgsAbstractGeometryV2::nCoordinates ( ) const
virtual

Returns the number of nodes contained in the geometry.

Reimplemented in QgsPointV2, QgsLineStringV2, QgsCurvePolygonV2, QgsGeometryCollectionV2, and QgsMultiPointV2.

Definition at line 138 of file qgsabstractgeometryv2.cpp.

◆ nextVertex()

virtual bool QgsAbstractGeometryV2::nextVertex ( QgsVertexId id,
QgsPointV2 vertex 
) const
pure virtual

Returns next vertex id and coordinates.

Parameters
idinitial value should be the starting vertex id. The next vertex id will be stored in this variable if found.
vertexcontainer for found node
Returns
false if at end

Implemented in QgsPointV2, QgsCurvePolygonV2, QgsGeometryCollectionV2, and QgsCurveV2.

◆ operator=()

QgsAbstractGeometryV2 & QgsAbstractGeometryV2::operator= ( const QgsAbstractGeometryV2 geom)
virtual

Definition at line 38 of file qgsabstractgeometryv2.cpp.

◆ partCount()

virtual int QgsAbstractGeometryV2::partCount ( ) const
pure virtual

Returns count of parts contained in the geometry.

See also
vertexCount
ringCount

Implemented in QgsPointV2, QgsGeometryCollectionV2, QgsCurvePolygonV2, and QgsCurveV2.

◆ perimeter()

virtual double QgsAbstractGeometryV2::perimeter ( ) const
inlinevirtual

Returns the perimeter of the geometry.

See also
area()
length()

Reimplemented in QgsGeometryCollectionV2, and QgsCurvePolygonV2.

Definition at line 290 of file qgsabstractgeometryv2.h.

◆ ringCount()

virtual int QgsAbstractGeometryV2::ringCount ( int  part = 0) const
pure virtual

◆ segmentize()

QgsAbstractGeometryV2 * QgsAbstractGeometryV2::segmentize ( double  tolerance = M_PI / 180.,
SegmentationToleranceType  toleranceType = MaximumAngle 
) const
virtual

Returns a version of the geometry without curves.

Caller takes ownership of the returned geometry.

Parameters
tolerancesegmentation tolerance
toleranceTypemaximum segmentation angle or maximum difference between approximation and curve

Reimplemented in QgsGeometryCollectionV2, QgsCurveV2, and QgsCurvePolygonV2.

Definition at line 254 of file qgsabstractgeometryv2.cpp.

◆ setZMTypeFromSubGeometry()

void QgsAbstractGeometryV2::setZMTypeFromSubGeometry ( const QgsAbstractGeometryV2 subggeom,
QgsWKBTypes::Type  baseGeomType 
)
protected

Updates the geometry type based on whether sub geometries contain z or m values.

Definition at line 69 of file qgsabstractgeometryv2.cpp.

◆ toCurveType()

virtual QgsAbstractGeometryV2* QgsAbstractGeometryV2::toCurveType ( ) const
inlinevirtual

Returns the geometry converted to the more generic curve type.

E.g. QgsLineStringV2 -> QgsCompoundCurveV2, QgsPolygonV2 -> QgsCurvePolygonV2, QgsMultiLineStringV2 -> QgsMultiCurveV2, QgsMultiPolygonV2 -> QgsMultiSurfaceV2

Returns
the converted geometry. Caller takes ownership

Reimplemented in QgsLineStringV2, QgsPolygonV2, QgsMultiLineStringV2, and QgsMultiPolygonV2.

Definition at line 320 of file qgsabstractgeometryv2.h.

◆ transform() [1/2]

virtual void QgsAbstractGeometryV2::transform ( const QgsCoordinateTransform ct,
QgsCoordinateTransform::TransformDirection  d = QgsCoordinateTransform::ForwardTransform,
bool  transformZ = false 
)
pure virtual

Transforms the geometry using a coordinate transform.

Parameters
ctcoordinate transform
dtransformation direction
transformZset to true to also transform z coordinates. This requires that the z coordinates in the geometry represent height relative to the vertical datum of the source CRS (generally ellipsoidal heights) and are expressed in its vertical units (generally meters). If false, then z coordinates will not be changed by the transform.

Implemented in QgsLineStringV2, QgsPointV2, QgsCircularStringV2, QgsCompoundCurveV2, QgsCurvePolygonV2, and QgsGeometryCollectionV2.

◆ transform() [2/2]

virtual void QgsAbstractGeometryV2::transform ( const QTransform t)
pure virtual

Transforms the geometry using a QTransform object.

Parameters
tQTransform transformation

Implemented in QgsLineStringV2, QgsPointV2, QgsCircularStringV2, QgsCompoundCurveV2, QgsCurvePolygonV2, and QgsGeometryCollectionV2.

◆ vertexAngle()

virtual double QgsAbstractGeometryV2::vertexAngle ( QgsVertexId  vertex) const
pure virtual

Returns approximate angle at a vertex.

This is usually the average angle between adjacent segments, and can be pictured as the orientation of a line following the curvature of the geometry at the specified vertex.

Parameters
vertexthe vertex id
Returns
rotation in radians, clockwise from north

Implemented in QgsLineStringV2, QgsPointV2, QgsCircularStringV2, QgsGeometryCollectionV2, QgsCompoundCurveV2, and QgsCurvePolygonV2.

◆ vertexAt()

virtual QgsPointV2 QgsAbstractGeometryV2::vertexAt ( QgsVertexId  id) const
pure virtual

Returns the point corresponding to a specified vertex id.

Implemented in QgsPointV2, QgsGeometryCollectionV2, QgsCurvePolygonV2, and QgsCurveV2.

◆ vertexCount()

virtual int QgsAbstractGeometryV2::vertexCount ( int  part = 0,
int  ring = 0 
) const
pure virtual

◆ wkbSize()

virtual int QgsAbstractGeometryV2::wkbSize ( ) const
pure virtual

Returns the size of the WKB representation of the geometry.

See also
asWkb

Implemented in QgsPointV2, QgsLineStringV2, QgsGeometryCollectionV2, QgsCompoundCurveV2, QgsCircularStringV2, QgsCurvePolygonV2, and QgsPolygonV2.

◆ wkbType()

QgsWKBTypes::Type QgsAbstractGeometryV2::wkbType ( ) const
inline

Returns the WKB type of the geometry.

See also
geometryType
wktTypeStr

Definition at line 88 of file qgsabstractgeometryv2.h.

◆ wktTypeStr()

QString QgsAbstractGeometryV2::wktTypeStr ( ) const

Returns the WKT type string of the geometry.

See also
geometryType
wkbType

Definition at line 153 of file qgsabstractgeometryv2.cpp.

Member Data Documentation

◆ mWkbType

QgsWKBTypes::Type QgsAbstractGeometryV2::mWkbType
protected

Definition at line 380 of file qgsabstractgeometryv2.h.


The documentation for this class was generated from the following files: