GEOS
3.4.2
Main Page
Related Pages
Namespaces
Classes
Files
File List
include
geos
noding
OrientedCoordinateArray.h
1
/**********************************************************************
2
*
3
* GEOS - Geometry Engine Open Source
4
* http://geos.osgeo.org
5
*
6
* Copyright (C) 2009 Sandro Santilli <strk@keybit.net>
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: noding/OrientedCoordinateArray.java rev. 1.1 (JTS-1.9)
16
*
17
**********************************************************************/
18
19
#ifndef GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
20
#define GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
21
22
#include <geos/export.h>
23
24
//#include <vector>
25
//#include <iostream>
26
27
//#include <geos/inline.h>
28
29
// Forward declarations
30
namespace
geos {
31
namespace
geom {
32
class
CoordinateSequence;
33
}
34
namespace
noding {
35
//class SegmentString;
36
}
37
}
38
39
namespace
geos {
40
namespace
noding {
// geos.noding
41
46
class
GEOS_DLL
OrientedCoordinateArray
47
{
48
public
:
49
56
OrientedCoordinateArray
(
const
geom::CoordinateSequence
& pts)
57
:
58
pts(&pts),
59
orientationVar(orientation(pts))
60
{
61
}
62
74
int
compareTo(
const
OrientedCoordinateArray
& o1)
const
;
75
76
77
private
:
78
79
static
int
compareOriented(
const
geom::CoordinateSequence
& pts1,
80
bool
orientation1,
81
const
geom::CoordinateSequence
& pts2,
82
bool
orientation2);
83
84
92
static
bool
orientation(
const
geom::CoordinateSequence
& pts);
93
95
const
geom::CoordinateSequence
* pts;
96
97
bool
orientationVar;
98
99
};
100
102
//
104
inline
bool
operator<
(
const
OrientedCoordinateArray
& oca1,
105
const
OrientedCoordinateArray
& oca2 )
106
{
107
return
oca1.
compareTo
(oca2)<0;
108
}
109
110
}
// namespace geos.noding
111
}
// namespace geos
112
113
114
#endif // GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
115
Generated on Fri Mar 6 2015 15:59:26 for GEOS by
1.8.2