GEOS  3.9.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.
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
97  bool getInteriorPoint(geom::Coordinate& ret) const;
98
99 private:
100  geom::Coordinate interiorPoint;
101  double maxWidth;
102
103  void process(const geom::Geometry* geom);
104
105  void processPolygon(const geom::Polygon* polygon);
106
107 };
108
109 } // namespace geos::algorithm
110 } // namespace geos
111
112 #endif // GEOS_ALGORITHM_INTERIORPOINTAREA_H
113
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:188
Represents a linear polygon, which may include holes.
Definition: Polygon.h:64
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26