00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GEOS_ALGORITHM_INTERIORPOINTLINE_H
00018 #define GEOS_ALGORITHM_INTERIORPOINTLINE_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 CoordinateSequence;
00028 }
00029 }
00030
00031
00032 namespace geos {
00033 namespace algorithm {
00034
00046 class GEOS_DLL InteriorPointLine {
00047 public:
00048
00049 InteriorPointLine(const geom::Geometry *g);
00050
00051 ~InteriorPointLine();
00052
00053
00054
00055 bool getInteriorPoint(geom::Coordinate& ret) const;
00056
00057 private:
00058
00059 bool hasInterior;
00060
00061 geom::Coordinate centroid;
00062
00063 double minDistance;
00064
00065 geom::Coordinate interiorPoint;
00066
00067 void addInterior(const geom::Geometry *geom);
00068
00069 void addInterior(const geom::CoordinateSequence *pts);
00070
00071 void addEndpoints(const geom::Geometry *geom);
00072
00073 void addEndpoints(const geom::CoordinateSequence *pts);
00074
00075 void add(const geom::Coordinate& point);
00076
00077 };
00078
00079 }
00080 }
00081
00082 #endif // GEOS_ALGORITHM_INTERIORPOINTLINE_H
00083
00084
00085
00086
00087
00088
00089
00090