This file is indexed.

/usr/include/geos/noding/SegmentStringUtil.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
/**********************************************************************
 * $Id: SegmentStringUtil.h 2325 2009-04-08 13:02:06Z 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: noding/SegmentStringUtil.java rev. 1.2 (JTS-1.9)
 *
 **********************************************************************/

#ifndef GEOS_NODING_SEGMENTSTRINGUTIL_H
#define GEOS_NODING_SEGMENTSTRINGUTIL_H

#include <geos/noding/NodedSegmentString.h>
#include <geos/geom/LineString.h>
#include <geos/geom/CoordinateSequence.h>
#include <geos/geom/util/LinearComponentExtracter.h>

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

/** \brief
 * Utility methods for processing {@link SegmentString}s.
 * 
 * @author Martin Davis
 *
 */
class SegmentStringUtil
{
public:
	/** \brief
	 * Extracts all linear components from a given {@link Geometry}
	 * to {@link SegmentString}s.
	 *
	 * The SegmentString data item is set to be the source Geometry.
	 * 
	 * @param geom the geometry to extract from
	 * @param segStr a List of SegmentStrings (output parameter).
	 *               Ownership of elements pushed to the vector
	 *		 is transferred to caller. Note that the
	 *		 CoordinateSequence associated with the
	 *		 returned SegmentString elements are allocated
	 *		 by this function, so must also be destroyed
	 *		 by caller.
	 *		 TODO: check if this can be optimized by leaving
	 *		       ownership of actual CoordinateSequence
	 *		       to the passed Geometry.
	 */
	static void extractSegmentStrings(const geom::Geometry * g,
					  SegmentString::ConstVect& segStr)
	{
		geom::LineString::ConstVect lines;
		geom::util::LinearComponentExtracter::getLines(*g, lines);

		for (size_t i=0, n=lines.size(); i<n; i++)
		{
			geom::LineString* line = (geom::LineString*)(lines[i]);

			// we take ownership of the coordinates here
			// TODO: check if this can be optimized by getting
			//       the internal CS.
			geom::CoordinateSequence* pts = line->getCoordinates();

			segStr.push_back(new NodedSegmentString(pts, g));
		}
	}

};

} // geos::noding
} // geos

#endif // GEOS_NODING_SEGMENTSTRINGUTIL_H
/**********************************************************************
 * $Log$
 **********************************************************************/