GEOS  3.8.0dev
Depth.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2005-2006 Refractions Research Inc.
7  * Copyright (C) 2001-2002 Vivid Solutions Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  **********************************************************************
15  *
16  * Last port: geomgraph/Depth.java rev. 1.4 (JTS-1.10)
17  *
18  **********************************************************************/
19 
20 
21 #ifndef GEOS_GEOMGRAPH_DEPTH_H
22 #define GEOS_GEOMGRAPH_DEPTH_H
23 
24 #include <geos/export.h>
25 #include <geos/geom/Location.h>
26 #include <string>
27 
28 #include <geos/inline.h>
29 
30 // Forward declarations
31 namespace geos {
32 namespace geomgraph {
33 class Label;
34 }
35 }
36 
37 namespace geos {
38 namespace geomgraph { // geos.geomgraph
39 
40 class GEOS_DLL Depth {
41 public:
42  static int depthAtLocation(geom::Location location);
43  Depth();
44  virtual ~Depth(); // FIXME: shoudn't be virtual!
45  int getDepth(int geomIndex, int posIndex) const;
46  void setDepth(int geomIndex, int posIndex, int depthValue);
47  geom::Location getLocation(int geomIndex, int posIndex) const;
48  void add(int geomIndex, int posIndex, geom::Location location);
49  bool isNull() const;
50  bool isNull(int geomIndex) const;
51  bool isNull(int geomIndex, int posIndex) const;
52  int getDelta(int geomIndex) const;
53  void normalize();
54  void add(const Label& lbl);
55  std::string toString() const;
56 private:
57  enum {
58  NULL_VALUE = -1 //Replaces NULL
59  };
60  int depth[2][3];
61 };
62 
63 } // namespace geos.geomgraph
64 } // namespace geos
65 
66 #endif // ifndef GEOS_GEOMGRAPH_DEPTH_H
Location
Constants representing the location of a point relative to a geometry.
Definition: Location.h:33
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25