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/geom/Coordinate.h>
00021
00022
00023 namespace geos {
00024 namespace geom {
00025 class Geometry;
00026 class CoordinateSequence;
00027 }
00028 }
00029
00030
00031 namespace geos {
00032 namespace algorithm {
00033
00045 class InteriorPointLine {
00046 public:
00047
00048 InteriorPointLine(const geom::Geometry *g);
00049
00050 ~InteriorPointLine();
00051
00052
00053
00054 bool getInteriorPoint(geom::Coordinate& ret) const;
00055
00056 private:
00057
00058 bool hasInterior;
00059
00060 geom::Coordinate centroid;
00061
00062 double minDistance;
00063
00064 geom::Coordinate interiorPoint;
00065
00066 void addInterior(const geom::Geometry *geom);
00067
00068 void addInterior(const geom::CoordinateSequence *pts);
00069
00070 void addEndpoints(const geom::Geometry *geom);
00071
00072 void addEndpoints(const geom::CoordinateSequence *pts);
00073
00074 void add(const geom::Coordinate& point);
00075
00076 };
00077
00078 }
00079 }
00080
00081 #endif // GEOS_ALGORITHM_INTERIORPOINTLINE_H
00082
00083
00084
00085
00086
00087
00088
00089