All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
DistanceBuffer.cpp
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.cpp
22 
23  \brief Distance buffer operator.
24  */
25 
26 // TerraLib
27 #include "../common/Distance.h"
28 #include "../geometry/Geometry.h"
29 #include "DistanceBuffer.h"
30 #include "PropertyName.h"
31 
33  : SpatialOp(opName),
34  m_property(0),
35  m_geom(0),
36  m_d(0)
37 {
38 }
39 
41  PropertyName* p,
44  : SpatialOp(opName),
45  m_property(p),
46  m_geom(g),
47  m_d(d)
48 {
49 }
50 
52 {
53  delete m_property;
54  delete m_geom;
55  delete m_d;
56 }
57 
59 {
60  delete m_property;
61  m_property = p;
62 }
63 
65 {
66  return m_property;
67 }
68 
70 {
71  delete m_geom;
72  m_geom = g;
73 }
74 
76 {
77  return m_geom;
78 }
79 
81 {
82  delete m_d;
83  m_d = d;
84 }
85 
87 {
88  return m_d;
89 }
90 
te::gm::Geometry * getGeometry() const
It returns the geometry.
void setGeometry(te::gm::Geometry *g)
It sets the geometry.
te::common::Distance * getDistance() const
It returns the distance.
void setDistance(te::common::Distance *d)
It sets the distance.
A spatial operator determines whether its geometric arguments satisfy the stated spatial relationship...
Definition: SpatialOp.h:49
virtual ~DistanceBuffer()
Destructor.
void setProperty(PropertyName *p)
It sets property name.
This class is used to encode the name of any property of an object.
Definition: PropertyName.h:54
PropertyName * getProperty() const
It returns the property name.
Distance buffer operator.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:73
DistanceBuffer(const char *opName=0)
It initializes the DistanceBuffer operator.
A given distance has a measurement and a unit-of-measure.
Definition: Distance.h:44