GEOS: HCoordinate.h Source File

GEOS 3.5.0

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

HCoordinate.h
1 /**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2011 Sandro Santilli <strk@keybit.net>
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: algorithm/HCoordinate.java r386 (JTS-1.12+)
18 *
19 **********************************************************************/
20
21 #ifndef GEOS_ALGORITHM_HCOORDINATE_H
22 #define GEOS_ALGORITHM_HCOORDINATE_H
23
24 #include <geos/export.h>
25 #include <iosfwd>
26
27 // Forward declarations
28 namespace geos {
29 namespace geom {
30 class Coordinate;
31 }
32 }
33
34 namespace geos {
35 namespace algorithm { // geos::algorithm
36
37
44 class GEOS_DLL HCoordinate {
45
46 public:
47
48 friend std::ostream& operator<< (std::ostream& o, const HCoordinate& c);
49
60 static void intersection(const geom::Coordinate &p1,
61 const geom::Coordinate &p2,
62 const geom::Coordinate &q1,
63 const geom::Coordinate &q2,
64 geom::Coordinate &ret);
65
66 double x,y,w;
67
68 HCoordinate();
69
70 HCoordinate(double _x, double _y, double _w);
71
72 HCoordinate(const geom::Coordinate& p);
73
82 HCoordinate(const geom::Coordinate& p1, const geom::Coordinate& p2);
83
84 HCoordinate(const geom::Coordinate& p1, const geom::Coordinate& p2,
85 const geom::Coordinate& q1, const geom::Coordinate& q2);
86
87 HCoordinate(const HCoordinate &p1, const HCoordinate &p2);
88
89 double getX() const;
90
91 double getY() const;
92
93 void getCoordinate(geom::Coordinate &ret) const;
94
95 };
96
97 std::ostream& operator<< (std::ostream& o, const HCoordinate& c);
98
99 } // namespace geos::algorithm
100 } // namespace geos
101
102 #endif // GEOS_ALGORITHM_HCOORDINATE_H
103
geos::geom::Coordinate
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
geos::geom::operator<<
GEOS_DLL std::ostream & operator<<(std::ostream &os, const Coordinate &c)
Output function.
geos::algorithm::HCoordinate
Represents a homogeneous coordinate in a 2-D coordinate space.
Definition: HCoordinate.h:44
geos
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25