Loading...
Searching...
No Matches
DistanceBuffer.h
Go to the documentation of this file.
1/* Copyright (C) 2008 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 DistanceBuffer.h
22
23 \brief Distance buffer operator.
24 */
25
26#ifndef __TERRALIB_FE_INTERNAL_DISTANCEBUFFER_H
27#define __TERRALIB_FE_INTERNAL_DISTANCEBUFFER_H
28
29// TerraLib
30#include "SpatialOp.h"
31
32namespace te
33{
34// Forward declarations
35 namespace common { class Distance; }
36 namespace gm { class Geometry; }
37
38 namespace fe
39 {
40// Forward declarations
41 class PropertyName;
42
43 /*!
44 \class DistanceBuffer
45
46 \brief Distance buffer operator.
47
48 The following operators are defined in the Filter
49 Encoding specification:
50 <ul>
51 <li>DWithin</li>
52 <li>Beyond</li>
53 </ul>
54
55 \ingroup fe
56
57 \sa SpatialOp, PropertyName, Distance
58 */
60 {
61 public:
62
64
65 /** @name Initializer Methods
66 * Methods related to instantiation and destruction.
67 */
68 //@{
69
70 /*!
71 \brief It initializes the DistanceBuffer operator.
72
73 \param opName The operator name.
74
75 \note The DistanceBuffer will not take the ownership of the given name.
76 */
77 DistanceBuffer(const char* opName = 0);
78
79 /*!
80 \brief It initializes the DistanceBuffer operator.
81
82 \param opName The operator name.
83
84 \note The DistanceBuffer will not take the ownership of the given name.
85
86 \note The DistanceBuffer will take the ownership of the given operands.
87 */
88 DistanceBuffer(const char* opName,
89 PropertyName* p,
92
93 /*! \brief Destructor. */
94 virtual ~DistanceBuffer();
95
96 //@}
97
98 /** @name Accessor methods
99 * Methods used to get or set properties.
100 */
101 //@{
102
103 /*!
104 \brief It sets property name.
105
106 \param p The property name.
107
108 \note It will take the ownership of the property name.
109 */
111
112 /*!
113 \brief It returns the property name.
114
115 \return The property name.
116 */
118
119 /*!
120 \brief It sets the geometry.
121
122 \param g The geometry.
123
124 \note It will take the ownership of the geometry.
125 */
127
128 /*! \brief It returns the geometry.
129
130 \return The geometry.
131 */
133
134 /*!
135 \brief It sets the distance.
136
137 \param d The distance.
138
139 \note It will take the ownership of the distance.
140 */
142
143 /*!
144 \brief It returns the distance.
145
146 \return The distance.
147 */
149
150 /*! \brief It creates a new copy of this object. */
151 SpatialOp* clone() const;
152
153 //@}
154
155 protected:
156
157 PropertyName* m_property; //!< A geometric property. (Mandatory, if m_geom is not specified)
158 te::gm::Geometry* m_geom; //!< Geometry literal. (Mandatory, if m_property is not specified)
159 te::common::Distance* m_d; //!< Distance. (mandatory)
160 };
161
162 } // end namespace fe
163} // end namespace te
164
165#endif // __TERRALIB_FE_INTERNAL_DISTANCEBUFFER_H
166
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
A spatial operator determines whether its geometric arguments satisfy the stated spatial relationship...
A given distance has a measurement and a unit-of-measure.
Definition: Distance.h:45
Distance buffer operator.
te::gm::Geometry * m_geom
Geometry literal. (Mandatory, if m_property is not specified)
DistanceBuffer(const char *opName=0)
It initializes the DistanceBuffer operator.
te::common::Distance * getDistance() const
It returns the distance.
void setDistance(te::common::Distance *d)
It sets the distance.
void setProperty(PropertyName *p)
It sets property name.
te::gm::Geometry * getGeometry() const
It returns the geometry.
DistanceBuffer(const char *opName, PropertyName *p, te::gm::Geometry *g, te::common::Distance *d)
It initializes the DistanceBuffer operator.
PropertyName * m_property
A geometric property. (Mandatory, if m_geom is not specified)
void setGeometry(te::gm::Geometry *g)
It sets the geometry.
virtual ~DistanceBuffer()
Destructor.
SpatialOp * clone() const
It creates a new copy of this object.
PropertyName * getProperty() const
It returns the property name.
te::common::Distance * m_d
Distance. (mandatory)
This class is used to encode the name of any property of an object.
Definition: PropertyName.h:55
A spatial operator determines whether its geometric arguments satisfy the stated spatial relationship...
Definition: SpatialOp.h:53
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:78
TEMNTEXPORT double Distance(const te::gm::Coord2D &pt1, const te::gm::Coord2D &pt2)
TerraLib.
#define TEFEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:59