All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Envelope.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 Envelope.cpp
22 
23  \brief GML Envelope class implementation.
24  */
25 
26 // TerraLib
27 #include "../geometry/Envelope.h"
28 #include "Envelope.h"
29 
31  : m_envelope(0),
32  m_srid(-1)
33 {
34 }
35 
37  : m_envelope(e),
38  m_srid(srid)
39 {
40 }
41 
43 {
44  delete m_envelope;
45 }
46 
48 {
49  return m_envelope;
50 }
51 
52 void te::gml::Envelope::setCoordinates(const double& llx, const double& lly, const double& urx, const double& ury)
53 {
54  if(m_envelope == 0)
55  m_envelope = new te::gm::Envelope(llx, lly, urx, ury);
56  else
57  m_envelope->init(llx, lly, urx, ury);
58 }
59 
61 {
62  return m_srid;
63 }
64 
66 {
67  m_srid = srid;
68 }
69 
te::gm::Envelope * getCoordinates() const
Definition: Envelope.cpp:47
int getSRID() const
Definition: Envelope.cpp:60
void setCoordinates(const double &llx, const double &lly, const double &urx, const double &ury)
Definition: Envelope.cpp:52
An Envelope defines a 2D rectangular region.
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
Envelope()
It initializes a new empty Envelope.
Definition: Envelope.cpp:30
void setSRID(int srid)
Definition: Envelope.cpp:65
~Envelope()
Destructor.
Definition: Envelope.cpp:42