QGIS API Documentation
2.8.2-Wien
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
src
core
qgsgeometrysimplifier.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsgeometrysimplifier.h
3
---------------------
4
begin : December 2013
5
copyright : (C) 2013 by Alvaro Huarte
6
email : http://wiki.osgeo.org/wiki/Alvaro_Huarte
7
8
***************************************************************************
9
* *
10
* This program is free software; you can redistribute it and/or modify *
11
* it under the terms of the GNU General Public License as published by *
12
* the Free Software Foundation; either version 2 of the License, or *
13
* (at your option) any later version. *
14
* *
15
***************************************************************************/
16
17
#ifndef QGSGEOMETRYSIMPLIFIER_H
18
#define QGSGEOMETRYSIMPLIFIER_H
19
20
#include "
qgsgeometry.h
"
21
25
class
CORE_EXPORT
QgsAbstractGeometrySimplifier
26
{
27
public
:
28
virtual
~
QgsAbstractGeometrySimplifier
();
29
31
virtual
QgsGeometry
* simplify(
QgsGeometry
* geometry )
const
= 0;
33
virtual
bool
simplifyGeometry(
QgsGeometry
* geometry )
const
= 0;
34
35
// MapToPixel simplification helper methods
36
public
:
38
static
bool
isGeneralizableByDeviceBoundingBox(
const
QgsRectangle
& envelope,
float
mapToPixelTol = 1.0f );
40
static
bool
isGeneralizableByDeviceBoundingBox(
const
QVector<QPointF>& points,
float
mapToPixelTol = 1.0f );
41
};
42
43
/***************************************************************************/
50
class
CORE_EXPORT
QgsTopologyPreservingSimplifier
:
public
QgsAbstractGeometrySimplifier
51
{
52
public
:
53
QgsTopologyPreservingSimplifier
(
double
tolerance );
54
virtual
~
QgsTopologyPreservingSimplifier
();
55
56
protected
:
58
double
mTolerance
;
59
60
public
:
62
virtual
QgsGeometry
*
simplify
(
QgsGeometry
* geometry )
const override
;
64
virtual
bool
simplifyGeometry
(
QgsGeometry
* geometry )
const override
;
65
};
66
67
#endif // QGSGEOMETRYSIMPLIFIER_H
Generated on Sun May 10 2015 16:33:24 for QGIS API Documentation by
1.8.1.2