QGIS API Documentation  2.18.3-Las Palmas (77b8c3d)
Public Member Functions | Protected Member Functions | List of all members
QgsMultiLineStringV2 Class Reference

Multi line string geometry collection. More...

#include <qgsmultilinestringv2.h>

Inheritance diagram for QgsMultiLineStringV2:
Inheritance graph
[legend]

Public Member Functions

 QgsMultiLineStringV2 ()
 
virtual bool addGeometry (QgsAbstractGeometryV2 *g) override
 Adds a geometry and takes ownership. More...
 
QDomElement asGML2 (QDomDocument &doc, int precision=17, const QString &ns="gml") const override
 Returns a GML2 representation of the geometry. More...
 
QDomElement asGML3 (QDomDocument &doc, int precision=17, const QString &ns="gml") const override
 Returns a GML3 representation of the geometry. More...
 
QString asJSON (int precision=17) const override
 Returns a GeoJSON representation of the geometry. More...
 
QgsMultiLineStringV2clone () const override
 Clones the geometry by performing a deep copy. More...
 
bool fromWkt (const QString &wkt) override
 Sets the geometry from a WKT string. More...
 
virtual QString geometryType () const override
 Returns a unique string representing the geometry type. More...
 
QgsAbstractGeometryV2toCurveType () const override
 Returns the geometry converted to the more generic curve type QgsMultiCurveV2. More...
 
- Public Member Functions inherited from QgsMultiCurveV2
 QgsMultiCurveV2 ()
 
virtual QgsAbstractGeometryV2boundary () const override
 Returns the closure of the combinatorial boundary of the geometry (ie the topological boundary of the geometry). More...
 
QgsMultiCurveV2reversed () const
 Returns a copy of the multi curve, where each component curve has had its line direction reversed. More...
 
- Public Member Functions inherited from QgsGeometryCollectionV2
 QgsGeometryCollectionV2 ()
 
 QgsGeometryCollectionV2 (const QgsGeometryCollectionV2 &c)
 
virtual ~QgsGeometryCollectionV2 ()
 
virtual bool addMValue (double mValue=0) override
 Adds a measure to the geometry, initialized to a preset value. More...
 
virtual bool addZValue (double zValue=0) override
 Adds a z-dimension to the geometry, initialized to a preset value. More...
 
virtual double area () const override
 Returns the area of the geometry. More...
 
unsigned char * asWkb (int &binarySize) const override
 Returns a WKB representation of the geometry. More...
 
QString asWkt (int precision=17) const override
 Returns a WKT representation of the geometry. More...
 
virtual QgsRectangle boundingBox () const override
 Returns the minimal bounding box for the geometry. More...
 
virtual void clear () override
 Clears the geometry, ie reset it to a null geometry. More...
 
virtual double closestSegment (const QgsPointV2 &pt, QgsPointV2 &segmentPt, QgsVertexId &vertexAfter, bool *leftOf, double epsilon) const override
 Searches for the closest segment of the geometry to a given point. More...
 
virtual QgsCoordinateSequenceV2 coordinateSequence () const override
 Retrieves the sequence of geometries, rings and nodes. More...
 
virtual bool deleteVertex (QgsVertexId position) override
 Deletes a vertex within the geometry. More...
 
virtual int dimension () const override
 Returns the inherent dimension of the geometry. More...
 
virtual void draw (QPainter &p) const override
 Draws the geometry using the specified QPainter. More...
 
virtual bool dropMValue () override
 Drops any measure values which exist in the geometry. More...
 
virtual bool dropZValue () override
 Drops any z-dimensions which exist in the geometry. More...
 
bool fromWkb (QgsConstWkbPtr wkb) override
 Sets the geometry from a WKB string. More...
 
const QgsAbstractGeometryV2geometryN (int n) const
 Returns a const reference to a geometry from within the collection. More...
 
QgsAbstractGeometryV2geometryN (int n)
 Returns a geometry from within the collection. More...
 
bool hasCurvedSegments () const override
 Returns true if the geometry contains curved segments. More...
 
virtual bool insertGeometry (QgsAbstractGeometryV2 *g, int index)
 Inserts a geometry before a specified index and takes ownership. More...
 
virtual bool insertVertex (QgsVertexId position, const QgsPointV2 &vertex) override
 Inserts a vertex into the geometry. More...
 
virtual double length () const override
 Returns the length of the geometry. More...
 
virtual bool moveVertex (QgsVertexId position, const QgsPointV2 &newPos) override
 Moves a vertex within the geometry. More...
 
virtual int nCoordinates () const override
 Returns the number of nodes contained in the geometry. More...
 
bool nextVertex (QgsVertexId &id, QgsPointV2 &vertex) const override
 Returns next vertex id and coordinates. More...
 
int numGeometries () const
 Returns the number of geometries within the collection. More...
 
QgsGeometryCollectionV2operator= (const QgsGeometryCollectionV2 &c)
 
virtual int partCount () const override
 Returns count of parts contained in the geometry. More...
 
virtual double perimeter () const override
 Returns the perimeter of the geometry. More...
 
virtual bool removeGeometry (int nr)
 Removes a geometry from the collection. More...
 
virtual int ringCount (int part=0) const override
 
QgsAbstractGeometryV2segmentize (double tolerance=M_PI_2/90, SegmentationToleranceType toleranceType=MaximumAngle) const override
 Returns a geometry without curves. More...
 
virtual void transform (const QgsCoordinateTransform &ct, QgsCoordinateTransform::TransformDirection d=QgsCoordinateTransform::ForwardTransform, bool transformZ=false) override
 Transforms the geometry using a coordinate transform. More...
 
