GEOS 3.6.2
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
30namespace geos {
31 namespace geom {
33 }
34 namespace noding {
35 //class SegmentString;
36 }
37}
38
39namespace geos {
40namespace noding { // geos.noding
41
47{
48public:
49
57 :
58 pts(&pts),
59 orientationVar(orientation(pts))
60 {
61 }
62
74 int compareTo(const OrientedCoordinateArray& o1) const;
75
76
77private:
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//
104inline 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
The internal representation of a list of coordinates inside a Geometry.
Definition CoordinateSequence.h:59
Allows comparing geom::CoordinateSequences in an orientation-independent way.
Definition OrientedCoordinateArray.h:47
int compareTo(const OrientedCoordinateArray &o1) const
Compares two OrientedCoordinateArrays for their relative order.
OrientedCoordinateArray(const geom::CoordinateSequence &pts)
Definition OrientedCoordinateArray.h:56
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Classes to compute nodings for arrangements of line segments and line segment sequences.
Definition PreparedLineString.h:27
bool operator<(const OrientedCoordinateArray &oca1, const OrientedCoordinateArray &oca2)
Strict weak ordering operator for OrientedCoordinateArray.
Definition OrientedCoordinateArray.h:104
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25