QGIS API Documentation
3.14.0-Pi (9f7028fd23)
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
z
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
z
Variables
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
2
3
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
c
e
f
g
h
k
l
m
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Related Functions
a
c
d
e
f
g
i
l
m
n
o
p
q
r
s
t
v
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
Functions
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
z
Variables
a
b
c
d
e
f
g
h
i
l
n
o
p
q
r
s
t
u
w
Typedefs
a
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
Enumerator
Macros
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
w
y
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
src
core
geometry
qgssurface.cpp
Go to the documentation of this file.
1
/***************************************************************************
2
qgscurvepolygon.cpp
3
---------------------
4
begin : August 2017
5
copyright : (C) 2017 by Martí Angelats i Ribera
6
email : marti dot angelats at psig dot cat
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#include "
qgssurface.h
"
19
#include "
qgspoint.h
"
20
#include "
qgspolygon.h
"
21
#include "
qgsgeos.h
"
22
#include <memory>
23
24
bool
QgsSurface::isValid
( QString &error,
int
flags )
const
25
{
26
if
( flags == 0 &&
mHasCachedValidity
)
27
{
28
// use cached validity results
29
error =
mValidityFailureReason
;
30
return
error.isEmpty();
31
}
32
33
QgsGeos
geos
(
this
);
34
bool
res =
geos
.isValid( &error, flags &
QgsGeometry::FlagAllowSelfTouchingHoles
,
nullptr
);
35
if
( flags == 0 )
36
{
37
mValidityFailureReason
= !res ? error : QString();
38
mHasCachedValidity
=
true
;
39
}
40
return
res;
41
}
42
43
void
QgsSurface::clearCache
()
const
44
{
45
mBoundingBox
=
QgsRectangle
();
46
mHasCachedValidity
=
false
;
47
mValidityFailureReason
.clear();
48
QgsAbstractGeometry::clearCache
();
49
}
qgspolygon.h
QgsSurface::clearCache
void clearCache() const override
Clears any cached parameters associated with the geometry, e.g., bounding boxes.
Definition:
qgssurface.cpp:43
QgsAbstractGeometry::clearCache
virtual void clearCache() const
Clears any cached parameters associated with the geometry, e.g., bounding boxes.
Definition:
qgsabstractgeometry.cpp:112
geos
Contains geos related utilities and functions.
Definition:
qgsgeos.h:41
qgspoint.h
QgsRectangle
Definition:
qgsrectangle.h:41
QgsSurface::isValid
bool isValid(QString &error, int flags=0) const override
Checks validity of the geometry, and returns true if the geometry is valid.
Definition:
qgssurface.cpp:24
QgsSurface::mHasCachedValidity
bool mHasCachedValidity
Definition:
qgssurface.h:81
QgsGeometry::FlagAllowSelfTouchingHoles
@ FlagAllowSelfTouchingHoles
Indicates that self-touching holes are permitted. OGC validity states that self-touching holes are NO...
Definition:
qgsgeometry.h:368
QgsGeos
Definition:
qgsgeos.h:103
QgsSurface::mValidityFailureReason
QString mValidityFailureReason
Definition:
qgssurface.h:82
qgsgeos.h
qgssurface.h
QgsSurface::mBoundingBox
QgsRectangle mBoundingBox
Definition:
qgssurface.h:80
Generated on Mon Jun 22 2020 05:14:09 for QGIS API Documentation by
1.8.17