This file is indexed.

/usr/include/geos/operation/predicate/RectangleIntersects.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
/**********************************************************************
 * $Id: RectangleIntersects.h 2781 2009-12-03 19:48:04Z mloskot $
 *
 * GEOS - Geometry Engine Open Source
 * http://geos.refractions.net
 *
 * Copyright (C) 2006 Refractions Research Inc.
 *
 * 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: operation/predicate/RectangleIntersects.java rev 1.4 (JTS-1.10)
 *
 **********************************************************************/

#ifndef GEOS_OP_PREDICATE_RECTANGLEINTERSECTS_H
#define GEOS_OP_PREDICATE_RECTANGLEINTERSECTS_H

#include <geos/export.h>

#include <geos/geom/Polygon.h> // for inlines

// Forward declarations
namespace geos {
	namespace geom {
		class Envelope;
		//class Polygon;
	}
}

namespace geos {
namespace operation { // geos::operation
namespace predicate { // geos::operation::predicate

/** \brief
 * Optimized implementation of spatial predicate "intersects"
 * for cases where the first Geometry is a rectangle.
 * 
 * As a further optimization,
 * this class can be used directly to test many geometries against a single
 * rectangle.
 *
 */
class GEOS_DLL RectangleIntersects {

private:

	const geom::Polygon &rectangle;

 	const geom::Envelope &rectEnv;

    // Declare type as noncopyable
    RectangleIntersects(const RectangleIntersects& other);
    RectangleIntersects& operator=(const RectangleIntersects& rhs);

public:

	/** \brief
	 * Crossover size at which brute-force intersection scanning
	 * is slower than indexed intersection detection.
	 *
	 * Must be determined empirically.  Should err on the
	 * safe side by making value smaller rather than larger.
	 */
	static const size_t MAXIMUM_SCAN_SEGMENT_COUNT;

	/** \brief
	 * Create a new intersects computer for a rectangle.
	 *
	 * @param newRect a rectangular geometry
	 */
	RectangleIntersects(const geom::Polygon &newRect)
		:
		rectangle(newRect),
		rectEnv(*(newRect.getEnvelopeInternal()))
	{}

	bool intersects(const geom::Geometry& geom);

	static bool intersects(const geom::Polygon &rectangle,
			const geom::Geometry &b)
	{
		RectangleIntersects rp(rectangle); 
		return rp.intersects(b);
	}

};


} // namespace geos::operation::predicate
} // namespace geos::operation
} // namespace geos

#endif // ifndef GEOS_OP_PREDICATE_RECTANGLEINTERSECTS_H