00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef GEOS_GEOM_PREP_PREPAREDLINESTRINGINTERSECTS_H
00022 #define GEOS_GEOM_PREP_PREPAREDLINESTRINGINTERSECTS_H
00023
00024 #include <geos/geom/prep/PreparedLineString.h>
00025 #include <geos/algorithm/PointLocator.h>
00026 #include <geos/geom/util/ComponentCoordinateExtracter.h>
00027 #include <geos/geom/Coordinate.h>
00028 #include <geos/noding/SegmentStringUtil.h>
00029
00030 using namespace geos::algorithm;
00031 using namespace geos::geom::util;
00032
00033 namespace geos {
00034 namespace geom {
00035 namespace prep {
00036
00048 class PreparedLineStringIntersects
00049 {
00050 private:
00051 protected:
00052 PreparedLineString & prepLine;
00053
00054
00063 bool isAnyTestPointInTarget(const geom::Geometry * testGeom) const;
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084 public:
00085
00094 static bool intersects( PreparedLineString & prep, const geom::Geometry * geom )
00095 {
00096 PreparedLineStringIntersects * op = new PreparedLineStringIntersects( prep);
00097 return op->intersects( geom);
00098 }
00099
00103 PreparedLineStringIntersects(PreparedLineString & prep)
00104 : prepLine( prep)
00105 { }
00106
00113 bool intersects(const geom::Geometry * g) const;
00114
00115 };
00116
00117
00118
00119 }
00120 }
00121 }
00122
00123 #endif // GEOS_GEOM_PREP_PREPAREDLINESTRINGINTERSECTS_H
00124
00125
00126
00127