/usr/include/geos/noding/BasicSegmentString.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 | /**********************************************************************
* $Id: BasicSegmentString.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/BasicSegmentString.java rev. 1.1 (JTS-1.9)
*
**********************************************************************/
#ifndef GEOS_NODING_BASICSEGMENTSTRING_H
#define GEOS_NODING_BASICSEGMENTSTRING_H
#include <geos/noding/SegmentString.h> // for inheritance
#include <geos/geom/CoordinateSequence.h> // for inlines (size())
#include <geos/inline.h>
#include <vector>
// Forward declarations
namespace geos {
namespace algorithm {
//class LineIntersector;
}
}
namespace geos {
namespace noding { // geos.noding
/**
* Represents a list of contiguous line segments,
* and supports noding the segments.
* The line segments are represented by an array of {@link Coordinate}s.
* Intended to optimize the noding of contiguous segments by
* reducing the number of allocated objects.
* SegmentStrings can carry a context object, which is useful
* for preserving topological or parentage information.
* All noded substrings are initialized with the same context object.
*/
class BasicSegmentString : public SegmentString {
public:
/// Construct a BasicSegmentString.
//
/// @param newPts CoordinateSequence representing the string,
/// externally owned
/// @param newContext the context associated to this SegmentString
///
BasicSegmentString(geom::CoordinateSequence *newPts,
const void* newContext)
:
SegmentString(newContext),
pts(newPts)
{}
virtual ~BasicSegmentString()
{}
/// see dox in SegmentString.h
virtual unsigned int size() const
{
return pts->size();
}
/// see dox in SegmentString.h
virtual const geom::Coordinate& getCoordinate(unsigned int i) const;
/// see dox in SegmentString.h
virtual geom::CoordinateSequence* getCoordinates() const;
/// see dox in SegmentString.h
virtual bool isClosed() const;
/// see dox in SegmentString.h
virtual std::ostream& print(std::ostream& os) const;
/** \brief
* Gets the octant of the segment starting at vertex index.
*
* @param index the index of the vertex starting the segment.
* Must not be the last index in the vertex list
* @return the octant of the segment at the vertex
*/
int getSegmentOctant(unsigned int index) const;
private:
geom::CoordinateSequence *pts;
};
} // namespace geos.noding
} // namespace geos
#ifdef GEOS_INLINE
# include "geos/noding/SegmentString.inl"
#endif
#endif // ndef GEOS_NODING_BASICSEGMENTSTRING_H
|