GEOS
3.9.0
include
geos
geomgraph
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
42
class
GEOS_DLL
Depth
{
43
public
:
44
static
int
depthAtLocation(
geom::Location
location);
45
Depth
();
46
virtual
~
Depth
() =
default
;
// FIXME: shoudn't be virtual!
47
int
getDepth(
int
geomIndex,
int
posIndex)
const
;
48
void
setDepth(
int
geomIndex,
int
posIndex,
int
depthValue);
49
geom::Location
getLocation(
int
geomIndex,
int
posIndex)
const
;
50
void
add(
int
geomIndex,
int
posIndex,
geom::Location
location);
51
bool
isNull()
const
;
52
bool
isNull(
int
geomIndex)
const
;
53
bool
isNull(
int
geomIndex,
int
posIndex)
const
;
54
int
getDelta(
int
geomIndex)
const
;
55
void
normalize();
56
void
add(
const
Label
& lbl);
57
std::string toString()
const
;
58
private
:
59
enum
{
60
NULL_VALUE = -1
//Replaces NULL
61
};
62
int
depth[2][3];
63
};
64
65
}
// namespace geos.geomgraph
66
}
// namespace geos
67
68
#ifdef GEOS_INLINE
69
# include "geos/geomgraph/Depth.inl"
70
#endif
71
72
#endif // ifndef GEOS_GEOMGRAPH_DEPTH_H
geos::geom::Location
Location
Constants representing the location of a point relative to a geometry.
Definition:
Location.h:34
geos::geomgraph::Label
A Label indicates the topological relationship of a component of a topology graph to a given Geometry...
Definition:
Label.h:59
geos
Basic namespace for all GEOS functionalities.
Definition:
IndexedNestedRingTester.h:26
geos::geomgraph::Depth
A Depth object records the topological depth of the sides of an Edge for up to two Geometries.
Definition:
Depth.h:42
Generated by
1.8.20