This file is indexed.

/usr/include/ossim/base/ossimPolyArea2d.h is in libossim-dev 1.7.21-3ubuntu2.

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
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
//*******************************************************************
//
// License:  See top level LICENSE.txt file.
//
// Author: Garrett Potts
//*******************************************************************
//$Id: ossimPolyArea2d.h 9968 2006-11-29 14:01:53Z gpotts $
#ifndef ossimPolyArea2d_HEADER
#define ossimPolyArea2d_HEADER
#include <ossim/base/ossimDpt.h>
#include <ossim/base/ossimGpt.h>
#include <ossim/base/ossimDrect.h>
#include <ossim/base/ossimIrect.h>
#include <ossim/base/ossimKeywordlist.h>
#include <ossim/base/ossimPolygon.h>
#include <ossim/base/ossimReferenced.h>
#include <ossim/kbool/bool_globals.h>
class Bool_Engine;

class OSSIM_DLL ossimPolyArea2d : public ossimReferenced
{
public:
   friend OSSIM_DLL std::ostream& operator <<(std::ostream& out, const ossimPolyArea2d& data);
   ossimPolyArea2d()
      :theEngine(0)
      {
         clearEngine();
      }
   ossimPolyArea2d(const vector<ossimDpt>& polygon)
      :theEngine(0)
   {
      clearEngine();
      (*this) = polygon;
   }
   ossimPolyArea2d(const vector<ossimIpt>& polygon)
         :theEngine(0)
      {
         clearEngine();
         (*this) = polygon;
      }
   ossimPolyArea2d(const vector<ossimGpt>& polygon)
      :theEngine(0)
      {
         clearEngine();
         (*this) = polygon;
      }
      
   ossimPolyArea2d(const ossimDpt& p1,
                   const ossimDpt& p2,
                   const ossimDpt& p3,
                   const ossimDpt& p4);
   ossimPolyArea2d(const ossimPolyArea2d& rhs);
      
   ossimPolyArea2d(const ossimIrect& rect)
      :theEngine(0)
      {
         (*this) = rect;
      }
   ossimPolyArea2d(const ossimDrect& rect)
      :theEngine(0)
      {
         (*this) = rect;
      }
   ossimPolyArea2d(const ossimPolygon& polygon)
      :theEngine(0)
   {
      (*this) = polygon;
   }
   ~ossimPolyArea2d();

   void clear()
   {
      clearEngine();
   }
   const ossimPolyArea2d& operator =(const ossimPolyArea2d& rhs);
   const ossimPolyArea2d& operator =(const ossimPolygon& rhs);
   const ossimPolyArea2d& operator =(const ossimIrect& rect);
   const ossimPolyArea2d& operator =(const ossimDrect& rect);
   const ossimPolyArea2d& operator =(const vector<ossimDpt>& polygon);
   const ossimPolyArea2d& operator =(const vector<ossimGpt>& polygon);
   const ossimPolyArea2d& operator =(const vector<ossimIpt>& polygon);


   
   ossimPolyArea2d operator &(const ossimPolyArea2d& rhs)const;
   ossimPolyArea2d operator -(const ossimPolyArea2d& rhs)const;
   ossimPolyArea2d operator +(const ossimPolyArea2d& rhs)const;
   ossimPolyArea2d operator ^(const ossimPolyArea2d& rhs)const;
   const ossimPolyArea2d& operator &=(const ossimPolyArea2d& rhs);
   const ossimPolyArea2d& operator -=(const ossimPolyArea2d& rhs);
   const ossimPolyArea2d& operator +=(const ossimPolyArea2d& rhs);
   const ossimPolyArea2d& operator ^=(const ossimPolyArea2d& rhs);
   

   void add(const ossimPolyArea2d& rhs);
   
   bool getVisiblePolygons(vector<ossimPolygon>& polyList)const;
   bool getPolygonHoles(vector<ossimPolygon>& polyList, bool includeFalsePolygons=false)const;
   bool isEmpty()const;
   bool isPointWithin(const ossimDpt& point, double epsilonBall=.0000001)const;
   bool isPointWithin(double x, double y, double epsilonBall=.0000001)const;
   void getBoundingRect(ossimDrect& rect);

   bool saveState(ossimKeywordlist& kwl,
                  const char* prefix=0)const;
   bool loadState(const ossimKeywordlist& kwl,
                  const char* prefix=0);
   
protected:
   void armBoolEng();
   void clearEngine();
   void performOperation(const ossimPolyArea2d& rhs,
                         BOOL_OP operation); 
   void performOperation(ossimPolyArea2d& result,
                         const ossimPolyArea2d& rhs,
                         BOOL_OP operation)const;
   void clearPolygons();
   
   mutable Bool_Engine* theEngine;
};



#endif








#if 0


//*******************************************************************
// Copyright (C) 2000 ImageLinks Inc. 
//
// OSSIM is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License 
// as published by the Free Software Foundation.
//
// This software is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
//
// You should have received a copy of the GNU General Public License
// along with this software. If not, write to the Free Software 
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-
// 1307, USA.
//
// See the GPL in the COPYING.GPL file for more details.
//
// Author: Garrett Potts (gpotts@imagelinks.com)
//
//*************************************************************************
// $Id: ossimPolyArea2d.h 9968 2006-11-29 14:01:53Z gpotts $
#ifndef ossimPolyArea2d_HEADER
#define ossimPolyArea2d_HEADER
extern "C"
{
#include "libpolyclip/polyarea.h"
}

