Main Page
Modules
Namespaces
Classes
Files
File List
File Members
MergeGeometriesTool.h
Go to the documentation of this file.
1
/* Copyright (C) 2001-2009 National Institute For Space Research (INPE) - Brazil.
2
3
This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5
TerraLib is free software: you can redistribute it and/or modify
6
it under the terms of the GNU Lesser General Public License as published by
7
the Free Software Foundation, either version 3 of the License,
8
or (at your option) any later version.
9
10
TerraLib is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU Lesser General Public License for more details.
14
15
You should have received a copy of the GNU Lesser General Public License
16
along with TerraLib. See COPYING. If not, write to
17
TerraLib Team at <terralib-team@terralib.org>.
18
*/
19
20
/*!
21
\file terralib/edit/qt/tools/MergeGeometriesTool.h
22
23
\brief This class implements a concrete tool to merge polygons.
24
*/
25
26
#ifndef __TERRALIB_EDIT_QT_INTERNAL_MERGEGEOMETRIESTOOL_H
27
#define __TERRALIB_EDIT_QT_INTERNAL_MERGEGEOMETRIESTOOL_H
28
29
// TerraLib
30
#include "../../../geometry/Coord2D.h"
31
#ifndef Q_MOC_RUN
32
#include "../../../geometry/Geometry.h"
33
#include "../../../geometry/GeometryCollection.h"
34
#include "../../../geometry/GeometryProperty.h"
35
#include "../../../dataaccess/dataset/ObjectId.h"
36
#include "../../../dataaccess/dataset/ObjectIdSet.h"
37
#include "../../../maptools/AbstractLayer.h"
38
#endif
39
#include "../Config.h"
40
#include "
GeometriesUpdateTool.h
"
41
42
// STL
43
#include <vector>
44
45
namespace
te
46
{
47
namespace
gm
48
{
49
class
Geometry;
50
}
51
52
namespace
qt
53
{
54
namespace
widgets
55
{
56
class
MapDisplay
;
57
}
58
}
59
60
namespace
edit
61
{
62
63
class
TEEDITQTEXPORT
MergeGeometriesTool
:
public
GeometriesUpdateTool
64
{
65
Q_OBJECT
66
67
public
:
68
69
MergeGeometriesTool
(
te::qt::widgets::MapDisplay
* display,
const
te::map::AbstractLayerPtr
& layer,
const
QCursor& cursor,
QObject
* parent = 0);
70
71
/*! \brief Destructor. */
72
~
MergeGeometriesTool
();
73
74
private
:
75
76
void
draw();
77
78
void
pickFeature(
const
te::map::AbstractLayerPtr
& layer,
const
QPointF& pos);
79
80
te::gm::Envelope
buildEnvelope(
const
QPointF& pos);
81
82
void
storeFeature();
83
84
void
editingFinished();
85
86
bool
spatialRelationDisjoint(
te::gm::GeometryCollection
&
gc
);
87
88
te::gm::Envelope
getRefEnvelope();
89
90
void
getBaseOID(
const
te::da::ObjectIdSet
& objSet, QString msg);
91
92
protected
:
93
94
std::string
m_chosenOid
;
95
te::gm::GeometryCollection
*
m_gc
;
96
te::da::ObjectIdSet
*
m_oidSet
;
97
98
};
99
100
}
// end namespace edit
101
}
// end namespace te
102
103
#endif // __TERRALIB_EDIT_QT_INTERNAL_MERGEGEOMETRIESTOOL_H
te::edit::MergeGeometriesTool
Definition:
MergeGeometriesTool.h:63
MapDisplay
void MapDisplay()
It retrieves data from a data source, create a set of layer and show map display. ...
Definition:
examples/maptools/MapDisplay.cpp:20
te::edit::MergeGeometriesTool::m_chosenOid
std::string m_chosenOid
Definition:
MergeGeometriesTool.h:94
te::qt::widgets::MapDisplay
A widget to control the display of a set of layers.
Definition:
qt/widgets/canvas/MapDisplay.h:71
QObject
te::edit::MergeGeometriesTool::m_gc
te::gm::GeometryCollection * m_gc
Definition:
MergeGeometriesTool.h:95
gc
te::gm::GeometryCollection * gc
Definition:
examples/geometry/main.cpp:56
te::edit::GeometriesUpdateTool
Definition:
GeometriesUpdateTool.h:59
te::gm::Envelope
An Envelope defines a 2D rectangular region.
Definition:
geometry/Envelope.h:51
te::da::ObjectIdSet
This class represents a set of unique ids created in the same context. i.e. from the same data set...
Definition:
ObjectIdSet.h:55
te::edit::MergeGeometriesTool::m_oidSet
te::da::ObjectIdSet * m_oidSet
Definition:
MergeGeometriesTool.h:96
te
URI C++ Library.
Definition:
Attributes.h:37
GeometriesUpdateTool.h
TEEDITQTEXPORT
#define TEEDITQTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition:
src/terralib/edit/qt/Config.h:60
te::gm::GeometryCollection
It is a collection of other geometric objects.
Definition:
GeometryCollection.h:57
te::map::AbstractLayerPtr
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
Definition:
AbstractLayer.h:618
terralib5_src
src
terralib
edit
qt
tools
MergeGeometriesTool.h
Generated on Wed Jun 6 2018 12:16:10 for TerraLib by
1.8.11