GEOS  3.9.1dev
EdgeKey.h
Go to the documentation of this file.
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 
18 #include <geos/export.h>
19 
20 // Forward declarations
21 namespace geos {
22 namespace geom {
23 class Coordinate;
24 }
25 namespace operation {
26 namespace overlayng {
27 class Edge;
28 }
29 }
30 }
31 
32 namespace geos { // geos.
33 namespace operation { // geos.operation
34 namespace overlayng { // geos.operation.overlayng
35 
36 
37 // using geos::geom::Location;
38 // using geos::geom::Position;
39 
51 
52 private:
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 
65 public:
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 
#define GEOS_DLL
Definition: export.h:28
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
bool operator<(const Coordinate &a, const Coordinate &b)
Strict weak ordering operator for Coordinate.
Definition: Coordinate.h:134
Basic namespace for all GEOS functionalities.
bool operator==(const Coordinate &a, const Coordinate &b)
Equality operator for Coordinate. 2D only.