GEOS 3.8.1
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
31namespace geos {
32namespace geomgraph {
33class Label;
34}
35}
36
37namespace geos {
38namespace geomgraph { // geos.geomgraph
39
40class GEOS_DLL Depth {
41public:
42 static int depthAtLocation(geom::Location location);
43 Depth();
44 virtual ~Depth() = default; // 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;
56private:
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#ifdef GEOS_INLINE
67# include "geos/geomgraph/Depth.inl"
68#endif
69
70#endif // ifndef GEOS_GEOMGRAPH_DEPTH_H
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25