This file is indexed.

/usr/include/marble/GeoDataPolygon.h is in libmarble-dev 4:17.12.3-0ubuntu1.

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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
//
// This file is part of the Marble Virtual Globe.
//
// This program is free software licensed under the GNU LGPL. You can
// find a copy of this license in LICENSE.txt in the top directory of
// the source code.
//
// Copyright 2008-2009      Patrick Spendrin <ps_ml@gmx.de>
// Copyright 2008           Inge Wallin <inge@lysator.liu.se>
//


#ifndef MARBLE_GEODATAPOLYGON_H
#define MARBLE_GEODATAPOLYGON_H

#include <QVector>

#include "MarbleGlobal.h"

#include "geodata_export.h"
#include "GeoDataGeometry.h"

namespace Marble
{

class GeoDataPolygonPrivate;
class GeoDataLinearRing;
class GeoDataCoordinates;

/*!
    \class GeoDataPolygon
    \brief A polygon that can have "holes".

    GeoDataPolygon is a tool class that implements the Polygon tag/class
    of the Open Geospatial Consortium standard KML 2.2.

    GeoDataPolygon extends GeoDataGeometry to store and edit
    Polygons.

    In the QPainter API "pure" Polygons would represent polygons with
    "holes" inside. However QPolygon doesn't provide this feature directly.

    Whenever a Polygon is painted GeoDataLineStyle should be used to assign a
    color and line width.

    The polygon consists of
    \li a single outer boundary and
    \li optionally a set of inner boundaries.

    All boundaries are LinearRings.

    The boundaries of a GeoDataPolygon consist of several (geodetic) nodes which
    are each connected through line segments. The nodes are stored as
    GeoDataCoordinates objects.


    The API which provides access to the nodes is similar to the API of
    QVector.

    GeoDataPolygon allows Polygons to be tessellated in order to make them
    follow the terrain and the curvature of the earth. The tessellation options
    allow for different ways of visualization:

    \li Not tessellated: A Polygon that connects each two nodes directly and
        straight in screen coordinate space.
    \li A tessellated line: Each line segment is bent so that the Polygon
        follows the curvature of the earth and its terrain. A tessellated
        line segment connects two nodes at the shortest possible distance
        ("along great circles").
    \li A tessellated line that follows latitude circles whenever possible:
        In this case Latitude circles are followed as soon as two subsequent
        nodes have exactly the same amount of latitude. In all other places the
        line segments follow great circles.

    Some convenience methods have been added that allow to calculate the
    geodesic bounding box or the length of a Polygon.

    \see GeoDataLinearRing
*/

class GEODATA_EXPORT GeoDataPolygon : public GeoDataGeometry
{
 public:
/*!
    \brief Creates a new Polygon.
*/
    explicit GeoDataPolygon( TessellationFlags f = NoTessellation );


/*!
    \brief Creates a Polygon from an existing geometry object.
*/
    explicit GeoDataPolygon( const GeoDataGeometry &other );

/*!
    \brief Destroys a Polygon.
*/
    ~GeoDataPolygon() override;

    const char *nodeType() const override;

    EnumGeometryId geometryId() const override;

    GeoDataGeometry *copy() const override;

/*!
    \brief Returns true/false depending on whether this and other are/are not equal.
*/
    bool operator==( const GeoDataPolygon &other ) const;
    bool operator!=( const GeoDataPolygon &other ) const;


/*!
    \brief Returns whether a Polygon is a closed polygon.

    \return <code>true</code> for a Polygon.
*/    
    virtual bool isClosed() const;


/*!
    \brief Returns whether the Polygon follows the earth's surface.

    \return <code>true</code> if the Polygon's line segments follow the
    earth's surface and terrain along great circles.
*/    
    bool tessellate() const;


/*!
    \brief Sets the tessellation property for the Polygon.

    If \a tessellate is <code>true</code> then the Polygon's line segments
    are bent and follow the earth's surface and terrain along great circles.
    If \a tessellate is <code>false</code> then the Polygon's line segments
    are rendered as straight lines in screen coordinate space.
*/
    void setTessellate( bool tessellate );

    
/*!
    \brief Returns the tessellation flags for a Polygon.
*/
    TessellationFlags tessellationFlags() const;


/*!
    \brief Sets the given tessellation flags for a Polygon.
*/
    void setTessellationFlags( TessellationFlags f );


/*!
    \brief Returns the smallest latLonAltBox that contains the Polygon.

    \see GeoDataLatLonAltBox
*/
    const GeoDataLatLonAltBox& latLonAltBox() const override;

/*!
    \brief Returns the outer boundary that is represented as a LinearRing.

    \see GeoDataLinearRing
*/
    GeoDataLinearRing &outerBoundary();

/*!
    \brief Returns the outer boundary that is represented as a LinearRing.

    \see GeoDataLinearRing
*/
    const GeoDataLinearRing &outerBoundary() const;

/*!
    \brief Sets the given LinearRing as an outer boundary of the Polygon.

    \see GeoDataLinearRing
*/
    void setOuterBoundary( const GeoDataLinearRing& boundary );

/*!
    \brief Returns a set of inner boundaries which are represented as LinearRings.

    \see GeoDataLinearRing
*/
    QVector<GeoDataLinearRing>& innerBoundaries();

/*!
    \brief Returns a set of inner boundaries which are represented as LinearRings.

    \see GeoDataLinearRing
*/
    const QVector<GeoDataLinearRing>& innerBoundaries() const;

/*!
    \brief Appends a given LinearRing as an inner boundary of the Polygon.

    \see GeoDataLinearRing
*/
    void appendInnerBoundary( const GeoDataLinearRing& boundary );

/*!
    \brief Returns whether the given coordinates lie within the polygon.

    \return <code>true</code> if the coordinates lie within the polygon
    (and not in its holes), false otherwise.
*/
    virtual bool contains( const GeoDataCoordinates &coordinates ) const;

    // Serialization
/*!
    \brief Serialize the Polygon to a stream.
    \param stream the stream.
*/
    void pack( QDataStream& stream ) const override;

    
/*!
    \brief Unserialize the Polygon from a stream.
    \param stream the stream.
*/
    void unpack( QDataStream& stream ) override;

    int renderOrder() const;
    void setRenderOrder(int);

 private:
    Q_DECLARE_PRIVATE(GeoDataPolygon)
};

class GEODATA_EXPORT GeoDataOuterBoundary : public GeoDataPolygon
{
};

class GEODATA_EXPORT GeoDataInnerBoundary : public GeoDataPolygon
{
};

}

#endif // GEODATAPOLYGON_H