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
00059 class GEOS_DLL InteriorPointArea {
00060
00061 private:
00062
00063 bool foundInterior;
00064
00065 const geom::GeometryFactory *factory;
00066
00067 geom::Coordinate interiorPoint;
00068
00069 double maxWidth;
00070
00071 void add(const geom::Geometry *geom);
00072
00073 const geom::Geometry *widestGeometry(const geom::Geometry *geometry);
00074
00075 const geom::Geometry *widestGeometry(const geom::GeometryCollection *gc);
00076
00077 geom::LineString *horizontalBisector(const geom::Geometry *geometry);
00078
00079 public:
00080
00081 InteriorPointArea(const geom::Geometry *g);
00082
00083 ~InteriorPointArea();
00084
00085 bool getInteriorPoint(geom::Coordinate& ret) const;
00086
00094 void addPolygon(const geom::Geometry *geometry);
00095
00096 };
00097
00098 }
00099 }
00100
00101 #endif // GEOS_ALGORITHM_INTERIORPOINTAREA_H
00102
00103
00104
00105
00106
00107
00108
00109