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