/usr/include/geos/geomgraph/EdgeIntersection.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 | /**********************************************************************
* $Id: EdgeIntersection.h 2557 2009-06-08 09:30:55Z strk $
*
* GEOS - Geometry Engine Open Source
* http://geos.refractions.net
*
* Copyright (C) 2009 Sandro Santilli <strk@keybit.net>
* Copyright (C) 2005-2006 Refractions Research Inc.
* Copyright (C) 2001-2002 Vivid Solutions 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: geomgraph/EdgeIntersection.java rev. 1.5 (JTS-1.10)
*
**********************************************************************/
#ifndef GEOS_GEOMGRAPH_EDGEINTERSECTION_H
#define GEOS_GEOMGRAPH_EDGEINTERSECTION_H
#include <geos/export.h>
#include <string>
#include <geos/geom/Coordinate.h> // for CoordinateLessThen
#include <geos/inline.h>
namespace geos {
namespace geomgraph { // geos.geomgraph
/**
* Represents a point on an
* edge which intersects with another edge.
*
* The intersection may either be a single point, or a line segment
* (in which case this point is the start of the line segment)
* The intersection point must be precise.
*
*/
class GEOS_DLL EdgeIntersection {
public:
// the point of intersection
geom::Coordinate coord;
// the index of the containing line segment in the parent edge
int segmentIndex;
// the edge distance of this point along the containing line segment
double dist;
EdgeIntersection(const geom::Coordinate& newCoord,
int newSegmentIndex, double newDist);
virtual ~EdgeIntersection();
/**
* @return -1 this EdgeIntersection is located before the
* argument location
* @return 0 this EdgeIntersection is at the argument location
* @return 1 this EdgeIntersection is located after the argument
* location
*/
int compare(int newSegmentIndex, double newDist) const;
bool isEndPoint(int maxSegmentIndex);
std::string print() const;
int compareTo(const EdgeIntersection *) const;
const geom::Coordinate& getCoordinate() const {
return coord;
}
int getSegmentIndex() const { return segmentIndex; }
double getDistance() { return dist; }
};
struct GEOS_DLL EdgeIntersectionLessThen {
bool operator()(const EdgeIntersection *ei1,
const EdgeIntersection *ei2) const
{
if ( ei1->segmentIndex<ei2->segmentIndex ||
( ei1->segmentIndex==ei2->segmentIndex &&
ei1->dist<ei2->dist ) ) return true;
return false;
}
};
} // namespace geos.geomgraph
} // namespace geos
//#ifdef GEOS_INLINE
//# include "geos/geomgraph/EdgeIntersection.inl"
//#endif
#endif // ifndef GEOS_GEOMGRAPH_EDGEINTERSECTION_H
|