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