00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef GEOS_ALGORITHM_INTERIORPOINTAREA_H
00023 #define GEOS_ALGORITHM_INTERIORPOINTAREA_H
00024
00025 #include <geos/export.h>
00026 #include <geos/geom/Coordinate.h>
00027
00028
00029 namespace geos {
00030 namespace geom {
00031 class Geometry;
00032 class LineString;
00033 class GeometryFactory;
00034 class GeometryCollection;
00035 }
00036 }
00037
00038
00039 namespace geos {
00040 namespace algorithm {
00041
00064 class GEOS_DLL InteriorPointArea {
00065
00066 private:
00067
00068 bool foundInterior;
00069
00070 const geom::GeometryFactory *factory;
00071
00072 geom::Coordinate interiorPoint;
00073
00074 double maxWidth;
00075
00076 void add(const geom::Geometry *geom);
00077
00078 const geom::Geometry *widestGeometry(const geom::Geometry *geometry);
00079
00080 const geom::Geometry *widestGeometry(const geom::GeometryCollection *gc);
00081
00082 geom::LineString *horizontalBisector(const geom::Geometry *geometry);
00083
00084 public:
00085
00092 InteriorPointArea(const geom::Geometry *g);
00093
00094 ~InteriorPointArea();
00095
00101 bool getInteriorPoint(geom::Coordinate& ret) const;
00102
00103 private:
00104
00112 void addPolygon(const geom::Geometry *geometry);
00113
00114 };
00115
00116 }
00117 }
00118
00119 #endif // GEOS_ALGORITHM_INTERIORPOINTAREA_H
00120
00121
00122
00123
00124
00125
00126
00127