GEOS  3.14.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 #pragma once
21 
22 #include <geos/export.h>
23 #include <geos/geom/Coordinate.h>
24 
25 // Forward declarations
26 namespace geos {
27 namespace geom {
28 class Geometry;
29 class Polygon;
30 }
31 }
32 
33 namespace geos {
34 namespace algorithm { // geos::algorithm
35 
79 class GEOS_DLL InteriorPointArea {
80 
81 public:
89 
97 
98 private:
99  geom::Coordinate interiorPoint;
100  double maxWidth;
101 
102  void process(const geom::Geometry* geom);
103 
104  void processPolygon(const geom::Polygon* polygon);
105 
106 };
107 
108 } // namespace geos::algorithm
109 } // namespace geos
110 
Computes a point in the interior of an areal geometry. The point will lie in the geometry interior in...
Definition: InteriorPointArea.h:79
bool getInteriorPoint(geom::Coordinate &ret) const
InteriorPointArea(const geom::Geometry *g)
Coordinate is the lightweight class used to store coordinates.
Definition: Coordinate.h:217
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25