GEOS 3.4.2

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

- File List

InteriorPointLine.h
1 /**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2005-2006 Refractions Research Inc.
7 * Copyright (C) 2001-2002 Vivid Solutions Inc.
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU Lesser General Public Licence as published
11 * by the Free Software Foundation.
12 * See the COPYING file for more information.
13 *
14 **********************************************************************
15 *
16 * Last port: algorithm/InteriorPointLine.java r317 (JTS-1.12)
17 *
18 **********************************************************************/
19
20 #ifndef GEOS_ALGORITHM_INTERIORPOINTLINE_H
21 #define GEOS_ALGORITHM_INTERIORPOINTLINE_H
22
23 #include <geos/export.h>
24 #include <geos/geom/Coordinate.h>
25
26 // Forward declarations
27 namespace geos {
28 namespace geom {
29 class Geometry;
30 class CoordinateSequence;
31 }
32 }
33
34
35 namespace geos {
36 namespace algorithm { // geos::algorithm
37
48 class GEOS_DLL InteriorPointLine {
49 public:
50
51 InteriorPointLine(const geom::Geometry *g);
52
53 ~InteriorPointLine();
54
55 //Coordinate* getInteriorPoint() const;
56
57 bool getInteriorPoint(geom::Coordinate& ret) const;
58
59 private:
60
61 bool hasInterior;
62
63 geom::Coordinate centroid;
64
65 double minDistance;
66
67 geom::Coordinate interiorPoint;
68
69 void addInterior(const geom::Geometry *geom);
70
71 void addInterior(const geom::CoordinateSequence *pts);
72
73 void addEndpoints(const geom::Geometry *geom);
74
75 void addEndpoints(const geom::CoordinateSequence *pts);
76
77 void add(const geom::Coordinate& point);
78
79 };
80
81 } // namespace geos::algorithm
82 } // namespace geos
83
84 #endif // GEOS_ALGORITHM_INTERIORPOINTLINE_H
85