QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
geometry
qgsgeometryeditutils.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsgeometryeditutils.h
3
-------------------------------------------------------------------
4
Date : 21 Jan 2015
5
Copyright : (C) 2015 by Marco Hugentobler
6
email : marco.hugentobler at sourcepole dot com
7
***************************************************************************
8
* *
9
* This program is free software; you can redistribute it and/or modify *
10
* it under the terms of the GNU General Public License as published by *
11
* the Free Software Foundation; either version 2 of the License, or *
12
* (at your option) any later version. *
13
* *
14
***************************************************************************/
15
16
#ifndef QGSGEOMETRYEDITUTILS_H
17
#define QGSGEOMETRYEDITUTILS_H
18
19
class
QgsAbstractGeometry
;
20
class
QgsCurve
;
21
class
QgsGeometryEngine
;
22
class
QgsVectorLayer
;
23
24
25
#include <memory>
26
27
#include "
qgis.h
"
28
#include "
qgsfeatureid.h
"
29
30
#include <QMap>
31
32
#define SIP_NO_FILE
33
40
class
QgsGeometryEditUtils
41
{
42
public
:
49
static
Qgis::GeometryOperationResult
addRing
(
QgsAbstractGeometry
*geometry, std::unique_ptr< QgsCurve > ring );
50
57
static
Qgis::GeometryOperationResult
addPart
(
QgsAbstractGeometry
*geometry, std::unique_ptr< QgsAbstractGeometry > part );
58
63
static
bool
deleteRing
(
QgsAbstractGeometry
*geom,
int
ringNum,
int
partNum = 0 );
64
69
static
bool
deletePart
(
QgsAbstractGeometry
*geom,
int
partNum );
70
79
static
std::unique_ptr< QgsAbstractGeometry >
avoidIntersections
(
80
const
QgsAbstractGeometry
&geom,
81
const
QList<QgsVectorLayer *> &avoidIntersectionsLayers,
82
bool
&haveInvalidGeometry,
83
const
QHash<
QgsVectorLayer
*, QSet<QgsFeatureId> > &ignoreFeatures = ( QHash<
QgsVectorLayer
*, QSet<QgsFeatureId> >() )
84
);
85
};
86
87
#endif
// QGSGEOMETRYEDITUTILS_H
Qgis::GeometryOperationResult
GeometryOperationResult
Success or failure of a geometry operation.
Definition
qgis.h:2212
QgsAbstractGeometry
Abstract base class for all geometries.
Definition
qgsabstractgeometry.h:82
QgsCurve
Abstract base class for curved geometry type.
Definition
qgscurve.h:36
QgsGeometryEditUtils
Convenience functions for geometry editing.
Definition
qgsgeometryeditutils.h:41
QgsGeometryEditUtils::addRing
static Qgis::GeometryOperationResult addRing(QgsAbstractGeometry *geometry, std::unique_ptr< QgsCurve > ring)
Add an interior ring to a geometry.
Definition
qgsgeometryeditutils.cpp:32
QgsGeometryEditUtils::avoidIntersections
static std::unique_ptr< QgsAbstractGeometry > avoidIntersections(const QgsAbstractGeometry &geom, const QList< QgsVectorLayer * > &avoidIntersectionsLayers, bool &haveInvalidGeometry, const QHash< QgsVectorLayer *, QSet< QgsFeatureId > > &ignoreFeatures=(QHash< QgsVectorLayer *, QSet< QgsFeatureId > >()))
Alters a geometry so that it avoids intersections with features from all open vector layers.
Definition
qgsgeometryeditutils.cpp:375
QgsGeometryEditUtils::deletePart
static bool deletePart(QgsAbstractGeometry *geom, int partNum)
Deletes a part from a geometry.
Definition
qgsgeometryeditutils.cpp:359
QgsGeometryEditUtils::deleteRing
static bool deleteRing(QgsAbstractGeometry *geom, int ringNum, int partNum=0)
Deletes a ring from a geometry.
Definition
qgsgeometryeditutils.cpp:326
QgsGeometryEditUtils::addPart
static Qgis::GeometryOperationResult addPart(QgsAbstractGeometry *geometry, std::unique_ptr< QgsAbstractGeometry > part)
Add a part to multi type geometry.
Definition
qgsgeometryeditutils.cpp:112
QgsGeometryEngine
A geometry engine is a low-level representation of a QgsAbstractGeometry object, optimised for use wi...
Definition
qgsgeometryengine.h:80
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
qgis.h
qgsfeatureid.h
Generated on
for QGIS API Documentation by
1.17.0