/usr/include/geos/noding/OrientedCoordinateArray.h is in libgeos-dev 3.2.2-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 | /**********************************************************************
 * $Id: OrientedCoordinateArray.h 2809 2009-12-06 01:05:24Z mloskot $
 *
 * GEOS - Geometry Engine Open Source
 * http://geos.refractions.net
 *
 * Copyright (C) 2009    Sandro Santilli <strk@keybit.net>
 *
 * This is free software; you can redistribute and/or modify it under
 * the terms of the GNU Lesser General Public Licence as published
 * by the Free Software Foundation. 
 * See the COPYING file for more information.
 *
 **********************************************************************
 *
 * Last port: noding/OrientedCoordinateArray.java rev. 1.1 (JTS-1.9)
 *
 **********************************************************************/
#ifndef GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
#define GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
#include <geos/export.h>
//#include <vector>
//#include <iostream>
//#include <geos/inline.h>
// Forward declarations
namespace geos {
	namespace geom {
		class CoordinateSequence;
	}
	namespace noding {
		//class SegmentString;
	}
}
namespace geos {
namespace noding { // geos.noding
/** \brief
 * Allows comparing {@link geom::CoordinateSequence}s
 * in an orientation-independent way.
 */
class GEOS_DLL OrientedCoordinateArray
{
public:
	/**
	 * Creates a new {@link OrientedCoordinateArray}
	 * for the given {@link geom::CoordinateSequence}.
	 *
	 * @param pts the coordinates to orient
	 */
	OrientedCoordinateArray(const geom::CoordinateSequence& pts)
		:
		pts(pts),
		orientationVar(orientation(pts))
	{
	}
	/** \brief
	 * Compares two {@link OrientedCoordinateArray}s for their
	 * relative order
	 *
	 * @return -1 this one is smaller
	 * @return 0 the two objects are equal
	 * @return 1 this one is greater
	 *
	 * In JTS, this is used automatically by ordered lists.
	 * In C++, operator< would be used instead....
	 */
	int compareTo(const OrientedCoordinateArray& o1) const;
private:
	static int compareOriented(const geom::CoordinateSequence& pts1,
                                     bool orientation1,
                                     const geom::CoordinateSequence& pts2,
                                     bool orientation2);
	/**
	 * Computes the canonical orientation for a coordinate array.
	 *
	 * @param pts the array to test
	 * @return <code>true</code> if the points are oriented forwards
	 * @return <code>false</code if the points are oriented in reverse
	 */
	static bool orientation(const geom::CoordinateSequence& pts);
	/// Externally owned
	const geom::CoordinateSequence& pts;
	bool orientationVar;
    // Declare type as noncopyable
    OrientedCoordinateArray(const OrientedCoordinateArray& other);
    OrientedCoordinateArray& operator=(const OrientedCoordinateArray& rhs);
};
} // namespace geos.noding
} // namespace geos
#endif // GEOS_NODING_ORIENTEDCOORDINATEARRAY_H
 |