QGIS API Documentation
2.4.0-Chugiak
|
#include <qgsgeometry.h>
Classes | |
class | Error |
Public Member Functions | |
QgsGeometry () | |
Constructor. More... | |
QgsGeometry (const QgsGeometry &) | |
copy constructor will prompt a deep copy of the object More... | |
QgsGeometry & | operator= (QgsGeometry const &rhs) |
assignments will prompt a deep copy of the object More... | |
~QgsGeometry () | |
Destructor. More... | |
void | fromGeos (GEOSGeometry *geos) |
Set the geometry, feeding in a geometry in GEOS format. More... | |
void | fromWkb (unsigned char *wkb, size_t length) |
Set the geometry, feeding in the buffer containing OGC Well-Known Binary and the buffer's length. More... | |
const unsigned char * | asWkb () const |
Returns the buffer containing this geometry in WKB format. More... | |
size_t | wkbSize () const |
Returns the size of the WKB in asWkb(). More... | |
const GEOSGeometry * | asGeos () const |
Returns a geos geomtry. More... | |
QGis::WkbType | wkbType () const |
Returns type of wkb (point / linestring / polygon etc.) More... | |
QGis::GeometryType | type () |
Returns type of the vector. More... | |
bool | isMultipart () |
Returns true if wkb of the geometry is of WKBMulti* type. More... | |
bool | isGeosEqual (QgsGeometry &) |
compare geometries using GEOS More... | |
bool | isGeosValid () |
check validity using GEOS More... | |
bool | isGeosEmpty () |
check if geometry is empty using GEOS More... | |
double | area () |
get area of geometry using GEOS More... | |
double | length () |
get length of geometry using GEOS More... | |
double | distance (QgsGeometry &geom) |
QgsPoint | closestVertex (const QgsPoint &point, int &atVertex, int &beforeVertex, int &afterVertex, double &sqrDist) |
Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target point and the indices of the vertices before/after. More... | |
void | adjacentVertices (int atVertex, int &beforeVertex, int &afterVertex) |
Returns the indexes of the vertices before and after the given vertex index. More... | |
bool | insertVertex (double x, double y, int beforeVertex) |
Insert a new vertex before the given vertex index, ring and item (first number is index 0) If the requested vertex number (beforeVertex.back()) is greater than the last actual vertex on the requested ring and item, it is assumed that the vertex is to be appended instead of inserted. More... | |
bool | moveVertex (double x, double y, int atVertex) |
Moves the vertex at the given position number and item (first number is index 0) to the given coordinates. More... | |
bool | deleteVertex (int atVertex) |
Deletes the vertex at the given position number and item (first number is index 0) Returns false if atVertex does not correspond to a valid vertex on this geometry (including if this geometry is a Point), or if the number of remaining verticies in the linestring would be less than two. More... | |
QgsPoint | vertexAt (int atVertex) |
Returns coordinates of a vertex. More... | |
double | sqrDistToVertexAt (QgsPoint &point, int atVertex) |
Returns the squared cartesian distance between the given point to the given vertex index (vertex at the given position number, ring and item (first number is index 0)) More... | |
double | closestVertexWithContext (const QgsPoint &point, int &atVertex) |
Searches for the closest vertex in this geometry to the given point. More... | |
double | closestSegmentWithContext (const QgsPoint &point, QgsPoint &minDistPoint, int &afterVertex, double *leftOf=0, double epsilon=DEFAULT_SEGMENT_EPSILON) |
Searches for the closest segment of geometry to the given point. More... | |
int | addRing (const QList< QgsPoint > &ring) |
Adds a new ring to this geometry. More... | |
int | addPart (const QList< QgsPoint > &points, QGis::GeometryType geomType=QGis::UnknownGeometry) |
Adds a new island polygon to a multipolygon feature. More... | |
int | addPart (GEOSGeometry *newPart) |
Adds a new island polygon to a multipolygon feature. More... | |
int | addPart (QgsGeometry *newPart) |
Adds a new island polygon to a multipolygon feature. More... | |
int | translate (double dx, double dy) |
Translate this geometry by dx, dy. More... | |
int | transform (const QgsCoordinateTransform &ct) |
Transform this geometry as described by CoordinateTranasform ct. More... | |
int | splitGeometry (const QList< QgsPoint > &splitLine, QList< QgsGeometry * > &newGeometries, bool topological, QList< QgsPoint > &topologyTestPoints) |
Splits this geometry according to a given line. More... | |
int | reshapeGeometry (const QList< QgsPoint > &reshapeWithLine) |
Replaces a part of this geometry with another line. More... | |
int | makeDifference (QgsGeometry *other) |
Changes this geometry such that it does not intersect the other geometry. More... | |
QgsRectangle | boundingBox () |
Returns the bounding box of this feature. More... | |
bool | intersects (const QgsRectangle &r) const |
Test for intersection with a rectangle (uses GEOS) More... | |
bool | intersects (const QgsGeometry *geometry) const |
Test for intersection with a geometry (uses GEOS) More... | |
bool | contains (const QgsPoint *p) const |
Test for containment of a point (uses GEOS) More... | |
bool | contains (const QgsGeometry *geometry) const |
Test for if geometry is contained in another (uses GEOS) More... | |
bool | disjoint (const QgsGeometry *geometry) const |
Test for if geometry is disjoint of another (uses GEOS) More... | |
bool | equals (const QgsGeometry *geometry) const |
Test for if geometry equals another (uses GEOS) More... | |
bool | touches (const QgsGeometry *geometry) const |
Test for if geometry touch another (uses GEOS) More... | |
bool | overlaps (const QgsGeometry *geometry) const |
Test for if geometry overlaps another (uses GEOS) More... | |
bool | within (const QgsGeometry *geometry) const |
Test for if geometry is within another (uses GEOS) More... | |
bool | crosses (const QgsGeometry *geometry) const |
Test for if geometry crosses another (uses GEOS) More... | |
QgsGeometry * | buffer (double distance, int segments) |
Returns a buffer region around this geometry having the given width and with a specified number of segments used to approximate curves. More... | |
QgsGeometry * | buffer (double distance, int segments, int endCapStyle, int joinStyle, double mitreLimit) |
Returns a buffer region around the geometry, with additional style options. More... | |
QgsGeometry * | offsetCurve (double distance, int segments, int joinStyle, double mitreLimit) |
Returns an offset line at a given distance and side from an input line. More... | |
QgsGeometry * | simplify (double tolerance) |
Returns a simplified version of this geometry using a specified tolerance value. More... | |
QgsGeometry * | centroid () |
Returns the center of mass of a geometry. More... | |
QgsGeometry * | pointOnSurface () |
Returns a point within a geometry. More... | |
QgsGeometry * | convexHull () |
Returns the smallest convex polygon that contains all the points in the geometry. More... | |
QgsGeometry * | interpolate (double distance) |
QgsGeometry * | intersection (QgsGeometry *geometry) |
Returns a geometry representing the points shared by this geometry and other. More... | |
QgsGeometry * | combine (QgsGeometry *geometry) |
Returns a geometry representing all the points in this geometry and other (a union geometry operation). More... | |
QgsGeometry * | difference (QgsGeometry *geometry) |
Returns a geometry representing the points making up this geometry that do not make up other. More... | |
QgsGeometry * | symDifference (QgsGeometry *geometry) |
Returns a Geometry representing the points making up this Geometry that do not make up other. More... | |
QString | exportToWkt () const |
Exports the geometry to mWkt. More... | |
QString | exportToGeoJSON () const |
Exports the geometry to mGeoJSON. More... | |
QgsGeometry * | convertToType (QGis::GeometryType destType, bool destMultipart=false) |
try to convert the geometry to the requested type More... | |
QgsPoint | asPoint () const |
return contents of the geometry as a point if wkbType is WKBPoint, otherwise returns [0,0] More... | |
QgsPolyline | asPolyline () const |
return contents of the geometry as a polyline if wkbType is WKBLineString, otherwise an empty list More... | |
QgsPolygon | asPolygon () const |
return contents of the geometry as a polygon if wkbType is WKBPolygon, otherwise an empty list More... | |
QgsMultiPoint | asMultiPoint () const |
return contents of the geometry as a multi point if wkbType is WKBMultiPoint, otherwise an empty list More... | |
QgsMultiPolyline | asMultiPolyline () const |
return contents of the geometry as a multi linestring if wkbType is WKBMultiLineString, otherwise an empty list More... | |
QgsMultiPolygon | asMultiPolygon () const |
return contents of the geometry as a multi polygon if wkbType is WKBMultiPolygon, otherwise an empty list More... | |
QList< QgsGeometry * > | asGeometryCollection () const |
return contents of the geometry as a list of geometries More... | |
bool | deleteRing (int ringNum, int partNum=0) |
delete a ring in polygon or multipolygon. More... | |
bool | deletePart (int partNum) |
delete part identified by the part number More... | |
bool | convertToMultiType () |
Converts single type geometry into multitype geometry e.g. More... | |
int | avoidIntersections (QMap< QgsVectorLayer *, QSet< QgsFeatureId > > ignoreFeatures=(QMap< QgsVectorLayer *, QSet< QgsFeatureId > >())) |
Modifies geometry to avoid intersections with the layers specified in project properties. More... | |
void | validateGeometry (QList< Error > &errors) |
Validate geometry and produce a list of geometry errors. More... | |
Static Public Member Functions | |
static QgsGeometry * | fromWkt (QString wkt) |
static method that creates geometry from Wkt More... | |
static QgsGeometry * | fromPoint (const QgsPoint &point) |
construct geometry from a point More... | |
static QgsGeometry * | fromMultiPoint (const QgsMultiPoint &multipoint) |
construct geometry from a multipoint More... | |
static QgsGeometry * | fromPolyline (const QgsPolyline &polyline) |
construct geometry from a polyline More... | |
static QgsGeometry * | fromMultiPolyline (const QgsMultiPolyline &multiline) |
construct geometry from a multipolyline More... | |
static QgsGeometry * | fromPolygon (const QgsPolygon &polygon) |
construct geometry from a polygon More... | |
static QgsGeometry * | fromMultiPolygon (const QgsMultiPolygon &multipoly) |
construct geometry from a multipolygon More... | |
static QgsGeometry * | fromRect (const QgsRectangle &rect) |
construct geometry from a rectangle More... | |
static QgsGeometry * | unaryUnion (const QList< QgsGeometry * > &geometryList) |
compute the unary union on a list of geometries. More... | |
Private Member Functions | |
bool | exportWkbToGeos () const |
Converts from the WKB geometry to the GEOS geometry. More... | |
bool | exportGeosToWkb () const |
Converts from the GEOS geometry to the WKB geometry. More... | |
bool | insertVertex (double x, double y, int beforeVertex, const GEOSCoordSequence *old_sequence, GEOSCoordSequence **new_sequence) |
Insert a new vertex before the given vertex index (first number is index 0) in the given GEOS Coordinate Sequence. More... | |
void | translateVertex (QgsWkbPtr &wkbPtr, double dx, double dy, bool hasZValue) |
Translates a single vertex by dx and dy. More... | |
void | transformVertex (QgsWkbPtr &wkbPtr, const QgsCoordinateTransform &ct, bool hasZValue) |
Transforms a single vertex by ct. More... | |
int | splitLinearGeometry (GEOSGeometry *splitLine, QList< QgsGeometry * > &newGeometries) |
Splits line/multiline geometries. More... | |
int | splitPolygonGeometry (GEOSGeometry *splitLine, QList< QgsGeometry * > &newGeometries) |
Splits polygon/multipolygon geometries. More... | |
GEOSGeometry * | linePointDifference (GEOSGeometry *GEOSsplitPoint) |
Splits line/multiline geometries following a single point. More... | |
int | topologicalTestPointsSplit (const GEOSGeometry *splitLine, QList< QgsPoint > &testPoints) const |
Finds out the points that need to be tested for topological correctnes if this geometry will be split. More... | |
int | numberOfGeometries (GEOSGeometry *g) const |
Returns number of single geometry in a geos geometry. More... | |
int | mergeGeometriesMultiTypeSplit (QVector< GEOSGeometry * > &splitResult) |
QgsPoint | asPoint (QgsConstWkbPtr &wkbPtr, bool hasZValue) const |
return point from wkb More... | |
QgsPolyline | asPolyline (QgsConstWkbPtr &wkbPtr, bool hasZValue) const |
return polyline from wkb More... | |
QgsPolygon | asPolygon (QgsConstWkbPtr &wkbPtr, bool hasZValue) const |
return polygon from wkb More... | |
double | leftOf (double x, double y, double &x1, double &y1, double &x2, double &y2) |
Returns < 0 if point(x/y) is left of the line x1,y1 -> x1,y2. More... | |
QgsGeometry * | convertToPoint (bool destMultipart) |
try to convert the geometry to a point More... | |
QgsGeometry * | convertToLine (bool destMultipart) |
try to convert the geometry to a line More... | |
QgsGeometry * | convertToPolygon (bool destMultipart) |
try to convert the geometry to a polygon More... | |
Static Private Member Functions | |
static GEOSGeometry * | reshapeLine (const GEOSGeometry *origLine, const GEOSGeometry *reshapeLineGeos) |
Creates a new line from an original line and a reshape line. More... | |
static GEOSGeometry * | reshapePolygon (const GEOSGeometry *polygon, const GEOSGeometry *reshapeLineGeos) |
Creates a new polygon replacing the part from the first to the second intersection with the reshape line. More... | |
static GEOSGeometry * | nodeGeometries (const GEOSGeometry *splitLine, const GEOSGeometry *poly) |
Nodes together a split line and a (multi-) polygon geometry in a multilinestring. More... | |
static int | lineContainedInLine (const GEOSGeometry *line1, const GEOSGeometry *line2) |
Tests if line1 is completely contained in line2. More... | |
static int | pointContainedInLine (const GEOSGeometry *point, const GEOSGeometry *line) |
Tests if a point is on a line. More... | |
static int | geomDigits (const GEOSGeometry *geom) |
Determines the maximum number of digits before the dot. More... | |
static bool | geosRelOp (char(*op)(const GEOSGeometry *, const GEOSGeometry *), const QgsGeometry *a, const QgsGeometry *b) |
static bool | moveVertex (QgsWkbPtr &wkbPtr, const double &x, const double &y, int atVertex, bool hasZValue, int &pointIndex, bool isRing) |
static int | deleteVertex (QgsConstWkbPtr &srcPtr, QgsWkbPtr &dstPtr, int atVertex, bool hasZValue, int &pointIndex, bool isRing, bool lastItem) |
static bool | insertVertex (QgsConstWkbPtr &srcPtr, QgsWkbPtr &dstPtr, int beforeVertex, const double &x, const double &y, bool hasZValue, int &pointIndex, bool isRing) |
Private Attributes | |
unsigned char * | mGeometry |
pointer to geometry in binary WKB format This is the class' native implementation More... | |
size_t | mGeometrySize |
size of geometry More... | |
GEOSGeometry * | mGeos |
cached GEOS version of this geometry More... | |
bool | mDirtyWkb |
If the geometry has been set since the last conversion to WKB. More... | |
bool | mDirtyGeos |
If the geometry has been set since the last conversion to GEOS. More... | |
Definition at line 74 of file qgsgeometry.h.
QgsGeometry::QgsGeometry | ( | ) |
Constructor.
Definition at line 191 of file qgsgeometry.cpp.
Referenced by asGeometryCollection(), combine(), convertToLine(), convertToPoint(), convertToPolygon(), and unaryUnion().
QgsGeometry::QgsGeometry | ( | const QgsGeometry & | rhs | ) |
copy constructor will prompt a deep copy of the object
Definition at line 200 of file qgsgeometry.cpp.
References mGeometry, mGeometrySize, and mGeos.
QgsGeometry::~QgsGeometry | ( | ) |
int QgsGeometry::addPart | ( | const QList< QgsPoint > & | points, |
QGis::GeometryType | geomType = QGis::UnknownGeometry |
||
) |
Adds a new island polygon to a multipolygon feature.
Definition at line 2511 of file qgsgeometry.cpp.
References createGeosLinearRing(), createGeosLineString(), createGeosPoint(), createGeosPolygon(), fromGeos(), QGis::Line, QgsMessageLog::logMessage(), QGis::Point, QGis::Polygon, QgsDebugMsg, tr, type(), QGis::UnknownGeometry, and GEOSException::what().
Referenced by QgsVectorLayerEditUtils::addPart(), addPart(), and QgsVectorLayerEditUtils::splitParts().
int QgsGeometry::addPart | ( | GEOSGeometry * | newPart | ) |
Adds a new island polygon to a multipolygon feature.
Definition at line 2618 of file qgsgeometry.cpp.
References convertToMultiType(), createGeosCollection(), exportWkbToGeos(), isMultipart(), QgsMessageLog::logMessage(), mDirtyGeos, mDirtyWkb, mGeos, QGis::Polygon, QgsDebugMsg, tr, type(), and GEOSException::what().
int QgsGeometry::addPart | ( | QgsGeometry * | newPart | ) |
Adds a new island polygon to a multipolygon feature.
Definition at line 2609 of file qgsgeometry.cpp.
int QgsGeometry::addRing | ( | const QList< QgsPoint > & | ring | ) |
Adds a new ring to this geometry.
This makes only sense for polygon and multipolygons.
Definition at line 2313 of file qgsgeometry.cpp.
References createGeosCollection(), createGeosLinearRing(), createGeosPolygon(), exportWkbToGeos(), QgsMessageLog::logMessage(), mDirtyGeos, mDirtyWkb, mGeos, QGis::Polygon, throwGEOSException(), tr, type(), GEOSException::what(), QGis::WKBMultiPolygon, QGis::WKBPolygon, and wkbType().
Referenced by QgsVectorLayerEditUtils::addRing().
void QgsGeometry::adjacentVertices | ( | int | atVertex, |
int & | beforeVertex, | ||
int & | afterVertex | ||
) |
Returns the indexes of the vertices before and after the given vertex index.
This function takes into account the following factors:
Definition at line 949 of file qgsgeometry.cpp.
References exportGeosToWkb(), index, mDirtyWkb, mGeometry, QgsDebugMsg, QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPolygon, QGis::WKBPolygon25D, and wkbType().
double QgsGeometry::area | ( | ) |
get area of geometry using GEOS
Definition at line 5598 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), mDirtyGeos, and mGeos.
Referenced by QgsPalLayerSettings::checkMinimumSizeMM(), and QgsZonalStatistics::statisticsFromPreciseIntersection().
QList< QgsGeometry * > QgsGeometry::asGeometryCollection | ( | ) | const |
return contents of the geometry as a list of geometries
Definition at line 5891 of file qgsgeometry.cpp.
References exportWkbToGeos(), fromGeosGeom(), mDirtyGeos, mGeos, QgsDebugMsg, and QgsGeometry().
Referenced by QgsGeometryAnalyzer::addEventLayerFeature(), and QgsGeometryAnalyzer::createOffsetGeometry().
const GEOSGeometry * QgsGeometry::asGeos | ( | ) | const |
Returns a geos geomtry.
QgsGeometry keeps ownership, don't delete the returned object!
Definition at line 615 of file qgsgeometry.cpp.
References exportWkbToGeos(), mDirtyGeos, and mGeos.
Referenced by addPart(), avoidIntersections(), isGeosEmpty(), isGeosValid(), linePointDifference(), QgsPalLabeling::registerDiagramFeature(), QgsPalLayerSettings::registerFeature(), QgsGeometryValidator::run(), QgsZonalStatistics::statisticsFromMiddlePointTest(), and unaryUnion().
QgsMultiPoint QgsGeometry::asMultiPoint | ( | ) | const |
return contents of the geometry as a multi point if wkbType is WKBMultiPoint, otherwise an empty list
Definition at line 5534 of file qgsgeometry.cpp.
References asPoint(), mGeometry, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, and wkbType().
Referenced by QgsRubberBand::addGeometry(), convertToLine(), convertToPoint(), convertToPolygon(), deletePart(), and QgsHighlight::paint().
QgsMultiPolygon QgsGeometry::asMultiPolygon | ( | ) | const |
return contents of the geometry as a multi polygon if wkbType is WKBMultiPolygon, otherwise an empty list
Definition at line 5577 of file qgsgeometry.cpp.
References asPolygon(), mGeometry, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, and wkbType().
Referenced by QgsRubberBand::addGeometry(), QgsVectorLayerEditUtils::addTopologicalPoints(), QgsTransectSample::clipBufferLine(), convertToLine(), convertToPoint(), convertToPolygon(), deletePart(), deleteRing(), offsetLine(), QgsHighlight::paint(), QgsGeometryAnalyzer::perimeterMeasure(), QgsGeometryValidator::run(), and QgsInvertedPolygonRenderer::stopRender().
QgsMultiPolyline QgsGeometry::asMultiPolyline | ( | ) | const |
return contents of the geometry as a multi linestring if wkbType is WKBMultiLineString, otherwise an empty list
Definition at line 5556 of file qgsgeometry.cpp.
References asPolyline(), mGeometry, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, and wkbType().
Referenced by QgsRubberBand::addGeometry(), QgsVectorLayerEditUtils::addTopologicalPoints(), QgsTransectSample::closestMultilineElement(), convertToLine(), convertToPoint(), convertToPolygon(), deletePart(), linePointDifference(), offsetLine(), QgsHighlight::paint(), and QgsGeometryValidator::run().
QgsPoint QgsGeometry::asPoint | ( | ) | const |
return contents of the geometry as a point if wkbType is WKBPoint, otherwise returns [0,0]
Definition at line 5504 of file qgsgeometry.cpp.
References mGeometry, QGis::WKBPoint, QGis::WKBPoint25D, and wkbType().
Referenced by QgsRubberBand::addGeometry(), asMultiPoint(), convertToPoint(), QgsTransectSample::createSample(), QgsMapToolIdentify::featureDerivedAttributes(), linePointDifference(), QgsHighlight::paint(), QgsSymbolLayerV2Utils::polygonPointOnSurface(), QgsPointDisplacementRenderer::renderFeature(), QgsGeometryAnalyzer::simpleMeasure(), and QgsMapCanvasSnapper::snapToBackgroundLayers().
|
private |
return point from wkb
Definition at line 5433 of file qgsgeometry.cpp.
QgsPolygon QgsGeometry::asPolygon | ( | ) | const |
return contents of the geometry as a polygon if wkbType is WKBPolygon, otherwise an empty list
Definition at line 5524 of file qgsgeometry.cpp.
References mGeometry, QGis::WKBPolygon, QGis::WKBPolygon25D, and wkbType().
Referenced by QgsRubberBand::addGeometry(), QgsVectorLayerEditUtils::addTopologicalPoints(), asMultiPolygon(), QgsTransectSample::clipBufferLine(), convertToLine(), convertToPoint(), convertToPolygon(), deleteRing(), offsetLine(), QgsHighlight::paint(), QgsGeometryAnalyzer::perimeterMeasure(), QgsGeometryValidator::run(), and QgsInvertedPolygonRenderer::stopRender().
|
private |
return polygon from wkb
Definition at line 5468 of file qgsgeometry.cpp.
QgsPolyline QgsGeometry::asPolyline | ( | ) | const |
return contents of the geometry as a polyline if wkbType is WKBLineString, otherwise an empty list
Definition at line 5514 of file qgsgeometry.cpp.
References mGeometry, QGis::WKBLineString, QGis::WKBLineString25D, and wkbType().
Referenced by QgsRubberBand::addGeometry(), QgsVectorLayerEditUtils::addTopologicalPoints(), asMultiPolyline(), QgsTransectSample::closestSegmentPoints(), convertToLine(), convertToPoint(), convertToPolygon(), QgsMapToolIdentify::featureDerivedAttributes(), linePointDifference(), offsetLine(), QgsHighlight::paint(), and QgsGeometryValidator::run().
|
private |
return polyline from wkb
Definition at line 5445 of file qgsgeometry.cpp.
const unsigned char * QgsGeometry::asWkb | ( | ) | const |
Returns the buffer containing this geometry in WKB format.
You may wish to use in conjunction with wkbSize().
Definition at line 599 of file qgsgeometry.cpp.
References exportGeosToWkb(), mDirtyWkb, and mGeometry.
Referenced by QgsInterpolator::addVerticesToCache(), QgsVectorFileWriter::createFeature(), QgsGeometryAnalyzer::dissolveFeature(), QgsPointDisplacementRenderer::drawGroup(), QgsOgcUtils::geometryToGML(), QgsTINInterpolator::insertData(), QgsLabel::labelPoint(), QgsGeometryAnalyzer::locateAlongMeasure(), QgsGeometryAnalyzer::locateBetweenMeasures(), QgsDistanceArea::measure(), QgsDistanceArea::measurePerimeter(), QgsFeatureRendererV2::renderFeatureWithSymbol(), QgsMapToPixelSimplifier::simplify(), QgsTopologyPreservingSimplifier::simplifyGeometry(), QgsMapToPixelSimplifier::simplifyGeometry(), and wkbType().
int QgsGeometry::avoidIntersections | ( | QMap< QgsVectorLayer *, QSet< QgsFeatureId > > | ignoreFeatures = ( QMap<QgsVectorLayer*, QSet<QgsFeatureId> >() ) | ) |
Modifies geometry to avoid intersections with the layers specified in project properties.
ignoreFeatures | possibility to give a list of features where intersections should be ignored (not available in python bindings) |
Definition at line 6064 of file qgsgeometry.cpp.
References _makeUnion(), asGeos(), boundingBox(), QgsFeatureRequest::ExactIntersect, fromGeos(), QgsFeature::geometry(), QgsVectorLayer::getFeatures(), QgsFeature::id(), QgsMapLayerRegistry::instance(), QgsProject::instance(), QgsMessageLog::logMessage(), QgsMapLayerRegistry::mapLayer(), QgsFeatureIterator::nextFeature(), QGis::Polygon, QgsProject::readListEntry(), tr, type(), GEOSException::what(), and wkbType().
QgsRectangle QgsGeometry::boundingBox | ( | ) |
Returns the bounding box of this feature.
Definition at line 3180 of file qgsgeometry.cpp.
References exportGeosToWkb(), MathUtils::max(), mDirtyWkb, mGeometry, QgsDebugMsg, QgsRectangle::setMinimal(), QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, and wkbType().
Referenced by QgsPointSample::addSamplePoints(), avoidIntersections(), QgsVectorLayer::boundingBoxOfSelected(), QgsGml::calculateExtentFromFeatures(), QgsZonalStatistics::calculateStatistics(), QgsVectorLayer::extent(), fcnBounds(), fcnBoundsHeight(), fcnBoundsWidth(), fcnXMax(), fcnXMin(), fcnYMax(), fcnYMin(), QgsSpatialIndex::featureInfo(), QgsOverlayAnalyzer::intersectFeature(), QgsTransectSample::otherTransectWithinDistance(), QgsVectorLayer::removePolygonIntersections(), QgsMapToPixelSimplifier::simplifyGeometry(), QgsVectorLayer::snapWithContext(), and QgsHighlight::updateRect().
QgsGeometry * QgsGeometry::buffer | ( | double | distance, |
int | segments | ||
) |
Returns a buffer region around this geometry having the given width and with a specified number of segments used to approximate curves.
Definition at line 5659 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), fromGeosGeom(), mDirtyGeos, and mGeos.
Referenced by QgsGeometryAnalyzer::bufferFeature(), QgsTransectSample::clipBufferLine(), fcnBuffer(), offsetLine(), QgsTransectSample::otherTransectWithinDistance(), and QgsPalLayerSettings::registerFeature().
QgsGeometry * QgsGeometry::buffer | ( | double | distance, |
int | segments, | ||
int | endCapStyle, | ||
int | joinStyle, | ||
double | mitreLimit | ||
) |
Returns a buffer region around the geometry, with additional style options.
distance | buffer distance |
segments | For round joins, number of segments to approximate quarter-circle |
endCapStyle | Round (1) / Flat (2) / Square (3) end cap style |
joinStyle | Round (1) / Mitre (2) / Bevel (3) join style |
mitreLimit | Limit on the mitre ratio used for very sharp corners |
Definition at line 5674 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), fromGeosGeom(), mDirtyGeos, and mGeos.
QgsGeometry * QgsGeometry::centroid | ( | ) |
Returns the center of mass of a geometry.
Definition at line 5729 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), fromGeosGeom(), mDirtyGeos, and mGeos.
Referenced by QgsGeometryAnalyzer::centroidFeature(), and fcnCentroid().
double QgsGeometry::closestSegmentWithContext | ( | const QgsPoint & | point, |
QgsPoint & | minDistPoint, | ||
int & | afterVertex, | ||
double * | leftOf = 0 , |
||
double | epsilon = DEFAULT_SEGMENT_EPSILON |
||
) |
Searches for the closest segment of geometry to the given point.
point | Specifies the point for search |
minDistPoint | Receives the nearest point on the segment |
afterVertex | Receives index of the vertex after the closest segment. The vertex before the closest segment is always afterVertex - 1 |
leftOf | Out: Returns if the point lies on the left of right side of the segment ( < 0 means left, > 0 means right ) |
epsilon | epsilon for segment snapping (added in 1.8) |
Definition at line 2087 of file qgsgeometry.cpp.
References exportGeosToWkb(), index, leftOf(), MathUtils::max(), mDirtyWkb, mGeometry, QgsDebugMsg, QgsPoint::sqrDistToSegment(), QgsPoint::toString(), QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, wkbType(), QGis::WKBUnknown, QgsPoint::x(), and QgsPoint::y().
Referenced by QgsGeometryAnalyzer::createPointOffset(), QgsTransectSample::createSample(), and QgsVectorLayer::snapToGeometry().
QgsPoint QgsGeometry::closestVertex | ( | const QgsPoint & | point, |
int & | atVertex, | ||
int & | beforeVertex, | ||
int & | afterVertex, | ||
double & | sqrDist | ||
) |
Returns the vertex closest to the given point, the corresponding vertex index, squared distance snap point / target point and the indices of the vertices before/after.
The vertices before/after are -1 if not present
Definition at line 706 of file qgsgeometry.cpp.
References exportGeosToWkb(), index, MathUtils::max(), mDirtyWkb, mGeometry, QgsDebugMsg, QgsPoint::set(), QgsPoint::sqrDist(), QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, and wkbType().
Referenced by QgsVectorLayer::snapToGeometry().
double QgsGeometry::closestVertexWithContext | ( | const QgsPoint & | point, |
int & | atVertex | ||
) |
Searches for the closest vertex in this geometry to the given point.
point | Specifiest the point for search |
atVertex | Receives index of the closest vertex |
Definition at line 2037 of file qgsgeometry.cpp.
References exportWkbToGeos(), QgsMessageLog::logMessage(), MathUtils::max(), mDirtyGeos, mGeos, QgsPoint::sqrDist(), tr, and GEOSException::what().
QgsGeometry * QgsGeometry::combine | ( | QgsGeometry * | geometry | ) |
Returns a geometry representing all the points in this geometry and other (a union geometry operation).
Definition at line 5815 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), fromGeosGeom(), QGis::Line, mDirtyGeos, mGeos, QgsGeometry(), and type().
Referenced by QgsGeometryAnalyzer::bufferFeature(), QgsGeometryAnalyzer::convexFeature(), QgsGeometryAnalyzer::dissolveFeature(), and fcnCombine().
bool QgsGeometry::contains | ( | const QgsPoint * | p | ) | const |
Test for containment of a point (uses GEOS)
Definition at line 3443 of file qgsgeometry.cpp.
References createGeosPoint(), exportWkbToGeos(), QgsMessageLog::logMessage(), mGeos, QgsDebugMsg, tr, and GEOSException::what().
Referenced by fcnContains(), and QgsPalLayerSettings::registerFeature().
bool QgsGeometry::contains | ( | const QgsGeometry * | geometry | ) | const |
Test for if geometry is contained in another (uses GEOS)
Definition at line 3504 of file qgsgeometry.cpp.
References geosRelOp().
|
private |
try to convert the geometry to a line
Definition at line 6291 of file qgsgeometry.cpp.
References asMultiPoint(), asMultiPolygon(), asMultiPolyline(), asPolygon(), asPolyline(), fromMultiPolyline(), fromPolyline(), isMultipart(), QGis::Line, QGis::Point, QGis::Polygon, QgsGeometry(), and type().
Referenced by convertToType().
bool QgsGeometry::convertToMultiType | ( | ) |
Converts single type geometry into multitype geometry e.g.
a polygon into a multipolygon geometry with one polygon
Definition at line 4535 of file qgsgeometry.cpp.
References QgsApplication::endian(), exportGeosToWkb(), mDirtyGeos, mDirtyWkb, mGeometry, mGeometrySize, QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, wkbType(), and QGis::WKBUnknown.
Referenced by addPart(), QgsVectorFileWriter::createFeature(), and makeDifference().
|
private |
try to convert the geometry to a point
Definition at line 6199 of file qgsgeometry.cpp.
References asMultiPoint(), asMultiPolygon(), asMultiPolyline(), asPoint(), asPolygon(), asPolyline(), fromMultiPoint(), fromPoint(), isMultipart(), QGis::Line, QGis::Point, QGis::Polygon, QgsGeometry(), and type().
Referenced by convertToType().
|
private |
try to convert the geometry to a polygon
Definition at line 6398 of file qgsgeometry.cpp.
References asMultiPoint(), asMultiPolygon(), asMultiPolyline(), asPolygon(), asPolyline(), fromMultiPolygon(), fromPolygon(), isMultipart(), QGis::Line, QGis::Point, QGis::Polygon, QgsGeometry(), and type().
Referenced by convertToType().
QgsGeometry * QgsGeometry::convertToType | ( | QGis::GeometryType | destType, |
bool | destMultipart = false |
||
) |
try to convert the geometry to the requested type
destType | the geometry type to be converted to |
destMultipart | determines if the output geometry will be multipart or not |
Definition at line 4517 of file qgsgeometry.cpp.
References convertToLine(), convertToPoint(), convertToPolygon(), QGis::Line, QGis::Point, and QGis::Polygon.
QgsGeometry * QgsGeometry::convexHull | ( | ) |
Returns the smallest convex polygon that contains all the points in the geometry.
Definition at line 5759 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), fromGeosGeom(), mDirtyGeos, and mGeos.
Referenced by QgsGeometryAnalyzer::convexFeature(), QgsGeometryAnalyzer::convexHull(), and fcnConvexHull().
bool QgsGeometry::crosses | ( | const QgsGeometry * | geometry | ) | const |
Test for if geometry crosses another (uses GEOS)
Definition at line 3534 of file qgsgeometry.cpp.
References geosRelOp().
Referenced by fcnCrosses().
bool QgsGeometry::deletePart | ( | int | partNum | ) |
delete part identified by the part number
Definition at line 5975 of file qgsgeometry.cpp.
References asMultiPoint(), asMultiPolygon(), asMultiPolyline(), fromMultiPoint(), fromMultiPolygon(), fromMultiPolyline(), QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, and wkbType().
bool QgsGeometry::deleteRing | ( | int | ringNum, |
int | partNum = 0 |
||
) |
delete a ring in polygon or multipolygon.
Ring 0 is outer ring and can't be deleted.
Definition at line 5926 of file qgsgeometry.cpp.
References asMultiPolygon(), asPolygon(), fromMultiPolygon(), fromPolygon(), QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPolygon, QGis::WKBPolygon25D, and wkbType().
bool QgsGeometry::deleteVertex | ( | int | atVertex | ) |
Deletes the vertex at the given position number and item (first number is index 0) Returns false if atVertex does not correspond to a valid vertex on this geometry (including if this geometry is a Point), or if the number of remaining verticies in the linestring would be less than two.
It is up to the caller to distinguish between these error conditions. (Or maybe we add another method to this object to help make the distinction?)
Definition at line 1460 of file qgsgeometry.cpp.
References exportGeosToWkb(), QGis::flatType(), mDirtyGeos, mDirtyWkb, mGeometry, mGeometrySize, QgsDebugMsg, QGis::wkbDimensions(), QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBNoGeometry, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, wkbType(), and QGis::WKBUnknown.
Referenced by QgsVectorLayerEditUtils::deleteVertex().
|
inlinestaticprivate |
Definition at line 1378 of file qgsgeometry.cpp.
References QgsDebugMsg.
QgsGeometry * QgsGeometry::difference | ( | QgsGeometry * | geometry | ) |
Returns a geometry representing the points making up this geometry that do not make up other.
Definition at line 5849 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), fromGeosGeom(), mDirtyGeos, and mGeos.
Referenced by fcnDifference(), and QgsInvertedPolygonRenderer::stopRender().
bool QgsGeometry::disjoint | ( | const QgsGeometry * | geometry | ) | const |
Test for if geometry is disjoint of another (uses GEOS)
Definition at line 3509 of file qgsgeometry.cpp.
References geosRelOp().
Referenced by fcnDisjoint().
double QgsGeometry::distance | ( | QgsGeometry & | geom | ) |
Definition at line 5637 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), mDirtyGeos, and mGeos.
Referenced by QgsTransectSample::closestMultilineElement(), QgsTransectSample::createSample(), fcnDistance(), and QgsMapCanvasSnapper::snapToBackgroundLayers().
bool QgsGeometry::equals | ( | const QgsGeometry * | geometry | ) | const |
Test for if geometry equals another (uses GEOS)
Definition at line 3514 of file qgsgeometry.cpp.
References geosRelOp().
|
private |
Converts from the GEOS geometry to the WKB geometry.
Definition at line 4184 of file qgsgeometry.cpp.
References QgsApplication::endian(), getNumGeosPoints(), mDirtyWkb, mGeometry, mGeometrySize, mGeos, QgsDebugMsg, QGis::WKBLineString, QGis::WKBMultiLineString, QGis::WKBMultiPoint, QGis::WKBMultiPolygon, QGis::WKBPoint, and QGis::WKBPolygon.
Referenced by adjacentVertices(), asWkb(), boundingBox(), closestSegmentWithContext(), closestVertex(), convertToMultiType(), deleteVertex(), exportToGeoJSON(), exportToWkt(), insertVertex(), isMultipart(), moveVertex(), splitGeometry(), transform(), translate(), type(), vertexAt(), and wkbSize().
QString QgsGeometry::exportToGeoJSON | ( | ) | const |
Exports the geometry to mGeoJSON.
Definition at line 3748 of file qgsgeometry.cpp.
References exportGeosToWkb(), mDirtyWkb, mGeometry, QgsDebugMsg, qgsDoubleToString(), QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, and wkbType().
QString QgsGeometry::exportToWkt | ( | ) | const |
Exports the geometry to mWkt.
Definition at line 3539 of file qgsgeometry.cpp.
References exportGeosToWkb(), mDirtyWkb, mGeometry, QgsDebugMsg, qgsDoubleToString(), QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, wkbSize(), and wkbType().
Referenced by QgsOfflineEditing::committedGeometriesChanges(), and fcnGeomToWKT().
|
private |
Converts from the WKB geometry to the GEOS geometry.
Definition at line 3965 of file qgsgeometry.cpp.
References CATCH_GEOS, createGeosCollection(), createGeosLinearRing(), createGeosLineString(), createGeosPoint(), createGeosPolygon(), mDirtyGeos, mGeometry, mGeos, QgsDebugMsgLevel, QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, and wkbType().
Referenced by addPart(), addRing(), area(), asGeometryCollection(), asGeos(), buffer(), centroid(), closestVertexWithContext(), combine(), contains(), convexHull(), difference(), distance(), geosRelOp(), interpolate(), intersection(), intersects(), length(), makeDifference(), mergeGeometriesMultiTypeSplit(), offsetCurve(), pointOnSurface(), reshapeGeometry(), simplify(), splitGeometry(), splitLinearGeometry(), splitPolygonGeometry(), and symDifference().
void QgsGeometry::fromGeos | ( | GEOSGeometry * | geos | ) |
Set the geometry, feeding in a geometry in GEOS format.
This class will take ownership of the buffer.
Definition at line 684 of file qgsgeometry.cpp.
References mDirtyGeos, mDirtyWkb, mGeometry, and mGeos.
Referenced by addPart(), avoidIntersections(), QgsGeometryAnalyzer::createOffsetGeometry(), fromGeosGeom(), and unaryUnion().
|
static |
construct geometry from a multipoint
Definition at line 461 of file qgsgeometry.cpp.
References createGeosCollection(), createGeosPoint(), fromGeosGeom(), QgsMessageLog::logMessage(), tr, and GEOSException::what().
Referenced by QgsRubberBand::asGeometry(), convertToPoint(), deletePart(), and QgsGeometryAnalyzer::locateAlongMeasure().
|
static |
construct geometry from a multipolygon
Definition at line 505 of file qgsgeometry.cpp.
References createGeosCollection(), createGeosPolygon(), fromGeosGeom(), QgsMessageLog::logMessage(), tr, and GEOSException::what().
Referenced by convertToPolygon(), deletePart(), deleteRing(), and QgsInvertedPolygonRenderer::stopRender().
|
static |
construct geometry from a multipolyline
Definition at line 483 of file qgsgeometry.cpp.
References createGeosCollection(), createGeosLineString(), fromGeosGeom(), QgsMessageLog::logMessage(), tr, and GEOSException::what().
Referenced by QgsRubberBand::asGeometry(), QgsTransectSample::clipBufferLine(), convertToLine(), deletePart(), linePointDifference(), and QgsGeometryAnalyzer::locateBetweenMeasures().
|
static |
construct geometry from a point
Definition at line 446 of file qgsgeometry.cpp.
References createGeosPoint(), and fromGeosGeom().
Referenced by QgsPointSample::addSamplePoints(), QgsTransectSample::closestMultilineElement(), convertToPoint(), and QgsMapCanvasSnapper::snapToBackgroundLayers().
|
static |
construct geometry from a polygon
Definition at line 456 of file qgsgeometry.cpp.
References createGeosPolygon(), and fromGeosGeom().
Referenced by QgsRubberBand::asGeometry(), QgsTransectSample::clipBufferLine(), convertToPolygon(), deleteRing(), fromRect(), offsetLine(), QgsSymbolLayerV2Utils::polygonPointOnSurface(), and QgsInvertedPolygonRenderer::stopRender().
|
static |
construct geometry from a polyline
Definition at line 451 of file qgsgeometry.cpp.
References createGeosLineString(), and fromGeosGeom().
Referenced by QgsRubberBand::asGeometry(), QgsTransectSample::closestMultilineElement(), convertToLine(), QgsTransectSample::createSample(), offsetLine(), QgsGeometryAnalyzer::perimeterMeasure(), and QgsMapCanvasSnapper::snapToBackgroundLayers().
|
static |
construct geometry from a rectangle
Definition at line 530 of file qgsgeometry.cpp.
References fromPolygon(), QgsRectangle::xMaximum(), QgsRectangle::xMinimum(), QgsRectangle::yMaximum(), and QgsRectangle::yMinimum().
Referenced by QgsGml::endElement(), QgsGeometryAnalyzer::extent(), fcnBounds(), QgsOgcUtils::geometryFromGML(), intersects(), QgsPalLabeling::prepareLayer(), and QgsZonalStatistics::statisticsFromPreciseIntersection().
void QgsGeometry::fromWkb | ( | unsigned char * | wkb, |
size_t | length | ||
) |
Set the geometry, feeding in the buffer containing OGC Well-Known Binary and the buffer's length.
This class will take ownership of the buffer.
Definition at line 577 of file qgsgeometry.cpp.
References length(), mDirtyGeos, mDirtyWkb, mGeometry, mGeometrySize, and mGeos.
Referenced by QgsOgcUtils::geometryFromGMLLineString(), QgsOgcUtils::geometryFromGMLMultiLineString(), QgsOgcUtils::geometryFromGMLMultiPoint(), QgsOgcUtils::geometryFromGMLMultiPolygon(), QgsOgcUtils::geometryFromGMLPoint(), QgsOgcUtils::geometryFromGMLPolygon(), QgsFeature::setGeometryAndOwnership(), QgsMapToPixelSimplifier::simplify(), QgsTopologyPreservingSimplifier::simplifyGeometry(), and QgsMapToPixelSimplifier::simplifyGeometry().
|
static |
static method that creates geometry from Wkt
Definition at line 426 of file qgsgeometry.cpp.
References fromGeosGeom(), QgsMessageLog::logMessage(), tr, and GEOSException::what().
Referenced by QgsOfflineEditing::applyGeometryChanges(), QgsOgcUtils::expressionFunctionToOgcFilter(), fcnGeomFromWKT(), and geometryFromConstExpr().
|
staticprivate |
Determines the maximum number of digits before the dot.
Definition at line 5311 of file qgsgeometry.cpp.
Referenced by lineContainedInLine(), and pointContainedInLine().
|
staticprivate |
Definition at line 3480 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), mGeos, and QgsDebugMsg.
Referenced by contains(), crosses(), disjoint(), equals(), isGeosEqual(), overlaps(), touches(), and within().
bool QgsGeometry::insertVertex | ( | double | x, |
double | y, | ||
int | beforeVertex | ||
) |
Insert a new vertex before the given vertex index, ring and item (first number is index 0) If the requested vertex number (beforeVertex.back()) is greater than the last actual vertex on the requested ring and item, it is assumed that the vertex is to be appended instead of inserted.
Returns false if atVertex does not correspond to a valid vertex on this geometry (including if this geometry is a Point). It is up to the caller to distinguish between these error conditions. (Or maybe we add another method to this object to help make the distinction?)
Definition at line 1703 of file qgsgeometry.cpp.
References exportGeosToWkb(), QGis::flatType(), mDirtyGeos, mDirtyWkb, mGeometry, mGeometrySize, QgsDebugMsg, QGis::wkbDimensions(), QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBNoGeometry, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, wkbType(), and QGis::WKBUnknown.
Referenced by QgsVectorLayerEditUtils::insertVertex().
|
private |
Insert a new vertex before the given vertex index (first number is index 0) in the given GEOS Coordinate Sequence.
If the requested vertex number is greater than the last actual vertex, it is assumed that the vertex is to be appended instead of inserted.
x | x coordinate |
y | y coordinate |
beforeVertex | insert before vertex with this index |
old_sequence | The sequence to update (The caller remains the owner). |
new_sequence | The updated sequence (The caller becomes the owner if the function returns true). Returns false if beforeVertex does not correspond to a valid vertex number on the Coordinate Sequence. |
Definition at line 1142 of file qgsgeometry.cpp.
|
inlinestaticprivate |
Definition at line 1655 of file qgsgeometry.cpp.
QgsGeometry * QgsGeometry::interpolate | ( | double | distance | ) |
Definition at line 5774 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), fromGeosGeom(), QgsMessageLog::logMessage(), mDirtyGeos, mGeos, and tr.
Referenced by QgsTransectSample::createSample().
QgsGeometry * QgsGeometry::intersection | ( | QgsGeometry * | geometry | ) |
Returns a geometry representing the points shared by this geometry and other.
Definition at line 5794 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), fromGeosGeom(), mDirtyGeos, and mGeos.
Referenced by QgsTransectSample::clipBufferLine(), QgsTransectSample::createSample(), fcnIntersection(), QgsOverlayAnalyzer::intersectFeature(), QgsPalLayerSettings::registerFeature(), QgsMapCanvasSnapper::snapToBackgroundLayers(), and QgsZonalStatistics::statisticsFromPreciseIntersection().
bool QgsGeometry::intersects | ( | const QgsRectangle & | r | ) | const |
Test for intersection with a rectangle (uses GEOS)
Definition at line 3413 of file qgsgeometry.cpp.
References fromRect().
Referenced by QgsFeatureRequest::acceptFeature(), QgsTransectSample::clipBufferLine(), fcnBbox(), fcnIntersects(), QgsOverlayAnalyzer::intersectFeature(), and QgsVectorFileWriter::writeAsVectorFormat().
bool QgsGeometry::intersects | ( | const QgsGeometry * | geometry | ) | const |
Test for intersection with a geometry (uses GEOS)
Definition at line 3421 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), mGeos, and QgsDebugMsg.
bool QgsGeometry::isGeosEmpty | ( | ) |
check if geometry is empty using GEOS
Definition at line 6172 of file qgsgeometry.cpp.
References asGeos(), QgsMessageLog::logMessage(), tr, and GEOSException::what().
bool QgsGeometry::isGeosEqual | ( | QgsGeometry & | g | ) |
compare geometries using GEOS
Definition at line 6167 of file qgsgeometry.cpp.
References geosRelOp().
Referenced by QgsVectorLayer::updateFeature().
bool QgsGeometry::isGeosValid | ( | ) |
check validity using GEOS
Definition at line 6149 of file qgsgeometry.cpp.
References asGeos(), QgsMessageLog::logMessage(), tr, and GEOSException::what().
Referenced by QgsPalLayerSettings::registerFeature().
bool QgsGeometry::isMultipart | ( | ) |
Returns true if wkb of the geometry is of WKBMulti* type.
Definition at line 676 of file qgsgeometry.cpp.
References exportGeosToWkb(), QGis::isMultiType(), mDirtyWkb, and wkbType().
Referenced by addPart(), QgsTransectSample::clipBufferLine(), convertToLine(), convertToPoint(), convertToPolygon(), QgsGeometryAnalyzer::createOffsetGeometry(), makeDifference(), and QgsGeometryAnalyzer::perimeterMeasure().
|
private |
Returns < 0 if point(x/y) is left of the line x1,y1 -> x1,y2.
Definition at line 6190 of file qgsgeometry.cpp.
Referenced by closestSegmentWithContext().
double QgsGeometry::length | ( | ) |
get length of geometry using GEOS
Definition at line 5618 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), mDirtyGeos, and mGeos.
Referenced by QgsPalLayerSettings::checkMinimumSizeMM(), QgsTransectSample::createSample(), and fromWkb().
|
staticprivate |
Tests if line1 is completely contained in line2.
This method works with a very small buffer around line2 and therefore is less prone to numerical errors as the corresponding geos method
Definition at line 5260 of file qgsgeometry.cpp.
References DEFAULT_QUADRANT_SEGMENTS, and geomDigits().
Referenced by reshapeLine().
|
private |
Splits line/multiline geometries following a single point.
Definition at line 4643 of file qgsgeometry.cpp.
References asGeos(), asMultiPolyline(), asPoint(), asPolyline(), fromGeosGeom(), fromMultiPolyline(), and mGeos.
Referenced by splitLinearGeometry().
int QgsGeometry::makeDifference | ( | QgsGeometry * | other | ) |
Changes this geometry such that it does not intersect the other geometry.
other | geometry that should not be intersect |
Definition at line 3122 of file qgsgeometry.cpp.
References CATCH_GEOS, convertToMultiType(), exportWkbToGeos(), isMultipart(), mDirtyGeos, mDirtyWkb, and mGeos.
Referenced by QgsVectorLayer::removePolygonIntersections().
|
private |
Definition at line 5364 of file qgsgeometry.cpp.
References createGeosCollection(), exportWkbToGeos(), mDirtyGeos, and mGeos.
Referenced by splitLinearGeometry(), and splitPolygonGeometry().
bool QgsGeometry::moveVertex | ( | double | x, |
double | y, | ||
int | atVertex | ||
) |
Moves the vertex at the given position number and item (first number is index 0) to the given coordinates.
Returns false if atVertex does not correspond to a valid vertex on this geometry
Definition at line 1229 of file qgsgeometry.cpp.
References exportGeosToWkb(), mDirtyGeos, mDirtyWkb, mGeometry, QgsDebugMsg, QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, and wkbType().
Referenced by QgsVectorLayerEditUtils::moveVertex().
|
inlinestaticprivate |
Definition at line 1194 of file qgsgeometry.cpp.
|
staticprivate |
Nodes together a split line and a (multi-) polygon geometry in a multilinestring.
Definition at line 5241 of file qgsgeometry.cpp.
Referenced by reshapeLine(), and splitPolygonGeometry().
|
private |
Returns number of single geometry in a geos geometry.
Is save for geos 2 and 3
Definition at line 5350 of file qgsgeometry.cpp.
Referenced by splitPolygonGeometry().
QgsGeometry * QgsGeometry::offsetCurve | ( | double | distance, |
int | segments, | ||
int | joinStyle, | ||
double | mitreLimit | ||
) |
Returns an offset line at a given distance and side from an input line.
See buffer() method for details on parameters.
Definition at line 5694 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), fromGeosGeom(), QGis::Line, mDirtyGeos, mGeos, and type().
Referenced by offsetLine().
QgsGeometry & QgsGeometry::operator= | ( | QgsGeometry const & | rhs | ) |
assignments will prompt a deep copy of the object
Definition at line 546 of file qgsgeometry.cpp.
References mDirtyGeos, mDirtyWkb, mGeometry, mGeometrySize, and mGeos.
bool QgsGeometry::overlaps | ( | const QgsGeometry * | geometry | ) | const |
Test for if geometry overlaps another (uses GEOS)
Definition at line 3524 of file qgsgeometry.cpp.
References geosRelOp().
Referenced by fcnOverlaps().
|
staticprivate |
Tests if a point is on a line.
This method works with a very small buffer and is thus less prone to numerical problems as the direct geos functions.
point | the point to test |
line | line to test |
Definition at line 5292 of file qgsgeometry.cpp.
References geomDigits().
Referenced by reshapeLine().
QgsGeometry * QgsGeometry::pointOnSurface | ( | ) |
Returns a point within a geometry.
Definition at line 5744 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), fromGeosGeom(), mDirtyGeos, and mGeos.
Referenced by QgsSymbolLayerV2Utils::polygonPointOnSurface().
int QgsGeometry::reshapeGeometry | ( | const QList< QgsPoint > & | reshapeWithLine | ) |
Replaces a part of this geometry with another line.
Definition at line 3015 of file qgsgeometry.cpp.
References createGeosLineString(), exportWkbToGeos(), QGis::Line, mDirtyGeos, mDirtyWkb, mGeos, QGis::Point, reshapeLine(), reshapePolygon(), and type().
|
staticprivate |
Creates a new line from an original line and a reshape line.
The part of the input line from the first to the last intersection with the reshape line will be replaced. The calling function takes ownership of the result.
origLine | the original line |
reshapeLineGeos | the reshape line |
Definition at line 4973 of file qgsgeometry.cpp.
References createGeosPoint(), lineContainedInLine(), QgsMessageLog::logMessage(), nodeGeometries(), pointContainedInLine(), tr, and GEOSException::what().
Referenced by reshapeGeometry(), and reshapePolygon().
|
staticprivate |
Creates a new polygon replacing the part from the first to the second intersection with the reshape line.
As a polygon ring is always closed, the method keeps the longer part of the existing boundary
polygon | geometry to reshape |
reshapeLineGeos | the reshape line |
Definition at line 4860 of file qgsgeometry.cpp.
References QgsMessageLog::logMessage(), reshapeLine(), tr, and GEOSException::what().
Referenced by reshapeGeometry().
QgsGeometry * QgsGeometry::simplify | ( | double | tolerance | ) |
Returns a simplified version of this geometry using a specified tolerance value.
Definition at line 5714 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), fromGeosGeom(), mDirtyGeos, and mGeos.
Referenced by QgsTopologyPreservingSimplifier::simplify(), QgsGeometryAnalyzer::simplifyFeature(), and QgsTopologyPreservingSimplifier::simplifyGeometry().
int QgsGeometry::splitGeometry | ( | const QList< QgsPoint > & | splitLine, |
QList< QgsGeometry * > & | newGeometries, | ||
bool | topological, | ||
QList< QgsPoint > & | topologyTestPoints | ||
) |
Splits this geometry according to a given line.
Note that the geometry is only split once. If there are several intersections between geometry and splitLine, only the first one is considered.
splitLine | the line that splits the geometry | |
[out] | newGeometries | list of new geometries that have been created with the split |
topological | true if topological editing is enabled | |
[out] | topologyTestPoints | points that need to be tested for topological completeness in the dataset |
Definition at line 2935 of file qgsgeometry.cpp.
References CATCH_GEOS, createGeosLineString(), createGeosPoint(), exportGeosToWkb(), exportWkbToGeos(), QGis::Line, mDirtyGeos, mDirtyWkb, mGeos, QGis::Point, QGis::Polygon, splitLinearGeometry(), splitPolygonGeometry(), topologicalTestPointsSplit(), and type().
Referenced by QgsVectorLayerEditUtils::splitFeatures(), and QgsVectorLayerEditUtils::splitParts().
|
private |
Splits line/multiline geometries.
splitLine | the line that splits the feature |
newGeometries | new geometries if splitting was successful |
Definition at line 4688 of file qgsgeometry.cpp.
References exportWkbToGeos(), fromGeosGeom(), linePointDifference(), mDirtyGeos, mDirtyWkb, mergeGeometriesMultiTypeSplit(), and mGeos.
Referenced by splitGeometry().
|
private |
Splits polygon/multipolygon geometries.
Definition at line 4752 of file qgsgeometry.cpp.
References exportWkbToGeos(), fromGeosGeom(), mDirtyGeos, mDirtyWkb, mergeGeometriesMultiTypeSplit(), mGeos, nodeGeometries(), numberOfGeometries(), and QgsDebugMsg.
Referenced by splitGeometry().
double QgsGeometry::sqrDistToVertexAt | ( | QgsPoint & | point, |
int | atVertex | ||
) |
Returns the squared cartesian distance between the given point to the given vertex index (vertex at the given position number, ring and item (first number is index 0))
Definition at line 2021 of file qgsgeometry.cpp.
References MathUtils::max(), QgsDebugMsg, QgsPoint::sqrDist(), QgsPoint::toString(), and vertexAt().
QgsGeometry * QgsGeometry::symDifference | ( | QgsGeometry * | geometry | ) |
Returns a Geometry representing the points making up this Geometry that do not make up other.
Definition at line 5870 of file qgsgeometry.cpp.
References CATCH_GEOS, exportWkbToGeos(), fromGeosGeom(), mDirtyGeos, and mGeos.
Referenced by fcnSymDifference().
|
private |
Finds out the points that need to be tested for topological correctnes if this geometry will be split.
Definition at line 5193 of file qgsgeometry.cpp.
References mGeos.
Referenced by splitGeometry().
bool QgsGeometry::touches | ( | const QgsGeometry * | geometry | ) | const |
Test for if geometry touch another (uses GEOS)
Definition at line 3519 of file qgsgeometry.cpp.
References geosRelOp().
Referenced by fcnTouches().
int QgsGeometry::transform | ( | const QgsCoordinateTransform & | ct | ) |
Transform this geometry as described by CoordinateTranasform ct.
Definition at line 2820 of file qgsgeometry.cpp.
References exportGeosToWkb(), index, mDirtyGeos, mDirtyWkb, mGeometry, QgsDebugMsg, transformVertex(), QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, and wkbType().
Referenced by QgsAtlasComposition::computeExtent(), QgsVectorFileWriter::exportFeaturesSymbolLevels(), QgsVectorLayerImport::importLayer(), QgsHighlight::init(), QgsPalLabeling::registerDiagramFeature(), QgsPalLayerSettings::registerFeature(), and QgsVectorFileWriter::writeAsVectorFormat().
|
private |
Transforms a single vertex by ct.
wkbPtr | pointer to current position in wkb. Is increased automatically by the function |
ct | the QgsCoordinateTransform |
hasZValue | 25D type? |
Definition at line 4626 of file qgsgeometry.cpp.
References QgsCoordinateTransform::transformInPlace().
Referenced by transform().
int QgsGeometry::translate | ( | double | dx, |
double | dy | ||
) |
Translate this geometry by dx, dy.
Definition at line 2703 of file qgsgeometry.cpp.
References exportGeosToWkb(), index, mDirtyGeos, mDirtyWkb, mGeometry, QgsDebugMsg, translateVertex(), QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, and wkbType().
Referenced by QgsVectorLayerEditUtils::translateFeature().
|
private |
Translates a single vertex by dx and dy.
wkbPtr | pointer to current position in wkb array. Is increased automatically by the function |
dx | translation of x coordinate |
dy | translation of y coordinate |
hasZValue | 25D type? |
Definition at line 4606 of file qgsgeometry.cpp.
Referenced by translate().
QGis::GeometryType QgsGeometry::type | ( | ) |
Returns type of the vector.
Definition at line 646 of file qgsgeometry.cpp.
References exportGeosToWkb(), QGis::Line, mDirtyWkb, QGis::Point, QGis::Polygon, QGis::UnknownGeometry, QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, and wkbType().
Referenced by addPart(), addRing(), avoidIntersections(), QgsPalLayerSettings::checkMinimumSizeMM(), QgsTransectSample::clipBufferLine(), combine(), convertToLine(), convertToPoint(), convertToPolygon(), QgsGeometryAnalyzer::createOffsetGeometry(), QgsVectorLayer::extent(), QgsMapToolIdentify::featureDerivedAttributes(), offsetCurve(), QgsPalLayerSettings::registerFeature(), QgsVectorLayer::removePolygonIntersections(), QgsSimpleLineSymbolLayerV2::renderPolyline(), QgsMarkerLineSymbolLayerV2::renderPolyline(), reshapeGeometry(), QgsRubberBand::setToGeometry(), QgsGeometryAnalyzer::simpleMeasure(), QgsAbstractFeatureIterator::simplify(), QgsMapToPixelSimplifier::simplifyGeometry(), QgsMapCanvasSnapper::snapToBackgroundLayers(), splitGeometry(), QgsVectorLayerFeatureIterator::useAddedFeature(), and QgsVectorLayerFeatureIterator::useChangedAttributeFeature().
|
static |
compute the unary union on a list of geometries.
May be faster than an iterative union on a set of geometries.
geometryList | a list of QgsGeometry* as input |
Definition at line 6517 of file qgsgeometry.cpp.
References _makeUnion(), asGeos(), fromGeos(), and QgsGeometry().
Referenced by QgsInvertedPolygonRenderer::stopRender().
void QgsGeometry::validateGeometry | ( | QList< Error > & | errors | ) |
Validate geometry and produce a list of geometry errors.
Definition at line 6144 of file qgsgeometry.cpp.
References QgsGeometryValidator::validateGeometry().
QgsPoint QgsGeometry::vertexAt | ( | int | atVertex | ) |
Returns coordinates of a vertex.
atVertex | index of the vertex |
Definition at line 1848 of file qgsgeometry.cpp.
References exportGeosToWkb(), mDirtyWkb, mGeometry, QgsDebugMsg, QGis::WKBLineString, QGis::WKBLineString25D, QGis::WKBMultiLineString, QGis::WKBMultiLineString25D, QGis::WKBMultiPoint, QGis::WKBMultiPoint25D, QGis::WKBMultiPolygon, QGis::WKBMultiPolygon25D, QGis::WKBPoint, QGis::WKBPoint25D, QGis::WKBPolygon, QGis::WKBPolygon25D, and wkbType().
Referenced by QgsGeometryAnalyzer::createPointOffset(), QgsVectorLayer::snapToGeometry(), and sqrDistToVertexAt().
bool QgsGeometry::within | ( | const QgsGeometry * | geometry | ) | const |
Test for if geometry is within another (uses GEOS)
Definition at line 3529 of file qgsgeometry.cpp.
References geosRelOp().
Referenced by QgsPointSample::addSamplePoints(), and fcnWithin().
size_t QgsGeometry::wkbSize | ( | ) | const |
Returns the size of the WKB in asWkb().
Definition at line 607 of file qgsgeometry.cpp.
References exportGeosToWkb(), mDirtyWkb, and mGeometrySize.
Referenced by QgsVectorFileWriter::createFeature(), QgsGeometryAnalyzer::dissolveFeature(), exportToWkt(), QgsLabel::labelPoint(), QgsMapToPixelSimplifier::simplify(), QgsTopologyPreservingSimplifier::simplifyGeometry(), QgsMapToPixelSimplifier::simplifyGeometry(), and wkbType().
QGis::WkbType QgsGeometry::wkbType | ( | ) | const |
Returns type of wkb (point / linestring / polygon etc.)
Definition at line 629 of file qgsgeometry.cpp.
References asWkb(), mGeometry, wkbSize(), and QGis::WKBUnknown.
Referenced by QgsRubberBand::addGeometry(), addRing(), QgsVectorLayerEditUtils::addTopologicalPoints(), QgsInterpolator::addVerticesToCache(), adjacentVertices(), asMultiPoint(), asMultiPolygon(), asMultiPolyline(), asPoint(), asPolygon(), asPolyline(), avoidIntersections(), boundingBox(), QgsTransectSample::clipBufferLine(), QgsTransectSample::closestMultilineElement(), QgsTransectSample::closestSegmentPoints(), closestSegmentWithContext(), closestVertex(), convertToMultiType(), QgsVectorFileWriter::createFeature(), QgsTransectSample::createSample(), deletePart(), deleteRing(), deleteVertex(), exportToGeoJSON(), exportToWkt(), exportWkbToGeos(), QgsMapToolIdentify::featureDerivedAttributes(), QgsOgcUtils::geometryToGML(), QgsTINInterpolator::insertData(), insertVertex(), isMultipart(), QgsLabel::labelPoint(), moveVertex(), offsetLine(), QgsHighlight::paint(), QgsPointDisplacementRenderer::renderFeature(), QgsFeatureRendererV2::renderFeatureWithSymbol(), QgsGeometryValidator::run(), QgsGeometryAnalyzer::simpleMeasure(), QgsMapToPixelSimplifier::simplifyGeometry(), QgsInvertedPolygonRenderer::stopRender(), transform(), translate(), type(), and vertexAt().
|
mutableprivate |
If the geometry has been set since the last conversion to GEOS.
Definition at line 536 of file qgsgeometry.h.
Referenced by addPart(), addRing(), area(), asGeometryCollection(), asGeos(), buffer(), centroid(), closestVertexWithContext(), combine(), convertToMultiType(), convexHull(), deleteVertex(), difference(), distance(), exportWkbToGeos(), fromGeos(), fromWkb(), insertVertex(), interpolate(), intersection(), length(), makeDifference(), mergeGeometriesMultiTypeSplit(), moveVertex(), offsetCurve(), operator=(), pointOnSurface(), reshapeGeometry(), simplify(), splitGeometry(), splitLinearGeometry(), splitPolygonGeometry(), symDifference(), transform(), and translate().
|
mutableprivate |
If the geometry has been set since the last conversion to WKB.
Definition at line 533 of file qgsgeometry.h.
Referenced by addPart(), addRing(), adjacentVertices(), asWkb(), boundingBox(), closestSegmentWithContext(), closestVertex(), convertToMultiType(), deleteVertex(), exportGeosToWkb(), exportToGeoJSON(), exportToWkt(), fromGeos(), fromWkb(), insertVertex(), isMultipart(), makeDifference(), moveVertex(), operator=(), reshapeGeometry(), splitGeometry(), splitLinearGeometry(), splitPolygonGeometry(), transform(), translate(), type(), vertexAt(), and wkbSize().
|
mutableprivate |
pointer to geometry in binary WKB format This is the class' native implementation
Definition at line 524 of file qgsgeometry.h.
Referenced by adjacentVertices(), asMultiPoint(), asMultiPolygon(), asMultiPolyline(), asPoint(), asPolygon(), asPolyline(), asWkb(), boundingBox(), closestSegmentWithContext(), closestVertex(), convertToMultiType(), deleteVertex(), exportGeosToWkb(), exportToGeoJSON(), exportToWkt(), exportWkbToGeos(), fromGeos(), fromWkb(), insertVertex(), moveVertex(), operator=(), QgsGeometry(), transform(), translate(), vertexAt(), wkbType(), and ~QgsGeometry().
|
mutableprivate |
size of geometry
Definition at line 527 of file qgsgeometry.h.
Referenced by convertToMultiType(), deleteVertex(), exportGeosToWkb(), fromWkb(), insertVertex(), operator=(), QgsGeometry(), and wkbSize().
|
mutableprivate |
cached GEOS version of this geometry
Definition at line 530 of file qgsgeometry.h.
Referenced by addPart(), addRing(), area(), asGeometryCollection(), asGeos(), buffer(), centroid(), closestVertexWithContext(), combine(), contains(), convexHull(), difference(), distance(), exportGeosToWkb(), exportWkbToGeos(), fromGeos(), fromWkb(), geosRelOp(), interpolate(), intersection(), intersects(), length(), linePointDifference(), makeDifference(), mergeGeometriesMultiTypeSplit(), offsetCurve(), operator=(), pointOnSurface(), QgsGeometry(), reshapeGeometry(), simplify(), splitGeometry(), splitLinearGeometry(), splitPolygonGeometry(), symDifference(), topologicalTestPointsSplit(), and ~QgsGeometry().