This file is indexed.

/usr/include/geos/index/quadtree/Node.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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
/**********************************************************************
 * $Id: Node.h 2556 2009-06-06 22:22:28Z strk $
 *
 * 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: index/quadtree/Node.java rev 1.8 (JTS-1.10)
 *
 **********************************************************************/

#ifndef GEOS_IDX_QUADTREE_NODE_H
#define GEOS_IDX_QUADTREE_NODE_H

#include <geos/export.h>
#include <geos/index/quadtree/NodeBase.h> // for inheritance
#include <geos/geom/Coordinate.h> // for composition
#include <geos/geom/Envelope.h> // for inline

#include <string>
#include <memory>

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

namespace geos {
namespace index { // geos::index
namespace quadtree { // geos::index::quadtree

/**
 * \brief
 * Represents a node of a Quadtree.
 *
 * Nodes contain items which have a spatial extent corresponding to
 * the node's position in the quadtree.
 *
 */
class GEOS_DLL Node: public NodeBase {

private:

	/// Owned by this class
	std::auto_ptr<geom::Envelope> env;

	geom::Coordinate centre;

	int level;

	/**
	 * Get the subquad for the index.
	 * If it doesn't exist, create it.
	 * 
	 * Ownership of the returned object belongs to this class.
	 */
	Node* getSubnode(int index);

	std::auto_ptr<Node> createSubnode(int index);

protected:

	bool isSearchMatch(const geom::Envelope& searchEnv) const {
		return env->intersects(searchEnv);
	}

public:

	// Create a node computing level from given envelope
	static std::auto_ptr<Node> createNode(const geom::Envelope& env);

	/// Create a node containing the given node and envelope
	//
	/// @param node if not null, will be inserted to the returned node
	/// @param addEnv minimum envelope to use for the node
	///
	static std::auto_ptr<Node> createExpanded(std::auto_ptr<Node> node,
			const geom::Envelope& addEnv);

	Node(std::auto_ptr<geom::Envelope> nenv, int nlevel)
		:
		env(nenv),
		centre((env->getMinX()+env->getMaxX())/2,
			(env->getMinY()+env->getMaxY())/2),
		level(nlevel)
	{
	}

	virtual ~Node() {}

	/// Return Envelope associated with this node
	/// ownership retained by this object
	geom::Envelope* getEnvelope() { return env.get(); }

	/** \brief
	 * Returns the subquad containing the envelope.
	 * Creates the subquad if
	 * it does not already exist.
	 */
	Node* getNode(const geom::Envelope *searchEnv);

	/** \brief
	 * Returns the smallest <i>existing</i>
	 * node containing the envelope.
	 */
	NodeBase* find(const geom::Envelope *searchEnv);

	void insertNode(std::auto_ptr<Node> node);

	std::string toString() const;

};

} // namespace geos::index::quadtree
} // namespace geos::index
} // namespace geos

#endif // GEOS_IDX_QUADTREE_NODE_H

/**********************************************************************
 * $Log$
 * Revision 1.1  2006/03/22 12:22:50  strk
 * indexQuadtree.h split
 *
 **********************************************************************/