GEOS 3.3.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

OrientedCoordinateArray.h
1 /**********************************************************************
2 * $Id: OrientedCoordinateArray.h 2809 2009-12-06 01:05:24Z mloskot $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2009 Sandro Santilli <strk@keybit.net>
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: noding/OrientedCoordinateArray.java rev. 1.1 (JTS-1.9)
17 *
18 **********************************************************************/
19
20 #ifndef GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
21 #define GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
22
23 #include <geos/export.h>
24
25 //#include <vector>
26 //#include <iostream>
27
28 //#include <geos/inline.h>
29
30 // Forward declarations
31 namespace geos {
32 namespace geom {
33 class CoordinateSequence;
34 }
35 namespace noding {
36 //class SegmentString;
37 }
38 }
39
40 namespace geos {
41 namespace noding { // geos.noding
42
47 class GEOS_DLL OrientedCoordinateArray
48 {
49 public:
50
57 OrientedCoordinateArray(const geom::CoordinateSequence& pts)
58 :
59 pts(pts),
60 orientationVar(orientation(pts))
61 {
62 }
63
75 int compareTo(const OrientedCoordinateArray& o1) const;
76
77
78 private:
79
80 static int compareOriented(const geom::CoordinateSequence& pts1,
81 bool orientation1,
82 const geom::CoordinateSequence& pts2,
83 bool orientation2);
84
85
93 static bool orientation(const geom::CoordinateSequence& pts);
94
96 const geom::CoordinateSequence& pts;
97
98 bool orientationVar;
99
100 // Declare type as noncopyable
101 OrientedCoordinateArray(const OrientedCoordinateArray& other);
102 OrientedCoordinateArray& operator=(const OrientedCoordinateArray& rhs);
103 };
104
105 } // namespace geos.noding
106 } // namespace geos
107
108
109 #endif // GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
110