void transform (const QTransform &t) override
 Transforms the geometry using a QTransform object. More...
 
double vertexAngle (QgsVertexId vertex) const override
 Returns approximate rotation angle for a vertex. More...
 
virtual QgsPointV2 vertexAt (QgsVertexId id) const override
 Returns the point corresponding to a specified vertex id. More...
 
virtual int vertexCount (int part=0, int ring=0) const override
 
int wkbSize () const override
 Returns the size of the WKB representation of the geometry. More...
 
- Public Member Functions inherited from QgsAbstractGeometryV2
 QgsAbstractGeometryV2 ()
 
 QgsAbstractGeometryV2 (const QgsAbstractGeometryV2 &geom)
 
virtual ~QgsAbstractGeometryV2 ()
 
virtual QgsPointV2 centroid () const
 Returns the centroid of the geometry. More...
 
virtual bool convertTo (QgsWKBTypes::Type type)
 Converts the geometry to a specified type. 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 QgsAbstractGeometryV2operator= (const QgsAbstractGeometryV2 &geom)
 
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 bool wktOmitChildType () const override
 Returns whether child type names are omitted from Wkt representations of the collection. More...
 
- Protected Member Functions inherited from QgsGeometryCollectionV2
virtual QgsRectangle calculateBoundingBox () const override
 Default calculator for the minimal bounding box for the geometry. More...
 
virtual void clearCache () const override
 Clears any cached parameters associated with the geometry, eg bounding boxes. More...
 
bool fromCollectionWkt (const QString &wkt, const QList< QgsAbstractGeometryV2 * > &subtypes, const QString &defaultChildWkbType=QString())
 Reads a collection from a WKT string. More...
 
- Protected Member Functions inherited from QgsAbstractGeometryV2
void setZMTypeFromSubGeometry (const QgsAbstractGeometryV2 *subggeom, QgsWKBTypes::Type baseGeomType)
 Updates the geometry type based on whether sub geometries contain z or m values. More...
 

Additional Inherited Members

- Public Types inherited from QgsAbstractGeometryV2
enum  SegmentationToleranceType { MaximumAngle = 0, MaximumDifference }
 Segmentation tolerance as maximum angle or maximum difference between approximation and circle. More...
 
- Protected Attributes inherited from QgsGeometryCollectionV2
QVector< QgsAbstractGeometryV2 * > mGeometries
 
- Protected Attributes inherited from QgsAbstractGeometryV2
QgsWKBTypes::Type mWkbType
 

Detailed Description

Multi line string geometry collection.

Note
added in QGIS 2.10
this API is not considered stable and may change for 2.12

Definition at line 27 of file qgsmultilinestringv2.h.

Constructor & Destructor Documentation

QgsMultiLineStringV2::QgsMultiLineStringV2 ( )

Definition at line 25 of file qgsmultilinestringv2.cpp.

Member Function Documentation

bool QgsMultiLineStringV2::addGeometry ( QgsAbstractGeometryV2 g)
overridevirtual

Adds a geometry and takes ownership.

Returns true in case of success

Reimplemented from QgsMultiCurveV2.

Definition at line 100 of file qgsmultilinestringv2.cpp.

QDomElement QgsMultiLineStringV2::asGML2 ( QDomDocument doc,
int  precision = 17,
const QString ns = "gml" 
) const
overridevirtual

Returns a GML2 representation of the geometry.

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

Reimplemented from QgsMultiCurveV2.

Definition at line 41 of file qgsmultilinestringv2.cpp.

QDomElement QgsMultiLineStringV2::asGML3 ( QDomDocument doc,
int  precision = 17,
const QString ns = "gml" 
) const
overridevirtual

Returns a GML3 representation of the geometry.

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

Reimplemented from QgsMultiCurveV2.

Definition at line 61 of file qgsmultilinestringv2.cpp.

QString QgsMultiLineStringV2::asJSON ( int  precision = 17) const
overridevirtual

Returns a GeoJSON representation of the geometry.

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

Reimplemented from QgsMultiCurveV2.

Definition at line 79 of file qgsmultilinestringv2.cpp.

QgsMultiLineStringV2 * QgsMultiLineStringV2::clone ( ) const
overridevirtual

Clones the geometry by performing a deep copy.

Reimplemented from QgsMultiCurveV2.

Definition at line 31 of file qgsmultilinestringv2.cpp.

bool QgsMultiLineStringV2::fromWkt ( const QString wkt)
overridevirtual

Sets the geometry from a WKT string.

See also
fromWkb

Reimplemented from QgsMultiCurveV2.

Definition at line 36 of file qgsmultilinestringv2.cpp.

virtual QString QgsMultiLineStringV2::geometryType ( ) const
inlineoverridevirtual

Returns a unique string representing the geometry type.

See also
wkbType
wktTypeStr

Reimplemented from QgsMultiCurveV2.

Definition at line 31 of file qgsmultilinestringv2.h.

QgsAbstractGeometryV2 * QgsMultiLineStringV2::toCurveType ( ) const
overridevirtual

Returns the geometry converted to the more generic curve type QgsMultiCurveV2.

Returns
the converted geometry. Caller takes ownership

Reimplemented from QgsAbstractGeometryV2.

Definition at line 112 of file qgsmultilinestringv2.cpp.

virtual bool QgsMultiLineStringV2::wktOmitChildType ( ) const
inlineoverrideprotectedvirtual

Returns whether child type names are omitted from Wkt representations of the collection.

Note
added in QGIS 2.12

Reimplemented from QgsGeometryCollectionV2.

Definition at line 52 of file qgsmultilinestringv2.h.


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