GEOS 3.6.2
InteriorPointArea.h
1/**********************************************************************
2 *
3 * GEOS - Geometry Engine Open Source
4 * http://geos.osgeo.org
5 *
6 * Copyright (C) 2013 Sandro Santilli <strk@keybit.net>
7 * Copyright (C) 2005-2006 Refractions Research Inc.
8 * Copyright (C) 2001-2002 Vivid Solutions Inc.
9 *
10 * This is free software; you can redistribute and/or modify it under
11 * the terms of the GNU Lesser General Public Licence as published
12 * by the Free Software Foundation.
13 * See the COPYING file for more information.
14 *
15 **********************************************************************
16 *
17 * Last port: algorithm/InteriorPointArea.java r728 (JTS-1.13+)
18 *
19 **********************************************************************/
20
21#ifndef GEOS_ALGORITHM_INTERIORPOINTAREA_H
22#define GEOS_ALGORITHM_INTERIORPOINTAREA_H
23
24#include <geos/export.h>
25#include <geos/geom/Coordinate.h>
26
27// Forward declarations
28namespace geos {
29 namespace geom {
30 class Geometry;
31 class LineString;
32 class GeometryFactory;
34 }
35}
36
37
38namespace geos {
39namespace algorithm { // geos::algorithm
40
63class GEOS_DLL InteriorPointArea {
64
65private:
66
67 bool foundInterior;
68
69 const geom::GeometryFactory *factory;
70
71 geom::Coordinate interiorPoint;
72
73 double maxWidth;
74
75 void add(const geom::Geometry *geom);
76
77 const geom::Geometry *widestGeometry(const geom::Geometry *geometry);
78
79 const geom::Geometry *widestGeometry(const geom::GeometryCollection *gc);
80
81 geom::LineString *horizontalBisector(const geom::Geometry *geometry);
82
83public:
84
92
94
101
102private:
103
111 void addPolygon(const geom::Geometry *geometry);
112
113};
114
115} // namespace geos::algorithm
116} // namespace geos
117
118#endif // GEOS_ALGORITHM_INTERIORPOINTAREA_H
119
bool getInteriorPoint(geom::Coordinate &ret) const
InteriorPointArea(const geom::Geometry *g)
Coordinate is the lightweight class used to store coordinates.
Definition Coordinate.h:60
Represents a collection of heterogeneous Geometry objects.
Definition GeometryCollection.h:56
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition GeometryFactory.h:67
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition Geometry.h:167
Definition LineString.h:70
Contains classes and interfaces implementing fundamental computational geometry algorithms.
Definition Angle.h:33
Contains the Geometry interface hierarchy and supporting classes.
Definition IndexedNestedRingTester.h:26
Basic namespace for all GEOS functionalities.
Definition IndexedNestedRingTester.h:25