17#include <geos/operation/overlayng/OverlayLabel.h>
18#include <geos/operation/overlayng/EdgeKey.h>
19#include <geos/operation/overlayng/Edge.h>
20#include <geos/geom/Coordinate.h>
21#include <geos/export.h>
38class GEOS_DLL EdgeKey {
50 void initPoints(
const Edge* edge)
52 bool direction = edge->direction();
54 init(edge->getCoordinate(0),
55 edge->getCoordinate(1));
58 std::size_t len = edge->size();
59 init(edge->getCoordinate(len - 1),
60 edge->getCoordinate(len - 2));
75 EdgeKey(
const Edge* edge)
80 int compareTo(
const EdgeKey* ek)
const
82 if (p0x < ek->p0x)
return -1;
83 if (p0x > ek->p0x)
return 1;
84 if (p0y < ek->p0y)
return -1;
85 if (p0y > ek->p0y)
return 1;
87 if (p1x < ek->p1x)
return -1;
88 if (p1x > ek->p1x)
return 1;
89 if (p1y < ek->p1y)
return -1;
90 if (p1y > ek->p1y)
return 1;
94 bool equals(
const EdgeKey* ek)
const
102 friend bool operator<(
const EdgeKey& ek1,
const EdgeKey& ek2)
104 return ek1.compareTo(&ek2) < 0;
107 friend bool operator==(
const EdgeKey& ek1,
const EdgeKey& ek2)
109 return ek1.equals(&ek2);
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:217
Definition operation/overlayng/Edge.h:55
Provides classes for implementing operations on geometries.
Definition CleanCoverage.h:34
Basic namespace for all GEOS functionalities.
Definition geos.h:38