GEOS
3.14.0dev
Toggle main menu visibility
Main Page
Related Pages
Topics
Namespaces
Namespace List
Namespace Members
All
b
c
g
j
l
n
o
p
r
s
Functions
Typedefs
Enumerations
Enumerator
Classes
Class List
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
a
c
d
e
h
i
m
n
p
r
s
t
z
Typedefs
Enumerations
Enumerator
Related Symbols
Files
File List
File Members
All
f
g
i
Functions
f
g
i
Typedefs
Enumerations
Enumerator
g
include
geos
index
kdtree
KdNode.h
1
/**********************************************************************
2
*
3
* GEOS - Geometry Engine Open Source
4
* http://geos.osgeo.org
5
*
6
* Copyright (C) 2020 Paul Ramsey <pramsey@cleverelephant.ca>
7
*
8
* This is free software; you can redistribute and/or modify it under
9
* the terms of the GNU Lesser General Public Licence as published
10
* by the Free Software Foundation.
11
* See the COPYING file for more information.
12
*
13
**********************************************************************
14
*
15
* Last port: index/kdtree/Node.java rev 1.8 (JTS-1.10)
16
*
17
**********************************************************************/
18
19
#pragma once
20
21
#include <geos/geom/Coordinate.h>
// for composition
22
23
namespace
geos
{
24
namespace
index {
// geos::index
25
namespace
kdtree {
// geos::index::kdtree
26
30
class
GEOS_DLL
KdNode
{
31
32
private
:
33
34
geom::Coordinate
p;
35
void
* data;
36
KdNode
* left;
37
KdNode
* right;
38
std::size_t count;
39
40
public
:
41
42
KdNode
(
double
p_x,
double
p_y,
void
* p_data);
43
KdNode
(
const
geom::Coordinate
& p_p,
void
* p_data);
44
45
double
getX() {
return
p.x; }
46
double
getY() {
return
p.y; }
47
const
geom::Coordinate
& getCoordinate() {
return
p; }
48
void
* getData() {
return
data; }
49
KdNode
* getLeft() {
return
left; }
50
KdNode
* getRight() {
return
right; }
51
void
increment() { count++; }
52
std::size_t getCount() {
return
count; }
53
bool
isRepeated() {
return
count > 1; }
54
void
setLeft(
KdNode
* p_left) { left = p_left; }
55
void
setRight(
KdNode
* p_right) { right = p_right; }
56
57
};
30
class
GEOS_DLL
KdNode
{
…
};
58
59
}
// namespace geos::index::kdtree
60
}
// namespace geos::index
61
}
// namespace geos
62
63
64
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition
Coordinate.h:217
geos::index::kdtree::KdNode
Definition
KdNode.h:30
geos
Basic namespace for all GEOS functionalities.
Definition
geos.h:39
Generated by
1.9.8