GEOS: InteriorPointArea.h Source File

GEOS 3.3.4

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- File List

InteriorPointArea.h
1 /**********************************************************************
2 * $Id: InteriorPointArea.h 2556 2009-06-06 22:22:28Z strk $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
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 #ifndef GEOS_ALGORITHM_INTERIORPOINTAREA_H
18 #define GEOS_ALGORITHM_INTERIORPOINTAREA_H
19
20 #include <geos/export.h>
21 #include <geos/geom/Coordinate.h>
22
23 // Forward declarations
24 namespace geos {
25 namespace geom {
26 class Geometry;
27 class LineString;
28 class GeometryFactory;
29 class GeometryCollection;
30 }
31 }
32
33
34 namespace geos {
35 namespace algorithm { // geos::algorithm
36
54 class GEOS_DLL InteriorPointArea {
55
56 private:
57
58 bool foundInterior;
59
60 const geom::GeometryFactory *factory;
61
62 geom::Coordinate interiorPoint;
63
64 double maxWidth;
65
66 void add(const geom::Geometry *geom);
67
68 const geom::Geometry *widestGeometry(const geom::Geometry *geometry);
69
70 const geom::Geometry *widestGeometry(const geom::GeometryCollection *gc);
71
72 geom::LineString *horizontalBisector(const geom::Geometry *geometry);
73
74 public:
75
76 InteriorPointArea(const geom::Geometry *g);
77
78 ~InteriorPointArea();
79
80 bool getInteriorPoint(geom::Coordinate& ret) const;
81
89 void addPolygon(const geom::Geometry *geometry);
90
91 };
92
93 } // namespace geos::algorithm
94 } // namespace geos
95
96 #endif // GEOS_ALGORITHM_INTERIORPOINTAREA_H
97
98 /**********************************************************************
99 * $Log$
100 * Revision 1.1 2006/03/09 16:46:48 strk
101 * geos::geom namespace definition, first pass at headers split
102 *
103 **********************************************************************/
104