GEOS  3.9.0dev
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 
52  //Coordinate* getInteriorPoint() const;
53 
54  bool getInteriorPoint(geom::Coordinate& ret) const;
55 
56 private:
57 
58  bool hasInterior;
59 
60  geom::Coordinate centroid;
61 
62  double minDistance;
63 
64  geom::Coordinate interiorPoint;
65 
66  void addInterior(const geom::Geometry* geom);
67 
68  void addInterior(const geom::CoordinateSequence* pts);
69 
70  void addEndpoints(const geom::Geometry* geom);
71 
72  void addEndpoints(const geom::CoordinateSequence* pts);
73 
74  void add(const geom::Coordinate& point);
75 
76 };
77 
78 } // namespace geos::algorithm
79 } // namespace geos
80 
81 #endif // GEOS_ALGORITHM_INTERIORPOINTLINE_H
82 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Computes a point in the interior of an linear geometry.
Definition: InteriorPointLine.h:48
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26
The internal representation of a list of coordinates inside a Geometry.
Definition: CoordinateSequence.h:58