#include <iostream>
#include <vector>
using namespace std;

#include <ossim/base/ossimDpt.h>
#include <ossim/base/ossimGpt.h>
#include <ossim/base/ossimDrect.h>
#include <ossim/base/ossimIrect.h>
#include <ossim/base/ossimKeywordlist.h>
#include <ossim/base/ossimPolygon.h>

/*!
 * This class uses the multiclip 2-d polygon library
 * to do intersections, unions, set difference, and xor
 * operations.  It will also use the library to do quick
 * point inside and poly inside tests.
 */
class OSSIM_DLL ossimPolyArea2d
{
public:
   friend OSSIM_DLL ostream& operator  <<(ostream& out,
                                const ossimPolyArea2d& data);
   /*!
    * we will use the multi clip library in
    * libpolyclip directory.
    */
   ossimPolyArea2d();
   /*!
    * If the copy polygon flag is false
    * it will set its internal thePolygon to polygon
    * else it will make a copy of it.
    */
   ossimPolyArea2d(POLYAREA* polygon,
                  bool    copyPolygonFlag=false);
   
   ossimPolyArea2d(const ossimPolyArea2d& rhs);
   ossimPolyArea2d(const vector<ossimDpt>& polygon);
   ossimPolyArea2d(const vector<ossimGpt>& polygon);
   ossimPolyArea2d(ossimDpt* points,
                  long number);

   ossimPolyArea2d(const ossimDpt& p1,
                   const ossimDpt& p2,
                   const ossimDpt& p3,
                   const ossimDpt& p4);
   ossimPolyArea2d(const ossimIrect& rect)
      :thePolygon(NULL)
      {
         (*this) = rect;
      }
   ossimPolyArea2d(const ossimDrect& rect)
      :thePolygon(NULL)
      {
         (*this) = rect;
      }
   
   ossimPolyArea2d(const ossimPolygon& polygon);
   ~ossimPolyArea2d();

   /*!
    * Will scale the polygon along the x and y direction
    * by the passed in scale.  It will modify itself and
    * return a const reference to itself.
    */
   const ossimPolyArea2d& operator *=(const ossimDpt& scale);
   
   /*!
    * Will scale the polygon along the x and y direction
    * by the passed in scale.  It will return another object.
    */
   ossimPolyArea2d operator *(const ossimDpt& scale)const;

   /*!
    * Scales evenly along the x and y direction.
    */
   const ossimPolyArea2d& operator *=(double scale);

   /*!
    * Scales evenly along the x and y direction.
    */
   ossimPolyArea2d operator *(double scale)const;

   /*!
    * Assignment operator.  Allows you to assign
    * or copy one polygon to another.
    */
   const ossimPolyArea2d& operator =(const ossimPolyArea2d& rhs);

   const ossimPolyArea2d& operator =(const ossimIrect& rect);
   const ossimPolyArea2d& operator =(const ossimDrect& rect);
   
   /*!
    * Will do a set difference on the this - right
    * and return a new polygon.
    */
   ossimPolyArea2d operator -(const ossimPolyArea2d& rhs)const;

   /*!
    * This will do the same as - but will
    * update itself.
    */
   ossimPolyArea2d& operator -=(const ossimPolyArea2d& rhs);
   
   /*!
    * do a union of 2 polygons.
    */
   ossimPolyArea2d operator +(const ossimPolyArea2d& rhs)const;

   /*!
    * This will do the same as the operator
    * + but will update itself.
    */
   ossimPolyArea2d& operator +=(const ossimPolyArea2d& rhs);


   /*!
    * do an intersection of 2 polygons
    */
   ossimPolyArea2d operator &(const ossimPolyArea2d& rhs)const;

   /*!
    * This will do the same as the operator &
    * but will update itself.
    */

   ossimPolyArea2d& operator &=(const ossimPolyArea2d& rhs);

   /*!
    * Will perform the "excusive or" of the this
    * object with the right side
    */
   ossimPolyArea2d operator ^(const ossimPolyArea2d& rhs)const;

   /*!
    * This is the non const version and will update
    * itself.
    */
   ossimPolyArea2d& operator ^=(const ossimPolyArea2d& rhs);

   /*!
    * This only makes since if you know that there are no holes.
    * For example, using it after an intersection only operation by loading
    * up two filled regions and intersecting them.
    */
   bool getAllVisiblePolygons(vector<ossimPolygon>& polyList)const;
   
   bool isEmpty()const
      {
         return (thePolygon == NULL);
      }

   bool isPointWithin(const ossimDpt& point)const;
   bool isPointWithin(double x, double y)const;
   void getBoundingRect(ossimDrect& rect);

   bool saveState(ossimKeywordlist& kwl,
                  const char* prefix=0)const;
   bool loadState(const ossimKeywordlist& kwl,
                  const char* prefix=0);
protected:
   POLYAREA *thePolygon;

   void loadPolygonForCurrentContour(ossimPolygon& polygon,
                                     bool visible);
};

#endif
#endif