00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GEOS_ALGORITHM_INTERIORPOINTAREA_H
00018 #define GEOS_ALGORITHM_INTERIORPOINTAREA_H
00019
00020 #include <geos/geom/Coordinate.h>
00021
00022
00023 namespace geos {
00024 namespace geom {
00025 class Geometry;
00026 class LineString;
00027 class GeometryFactory;
00028 class GeometryCollection;
00029 }
00030 }
00031
00032
00033 namespace geos {
00034 namespace algorithm {
00035
00053 class InteriorPointArea {
00054
00055 private:
00056
00057 bool foundInterior;
00058
00059 const geom::GeometryFactory *factory;
00060
00061 geom::Coordinate interiorPoint;
00062
00063 double maxWidth;
00064
00065 void add(const geom::Geometry *geom);
00066
00067 const geom::Geometry *widestGeometry(const geom::Geometry *geometry);
00068
00069 const geom::Geometry *widestGeometry(const geom::GeometryCollection *gc);
00070
00071 geom::LineString *horizontalBisector(const geom::Geometry *geometry);
00072
00073 public:
00074
00075 InteriorPointArea(const geom::Geometry *g);
00076
00077 ~InteriorPointArea();
00078
00079 bool getInteriorPoint(geom::Coordinate& ret) const;
00080
00088 void addPolygon(const geom::Geometry *geometry);
00089
00090 };
00091
00092 }
00093 }
00094
00095 #endif // GEOS_ALGORITHM_INTERIORPOINTAREA_H
00096
00097
00098
00099
00100
00101
00102
00103