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

- File List

# OrientedCoordinateArray.h

    00001 /**********************************************************************
    00002  * $Id: OrientedCoordinateArray.h 2809 2009-12-06 01:05:24Z mloskot $
    00003  *
    00004  * GEOS - Geometry Engine Open Source
    00005  * http://geos.refractions.net
    00006  *
    00007  * Copyright (C) 2009    Sandro Santilli <strk@keybit.net>
    00008  *
    00009  * This is free software; you can redistribute and/or modify it under
    00010  * the terms of the GNU Lesser General Public Licence as published
    00011  * by the Free Software Foundation.
    00012  * See the COPYING file for more information.
    00013  *
    00014  **********************************************************************
    00015  *
    00016  * Last port: noding/OrientedCoordinateArray.java rev. 1.1 (JTS-1.9)
    00017  *
    00018  **********************************************************************/
    00019
    00020 #ifndef GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
    00021 #define GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
    00022
    00023 #include <geos/export.h>
    00024
    00025 //#include <vector>
    00026 //#include <iostream>
    00027
    00028 //#include <geos/inline.h>
    00029
    00030 // Forward declarations
    00031 namespace geos {
    00032         namespace geom {
    00033                 class CoordinateSequence;
    00034         }
    00035         namespace noding {
    00036                 //class SegmentString;
    00037         }
    00038 }
    00039
    00040 namespace geos {
    00041 namespace noding { // geos.noding
    00042
    00047 class GEOS_DLL OrientedCoordinateArray
    00048 {
    00049 public:
    00050
    00057         OrientedCoordinateArray(const geom::CoordinateSequence& pts)
    00058                 :
    00059                 pts(pts),
    00060                 orientationVar(orientation(pts))
    00061         {
    00062         }
    00063
    00075         int compareTo(const OrientedCoordinateArray& o1) const;
    00076
    00077
    00078 private:
    00079
    00080         static int compareOriented(const geom::CoordinateSequence& pts1,
    00081                                      bool orientation1,
    00082                                      const geom::CoordinateSequence& pts2,
    00083                                      bool orientation2);
    00084
    00085
    00093         static bool orientation(const geom::CoordinateSequence& pts);
    00094
    00096         const geom::CoordinateSequence& pts;
    00097
    00098         bool orientationVar;
    00099
    00100     // Declare type as noncopyable
    00101     OrientedCoordinateArray(const OrientedCoordinateArray& other);
    00102     OrientedCoordinateArray& operator=(const OrientedCoordinateArray& rhs);
    00103 };
    00104
    00105 } // namespace geos.noding
    00106 } // namespace geos
    00107
    00108
    00109 #endif // GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
    00110