Enums.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/geometry/Enums.h
22 
23  \brief Enumerations related to Geometry module.
24 */
25 
26 #ifndef __TERRALIB_GEOMETRY_INTERNAL_ENUMS_H
27 #define __TERRALIB_GEOMETRY_INTERNAL_ENUMS_H
28 
29 namespace te
30 {
31  namespace gm
32  {
33  /*!
34  \enum GeomType
35 
36  \brief Each enumerated type is compatible with a Well-known Binary (WKB) type code.
37 
38  These are all WKB geometry types that TerraLib knows how to
39  encode or decode. The values follows OGC Simple Feature Specification (SFS).
40  */
41  enum GeomType
42  {
43  GeometryType = 0, /*!< Geometry is not instantiable but this is the general type for geometries in R2 (x, y). */
44  GeometryZType = 1000, /*!< Geometry is not instantiable but this is the general type for geometries in R3 (x, y, z). */
45  GeometryMType = 2000, /*!< Geometry is not instantiable but this is the general type for geometries in R3 (x, y, m). */
46  GeometryZMType = 3000, /*!< Geometry is not instantiable but this is the general type for geometries in R4 (x, y, z, m). */
47 
48  PointType = 1, /*!< A point in R2 with coordinate values for x and y. */
49  PointZType = 1001, /*!< A point in R3 with coordinate values for x, y and z. */
50  PointMType = 2001, /*!< A point in R3 with coordinate values for x, y and m. */
51  PointZMType = 3001, /*!< A point in R4 with coordinate values for x, y, z and m. */
52  PointKdType = 0xFFFFFFFD, /*!< A point in Rn with k coordinate values. */
53 
54  LineStringType = 2, /*!< A LineString in R2 with coordinate values for x and y. */
55  LineStringZType = 1002, /*!< A LineString in R3 with coordinate values for x, y and z. */
56  LineStringMType = 2002, /*!< A LineString in R3 with coordinate values for x, y and m. */
57  LineStringZMType = 3002, /*!< A LineString in R4 with coordinate values for x, y, z and m. */
58 
59  CircularStringType = 8, /*!< A CircularString in R2 with coordinate values for x and y. */
60  CircularStringZType = 1008, /*!< A CircularString in R3 with coordinate values for x, y and z. */
61  CircularStringMType = 2008, /*!< A CircularString in R3 with coordinate values for x, y and m. */
62  CircularStringZMType = 3008, /*!< A CircularString in R4 with coordinate values for x, y, z and m. */
63 
64  CompoundCurveType = 9, /*!< A CompoundCurve in R2 with coordinate values for x and y. */
65  CompoundCurveZType = 1009, /*!< A CompoundCurve in R3 with coordinate values for x, y and z. */
66  CompoundCurveMType = 2009, /*!< A CompoundCurve in R3 with coordinate values for x, y and m. */
67  CompoundCurveZMType = 3009, /*!< A CompoundCurve in R4 with coordinate values for x, y, z and m. */
68 
69  PolygonType = 3, /*!< A Polygon in R2 with coordinate values for x and y. */
70  PolygonZType = 1003, /*!< A Polygon in R3 with coordinate values for x, y and z. */
71  PolygonMType = 2003, /*!< A Polygon in R3 with coordinate values for x, y and m. */
72  PolygonZMType = 3003, /*!< A Polygon in R4 with coordinate values for x, y, z and m. */
73 
74  CurvePolygonType = 10, /*!< A CurvePolygon in R2 with coordinate values for x and y. */
75  CurvePolygonZType = 1010, /*!< A CurvePolygon in R3 with coordinate values for x, y and z. */
76  CurvePolygonMType = 2010, /*!< A CurvePolygon in R3 with coordinate values for x, y and m. */
77  CurvePolygonZMType = 3010, /*!< A CurvePolygon in R4 with coordinate values for x, y, z and m. */
78 
79  GeometryCollectionType = 7, /*!< A GeometryCollection in R2 with coordinate values for x and y. */
80  GeometryCollectionZType = 1007, /*!< A GeometryCollection in R3 with coordinate values for x, y and z. */
81  GeometryCollectionMType = 2007, /*!< A GeometryCollection in R3 with coordinate values for x, y and m. */
82  GeometryCollectionZMType = 3007, /*!< A GeometryCollection in R4 with coordinate values for x, y, z and m. */
83 
84  MultiPointType = 4, /*!< A MultiPoint in R2 with coordinate values for x and y. */
85  MultiPointZType = 1004, /*!< A MultiPoint in R3 with coordinate values for x, y and z. */
86  MultiPointMType = 2004, /*!< A MultiPoint in R3 with coordinate values for x, y and m. */
87  MultiPointZMType = 3004, /*!< A MultiPoint in R4 with coordinate values for x, y, z and m. */
88 
89  MultiLineStringType = 5, /*!< A MultiLineString in R2 with coordinate values for x and y. */
90  MultiLineStringZType = 1005, /*!< A MultiLineString in R3 with coordinate values for x, y and z. */
91  MultiLineStringMType = 2005, /*!< A MultiLineString in R3 with coordinate values for x, y and m. */
92  MultiLineStringZMType = 3005, /*!< A MultiLineString in R4 with coordinate values for x, y, z and m. */
93 
94  MultiPolygonType = 6, /*!< A MultiPolygon in R2 with coordinate values for x and y. */
95  MultiPolygonZType = 1006, /*!< A MultiPolygon in R3 with coordinate values for x, y and z. */
96  MultiPolygonMType = 2006, /*!< A MultiPolygon in R3 with coordinate values for x, y and m. */
97  MultiPolygonZMType = 3006, /*!< A MultiPolygon in R4 with coordinate values for x, y, z and m. */
98 
99  MultiSurfaceType = 12, /*!< A MultiSurface in R2 with coordinate values for x and y. */
100  MultiSurfaceZType = 1012, /*!< A MultiSurface in R3 with coordinate values for x, y and z. */
101  MultiSurfaceMType = 2012, /*!< A MultiSurface in R3 with coordinate values for x, y and m. */
102  MultiSurfaceZMType = 3012, /*!< A MultiSurface in R4 with coordinate values for x, y, z and m. */
103 
104  PolyhedralSurfaceType = 15, /*!< A PolyhedralSurface in R2 with coordinate values for x and y. */
105  PolyhedralSurfaceZType = 1015, /*!< A PolyhedralSurface in R3 with coordinate values for x, y and z. */
106  PolyhedralSurfaceMType = 2015, /*!< A PolyhedralSurface in R3 with coordinate values for x, y and m. */
107  PolyhedralSurfaceZMType = 3015, /*!< A PolyhedralSurface in R4 with coordinate values for x, y, z and m. */
108 
109  TINType = 16, /*!< A TIN in R2 with coordinate values for x and y. */
110  TINZType = 1016, /*!< A TIN in R3 with coordinate values for x, y and z. */
111  TINMType = 2016, /*!< A TIN in R3 with coordinate values for x, y and m. */
112  TINZMType = 3016, /*!< A TIN in R4 with coordinate values for x, y, z and m. */
113 
114  TriangleType = 17, /*!< A Triangle in R2 with coordinate values for x and y. */
115  TriangleZType = 1017, /*!< A Triangle in R3 with coordinate values for x, y and z. */
116  TriangleMType = 2017, /*!< A Triangle in R3 with coordinate values for x, y and m. */
117  TriangleZMType = 3017, /*!< A Triangle in R4 with coordinate values for x, y, z and m. */
118 
119  UnknownGeometryType = 0xFFFFFFFF /*!< Just a marker for an unknown geometry type. */
120  };
121 
122  /*!
123  \enum SpatialRelation
124 
125  \brief Spatial relations between geometric objects.
126  */
128  {
130  INTERSECTS = 1, /*!< */
131  DISJOINT = 2, /*!< */
132  TOUCHES = 4, /*!< */
133  OVERLAPS = 8, /*!< */
134  CROSSES = 16, /*!< */
135  WITHIN = 32, /*!< */
136  CONTAINS = 64, /*!< */
137  COVERS = 128, /*!< */
138  COVEREDBY = 256, /*!< */
139  EQUALS = 512 /*!< */
140  };
141 
142  /*!
143  \enum Dimensionality
144 
145  \brief From Wikipedia: "in mathematics, the dimension of an object is an intrinsic property, independent of the space in which the object may happen to be embedded".
146  */
148  {
149  P = 0, /*!< Points are 0-dimensional. */
150  L = 1, /*!< Lines are 1-dimensional. */
151  A = 2 /*!< Polygons are 2-dimenional. */
152  };
153 
154  /*!
155  \enum BufferCapStyle
156 
157  \brief Buffer end cap style.
158 
159  The end cap style specifies the buffer geometry that will be
160  created at the ends of LineStrings.
161  */
163  {
164  CapRoundType, /*!< A semi-circle (default). */
165  CapButtType, /*!< A straight line perpendicular to the end segment */
166  CapSquareType /*!< A half-square */
167  };
168 
169  } // end namespace common
170 } // end namespace te
171 
172 #endif // __TERRALIB_GEOMETRY_INTERNAL_ENUMS_H
173 
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
Definition: Enums.h:41
BufferCapStyle
Buffer end cap style.
Definition: Enums.h:162
SpatialRelation
Spatial relations between geometric objects.
Definition: Enums.h:127
Dimensionality
From Wikipedia: "in mathematics, the dimension of an object is an intrinsic property, independent of the space in which the object may happen to be embedded".
Definition: Enums.h:147
URI C++ Library.