This file is indexed.

/usr/include/geos/noding/SegmentIntersectionDetector.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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
/**********************************************************************
 * $Id: SegmentIntersectionDetector.h 2263 2009-01-29 18:56:00Z 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.
 *
 *
 **********************************************************************/

#ifndef GEOS_GEOM_PREP_SEGMENTINTERSECTIONDETECTOR_H
#define GEOS_GEOM_PREP_SEGMENTINTERSECTIONDETECTOR_H

#include <geos/noding/SegmentIntersector.h>
#include <geos/algorithm/LineIntersector.h>
#include <geos/geom/Coordinate.h>
#include <geos/geom/CoordinateSequence.h>
#include <geos/noding/SegmentString.h>

using namespace geos::algorithm;

namespace geos {
namespace noding { // geos::noding

/** \brief
 * Detects and records an intersection between two {@link SegmentString}s,
 * if one exists.  
 *
 * This strategy can be configured to search for proper intersections.
 * In this case, the presence of any intersection will still be recorded,
 * but searching will continue until either a proper intersection has been found
 * or no intersections are detected.
 *
 * Only a single intersection is recorded.
 *
 * @version 1.7
 */
class SegmentIntersectionDetector : public SegmentIntersector 
{
private:
	LineIntersector * li;

	bool findProper;
	bool findAllTypes;

	bool _hasIntersection;
	bool _hasProperIntersection;
	bool _hasNonProperIntersection;

	const geom::Coordinate * intPt;
	geom::CoordinateSequence * intSegments;

protected:
public:
	SegmentIntersectionDetector( LineIntersector * li) 
		:
		li( li),
		findProper(false),
		findAllTypes(false),
		_hasIntersection(false),
		_hasProperIntersection(false),
		_hasNonProperIntersection(false),
		intPt( NULL),
		intSegments( NULL)
	{ }

	~SegmentIntersectionDetector()
	{
		//delete intPt;
		delete intSegments;
	}


	void setFindProper( bool findProper)
	{
		this->findProper = findProper;
	}
  
	void setFindAllIntersectionTypes( bool findAllTypes)
	{
		this->findAllTypes = findAllTypes;
	}
  
	/**
	 * Tests whether an intersection was found.
	 * 
	 * @return true if an intersection was found
	 */
	bool hasIntersection() const
	{ 
		return _hasIntersection; 
	}
  
	/**
	 * Tests whether a proper intersection was found.
	 * 
	 * @return true if a proper intersection was found
	 */
	bool hasProperIntersection() const 
	{ 
		return _hasProperIntersection; 
	}
  
	/**
	 * Tests whether a non-proper intersection was found.
	 * 
	 * @return true if a non-proper intersection was found
	 */
	bool hasNonProperIntersection() const
	{ 
		return _hasNonProperIntersection; 
	}
  
	/**
	* Gets the computed location of the intersection.
	* Due to round-off, the location may not be exact.
	* 
	* @return the coordinate for the intersection location
	*/
	const geom::Coordinate * const getIntersection()  const
	{    
		return intPt;  
	}


	/**
	 * Gets the endpoints of the intersecting segments.
	 * 
	 * @return an array of the segment endpoints (p00, p01, p10, p11)
	 */
	const geom::CoordinateSequence * getIntersectionSegments() const
	{
		return intSegments;
	}
  
	bool isDone() const
	{ 
		// If finding all types, we can stop
		// when both possible types have been found.
		if (findAllTypes)
			return _hasProperIntersection && _hasNonProperIntersection;

		// If searching for a proper intersection, only stop if one is found
		if (findProper)
			return _hasProperIntersection;

		return _hasIntersection;
	}

	/**
	 * This method is called by clients
	 * of the {@link SegmentIntersector} class to process
	 * intersections for two segments of the {@link SegmentStrings} being intersected.
	 * Note that some clients (such as {@link MonotoneChain}s) may optimize away
	 * this call for segment pairs which they have determined do not intersect
	 * (e.g. by an disjoint envelope test).
	 */
	void processIntersections(	noding::SegmentString * e0, int segIndex0,
								noding::SegmentString * e1, int segIndex1 );
  
};

} // namespace geos::noding
} // namespace geos

#endif // GEOS_GEOM_PREP_SEGMENTINTERSECTIONDETECTOR_H
/**********************************************************************
 * $Log$
 **********************************************************************/