All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Curve.cpp
Go to the documentation of this file.
1 /* Copyright (C) 2008-2013 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/geometry/Curve.cpp
22 
23  \brief Curve is an abstract class that represents 1-dimensional geometric objects stored as a sequence of coordinates.
24 */
25 
26 // TerraLib
27 #include "Curve.h"
28 
30  : Geometry(t, srid, mbr)
31 {
32 }
33 
35  : Geometry(rhs)
36 {
37 }
38 
40 {
42 
43  return *this;
44 }
45 
47 {
48  return (isClosed() && isSimple());
49 }
50 
52 {
53  return te::gm::L;
54 }
55 
Dimensionality getDimension() const
Curves are 1-dimensional objects.
Definition: Curve.cpp:51
Curve is an abstract class that represents 1-dimensional geometric objects stored as a sequence of co...
Definition: Curve.h:57
Dimensionality
From Wikipedia: &quot;in mathematics, the dimension of an object is an intrinsic property, independent of the space in which the object may happen to be embedded&quot;.
Definition: Enums.h:142
bool isRing() const
It returns true if the curve is closed and simple.
Definition: Curve.cpp:46
Curve(GeomType t, int srid=0, Envelope *mbr=0)
It initializes the curve with the specified spatial reference system id and envelope.
Definition: Curve.cpp:29
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:73
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
Definition: Enums.h:41
virtual Geometry & operator=(const Geometry &rhs)
Assignment operator.
Definition: Geometry.cpp:77
Curve is an abstract class that represents 1-dimensional geometric objects stored as a sequence of co...
An Envelope defines a 2D rectangular region.
Definition: Envelope.h:51
virtual Curve & operator=(const Curve &rhs)
Assignment operator.
Definition: Curve.cpp:39