GEOS  3.8.0dev
InteriorPointArea.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2019 Martin Davis <mtnclimb@gmail.com>
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  * Last port: algorithm/InteriorPointArea.java (JTS-1.17+)
16  * https://github.com/locationtech/jts/commit/a140ca30cc51be4f65c950a30b0a8f51a6df75ba
17  *
18  **********************************************************************/
19 
20 #ifndef GEOS_ALGORITHM_INTERIORPOINTAREA_H
21 #define GEOS_ALGORITHM_INTERIORPOINTAREA_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 Polygon;
31 }
32 }
33 
34 namespace geos {
35 namespace algorithm { // geos::algorithm
36 
80 class GEOS_DLL InteriorPointArea {
81 
82 public:
90 
92 
99  bool getInteriorPoint(geom::Coordinate& ret) const;
100 
101 private:
102  geom::Coordinate interiorPoint;
103  double maxWidth;
104 
105  void process(const geom::Geometry* geom);
106 
107  void processPolygon(const geom::Polygon* polygon);
108 
109 };
110 
111 } // namespace geos::algorithm
112 } // namespace geos
113 
114 #endif // GEOS_ALGORITHM_INTERIORPOINTAREA_H
115 
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:60
Computes a point in the interior of an areal geometry. The point will lie in the geometry interior in...
Definition: InteriorPointArea.h:80
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:187
Represents a linear polygon, which may include holes.
Definition: Polygon.h:65
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25