All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
FixGeometries.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 terralib/geometry/FixGeometries.cpp
22 
23  \brief This class contains attributes and functions necessary to fix and report unconsistencies of geometries.
24 */
25 
26 // TerraLib
27 #include "../common/Translator.h"
28 #include "Coord2D.h"
29 #include "Envelope.h"
30 #include "Exception.h"
31 #include "Geometry.h"
32 #include "LinearRing.h"
33 #include "LineString.h"
34 #include "Point.h"
35 #include "Polygon.h"
36 #include "FixGeometries.h"
37 
39 {
40  te::gm::Geometry* outGeom;
41 
42  te::gm::GeomType type = inputGeom->getGeomTypeId();
43 
44  switch (type)
45  {
47  break;
49  break;
51  break;
52  case te::gm::PointType:
53  break;
55  break;
57  break;
58  default:
59  //UnknownGeometryType:
60  break;
61  }
62 
63  return outGeom;
64 }
TEGEOMEXPORT Geometry * FixGeometry(te::gm::Geometry *inputGeom)
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
Definition: Enums.h:41
This class contains attributes and functions necessary to fix and report unconsistencies of geometrie...
A LinearRing is a LineString that is both closed and simple.
A point with x and y coordinate values.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
An Envelope defines a 2D rectangular region.
GeomType getGeomTypeId() const
It returns the geometry subclass type identifier.
Definition: Geometry.h:178
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:73
An exception class for the Geometry module.
Polygon is a subclass of CurvePolygon whose rings are defined by linear rings.
LineString is a curve with linear interpolation between points.
An utility struct for representing 2D coordinates.