GEOS 3.9.1
EdgeKey.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2020 Paul Ramsey <pramsey@cleverelephant.ca>
7 *
8 * This is free software; you can redistribute and/or modify it under
9 * the terms of the GNU Lesser General Public Licence as published
10 * by the Free Software Foundation.
11 * See the COPYING file for more information.
12 *
13 **********************************************************************/
14
15#pragma once
16
17#include <geos/operation/overlayng/OverlayLabel.h>
18#include <geos/export.h>
19
20// Forward declarations
21namespace geos {
22namespace geom {
23class Coordinate;
24}
25namespace operation {
26namespace overlayng {
27class Edge;
28}
29}
30}
31
32namespace geos { // geos.
33namespace operation { // geos.operation
34namespace overlayng { // geos.operation.overlayng
35
36
37// using geos::geom::Location;
38// using geos::geom::Position;
39
50class GEOS_DLL EdgeKey {
51
52private:
53
54 // Members
55 double p0x;
56 double p0y;
57 double p1x;
58 double p1y;
59
60 // Methods
61 void initPoints(const Edge* edge);
62 void init(const geom::Coordinate& p0, const geom::Coordinate& p1);
63
64
65public:
66
67 EdgeKey(const Edge* edge);
68
69 int compareTo(const EdgeKey* ek) const;
70 bool equals(const EdgeKey* ek) const;
71
72 friend bool operator< (const EdgeKey& ek1, const EdgeKey& ek2);
73 friend bool operator== (const EdgeKey& ek1, const EdgeKey& ek2);
74
75
76};
77
78
79} // namespace geos.operation.overlayng
80} // namespace geos.operation
81} // namespace geos
82
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
Definition operation/overlayng/Edge.h:62
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:26