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/export.h>
00021 #include <geos/geom/Coordinate.h>
00022
00023
00024 namespace geos {
00025 namespace geom {
00026 class Geometry;
00027 class LineString;
00028 class GeometryFactory;
00029 class GeometryCollection;
00030 }
00031 }
00032
00033
00034 namespace geos {
00035 namespace algorithm {
00036
00054 class GEOS_DLL InteriorPointArea {
00055
00056 private:
00057
00058 bool foundInterior;
00059
00060 const geom::GeometryFactory *factory;
00061
00062 geom::Coordinate interiorPoint;
00063
00064 double maxWidth;
00065
00066 void add(const geom::Geometry *geom);
00067
00068 const geom::Geometry *widestGeometry(const geom::Geometry *geometry);
00069
00070 const geom::Geometry *widestGeometry(const geom::GeometryCollection *gc);
00071
00072 geom::LineString *horizontalBisector(const geom::Geometry *geometry);
00073
00074 public:
00075
00076 InteriorPointArea(const geom::Geometry *g);
00077
00078 ~InteriorPointArea();
00079
00080 bool getInteriorPoint(geom::Coordinate& ret) const;
00081
00089 void addPolygon(const geom::Geometry *geometry);
00090
00091 };
00092
00093 }
00094 }
00095
00096 #endif // GEOS_ALGORITHM_INTERIORPOINTAREA_H
00097
00098
00099
00100
00101
00102
00103
00104