Loading...
Searching...
No Matches
BBOXOp.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 terralib/fe/BBOXOp.h
22
23 \brief A convenient and more compact way of encoding the very common bounding box constraint based on an envelope.
24 */
25
26#ifndef __TERRALIB_FE_INTERNAL_BBOXOP_H
27#define __TERRALIB_FE_INTERNAL_BBOXOP_H
28
29// TerraLib
30#include "SpatialOp.h"
31
32namespace te
33{
34 namespace gml { class Envelope; }
35
36 namespace fe
37 {
38// Forward declarations
39 class PropertyName;
40
41 /*!
42 \class BBOXOp
43
44 \brief A convenient and more compact way of encoding the very common bounding box constraint based on an envelope.
45
46 It is equivalent to the spatial operation
47 Not Disjoint, meaning that the BBOX operator
48 should identify all geometries that spatially
49 interact with the box. If the optional
50 m_property element is not specified,
51 the calling service must determine which
52 spatial property is the spatial key and
53 apply the BBOX operator accordingly. For
54 feature types that has a single spatial
55 property, this is a trivial matter. For
56 feature types that have multiple spatial
57 properties, the calling service either
58 knows which spatial property is the spatial
59 key, or the calling service generates an exception
60 indicating that the feature contains multiple spatial
61 properties and the m_property element must be specified.
62 Of course, a client application always has the
63 options of avoiding the exceptions by calling
64 the DescribeFeatureType operation to get a description
65 of the feature type.
66
67 \ingroup fe
68
69 \sa SpatialOp, PropertyName
70 */
72 {
73 public:
74
76
77 /** @name Initializer Methods
78 * Methods related to instantiation and destruction.
79 */
80 //@{
81
82 /*! \brief It initializes a new BBOXOp. */
84
85 /*!
86 \brief It initializes a new BBOXOp.
87
88 \param p The property name.
89 \param e The envelope.
90
91 \note It will take the ownership of the property name and envelope.
92 */
94
95 /*! \brief Destructor. */
97
98 //@}
99
100 /** @name Accessor methods
101 * Methods used to get or set properties.
102 */
103 //@{
104
105 /*!
106 \brief It sets property name.
107
108 \param p The property name.
109
110 \note It will take the ownership of the property name.
111 */
113
114 /*!
115 \brief It returns the property name.
116
117 \return The property name.
118 */
120
121 /*!
122 \brief It sets the envelope.
123
124 \param e The envelope.
125
126 \note It will take the ownership of the envelope.
127 */
129
130 /*!
131 \brief It returns the envelope.
132
133 \return The envelope.
134 */
136
137 /*! \brief It creates a new copy of this object. */
139
140 //@}
141
142 private:
143
144 PropertyName* m_property; //!< A geometric property. (theoretically it is optional, but it is required by the XML schema)
145 te::gml::Envelope* m_envelope; //!< Bounding box constraint. (Mandatory)
146 };
147
148 } // end namespace fe
149} // end namespace te
150
151#endif // __TERRALIB_FE_INTERNAL_BBOXOP_H
#define TE_DEFINE_VISITABLE
Definition: BaseVisitable.h:75
A spatial operator determines whether its geometric arguments satisfy the stated spatial relationship...
An abstract interface for operators.
Definition: AbstractOp.h:48
A convenient and more compact way of encoding the very common bounding box constraint based on an env...
Definition: BBOXOp.h:72
~BBOXOp()
Destructor.
BBOXOp()
It initializes a new BBOXOp.
void setEnvelope(te::gml::Envelope *e)
It sets the envelope.
BBOXOp(PropertyName *p, te::gml::Envelope *e)
It initializes a new BBOXOp.
te::gml::Envelope * m_envelope
Bounding box constraint. (Mandatory)
Definition: BBOXOp.h:145
void setProperty(PropertyName *p)
It sets property name.
te::gml::Envelope * getEnvelope() const
It returns the envelope.
AbstractOp * clone() const
It creates a new copy of this object.
PropertyName * m_property
A geometric property. (theoretically it is optional, but it is required by the XML schema)
Definition: BBOXOp.h:144
PropertyName * getProperty() const
It returns the property name.
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
Envelope defines an extent using a pair of positions defining opposite corners in arbitrary dimension...
Definition: Envelope.h:53
TerraLib.
#define TEFEEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:59