00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef GEOS_OPERATION_ISSIMPLEOP_H
00018 #define GEOS_OPERATION_ISSIMPLEOP_H
00019
00020 #include <map>
00021
00022
00023 namespace geos {
00024 namespace geom {
00025 class LineString;
00026 class MultiLineString;
00027 class MultiPoint;
00028 class Geometry;
00029 class Coordinate;
00030 struct CoordinateLessThen;
00031 }
00032 namespace geomgraph {
00033 class GeometryGraph;
00034 }
00035 namespace operation {
00036 class EndpointInfo;
00037 }
00038 }
00039
00040
00041 namespace geos {
00042 namespace operation {
00043
00053 class IsSimpleOp {
00054 public:
00055 IsSimpleOp();
00056 bool isSimple(const geom::LineString *geom);
00057 bool isSimple(const geom::MultiLineString *geom);
00058 bool isSimple(const geom::MultiPoint *mp);
00059 bool isSimpleLinearGeometry(const geom::Geometry *geom);
00060 private:
00061 bool hasNonEndpointIntersection(geomgraph::GeometryGraph &graph);
00062 bool hasClosedEndpointIntersection(geomgraph::GeometryGraph &graph);
00063 void addEndpoint(std::map<const geom::Coordinate*, EndpointInfo*,
00064 geom::CoordinateLessThen>&endPoints,
00065 const geom::Coordinate *p, bool isClosed);
00066 };
00067
00068 }
00069 }
00070
00071 #endif
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082