00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
00020 #define GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
00021
00022 #include <geos/export.h>
00023
00024
00025
00026
00027
00028
00029
00030 namespace geos {
00031 namespace geom {
00032 class CoordinateSequence;
00033 }
00034 namespace noding {
00035
00036 }
00037 }
00038
00039 namespace geos {
00040 namespace noding {
00041
00046 class GEOS_DLL OrientedCoordinateArray
00047 {
00048 public:
00049
00056 OrientedCoordinateArray(const geom::CoordinateSequence& pts)
00057 :
00058 pts(&pts),
00059 orientationVar(orientation(pts))
00060 {
00061 }
00062
00074 int compareTo(const OrientedCoordinateArray& o1) const;
00075
00076
00077 private:
00078
00079 static int compareOriented(const geom::CoordinateSequence& pts1,
00080 bool orientation1,
00081 const geom::CoordinateSequence& pts2,
00082 bool orientation2);
00083
00084
00092 static bool orientation(const geom::CoordinateSequence& pts);
00093
00095 const geom::CoordinateSequence* pts;
00096
00097 bool orientationVar;
00098
00099 };
00100
00102
00104 inline bool operator< ( const OrientedCoordinateArray& oca1,
00105 const OrientedCoordinateArray& oca2 )
00106 {
00107 return oca1.compareTo(oca2)<0;
00108 }
00109
00110 }
00111 }
00112
00113
00114 #endif // GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
00115