GEOS 3.3.8

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

- File List

InteriorPointArea.h
1 /**********************************************************************
2 * $Id: InteriorPointArea.h 3746 2013-01-14 11:08:51Z strk $
3 *
4 * GEOS - Geometry Engine Open Source
5 * http://geos.refractions.net
6 *
7 * Copyright (C) 2013 Sandro Santilli <strk@keybit.net>
8 * Copyright (C) 2005-2006 Refractions Research Inc.
9 * Copyright (C) 2001-2002 Vivid Solutions Inc.
10 *
11 * This is free software; you can redistribute and/or modify it under
12 * the terms of the GNU Lesser General Public Licence as published
13 * by the Free Software Foundation.
14 * See the COPYING file for more information.
15 *
16 **********************************************************************
17 *
18 * Last port: algorithm/InteriorPointArea.java r728 (JTS-1.13+)
19 *
20 **********************************************************************/
21
22 #ifndef GEOS_ALGORITHM_INTERIORPOINTAREA_H
23 #define GEOS_ALGORITHM_INTERIORPOINTAREA_H
24
25 #include <geos/export.h>
26 #include <geos/geom/Coordinate.h>
27
28 // Forward declarations
29 namespace geos {
30 namespace geom {
31 class Geometry;
32 class LineString;
33 class GeometryFactory;
34 class GeometryCollection;
35 }
36 }
37
38
39 namespace geos {
40 namespace algorithm { // geos::algorithm
41
59 class GEOS_DLL InteriorPointArea {
60
61 private:
62
63 bool foundInterior;
64
65 const geom::GeometryFactory *factory;
66
67 geom::Coordinate interiorPoint;
68
69 double maxWidth;
70
71 void add(const geom::Geometry *geom);
72
73 const geom::Geometry *widestGeometry(const geom::Geometry *geometry);
74
75 const geom::Geometry *widestGeometry(const geom::GeometryCollection *gc);
76
77 geom::LineString *horizontalBisector(const geom::Geometry *geometry);
78
79 public:
80
81 InteriorPointArea(const geom::Geometry *g);
82
83 ~InteriorPointArea();
84
85 bool getInteriorPoint(geom::Coordinate& ret) const;
86
94 void addPolygon(const geom::Geometry *geometry);
95
96 };
97
98 } // namespace geos::algorithm
99 } // namespace geos
100
101 #endif // GEOS_ALGORITHM_INTERIORPOINTAREA_H
102
103 /**********************************************************************
104 * $Log$
105 * Revision 1.1 2006/03/09 16:46:48 strk
106 * geos::geom namespace definition, first pass at headers split
107 *
108 **********************************************************************/
109