GEOS
3.3.1
|
00001 /********************************************************************** 00002 * 00003 * GEOS - Geometry Engine Open Source 00004 * http://geos.refractions.net 00005 * 00006 * Copyright (C) 2006 Refractions Research Inc. 00007 * 00008 * This is free software; you can redistribute and/or modify it under 00009 * the terms of the GNU Lesser General Public Licence as published 00010 * by the Free Software Foundation. 00011 * See the COPYING file for more information. 00012 * 00013 * 00014 ********************************************************************** 00015 * 00016 * Last port: geom/prep/PreparedLineStringIntersects.java r338 (JTS-1.12) 00017 * 00018 **********************************************************************/ 00019 00020 #ifndef GEOS_GEOM_PREP_PREPAREDLINESTRINGINTERSECTS_H 00021 #define GEOS_GEOM_PREP_PREPAREDLINESTRINGINTERSECTS_H 00022 00023 #include <geos/geom/prep/PreparedLineString.h> 00024 #include <geos/algorithm/PointLocator.h> 00025 #include <geos/geom/util/ComponentCoordinateExtracter.h> 00026 #include <geos/geom/Coordinate.h> 00027 #include <geos/noding/SegmentStringUtil.h> 00028 00029 namespace geos { 00030 namespace geom { // geos::geom 00031 namespace prep { // geos::geom::prep 00032 00044 class PreparedLineStringIntersects 00045 { 00046 public: 00047 00056 static bool intersects( PreparedLineString & prep, const geom::Geometry * geom ) 00057 { 00058 PreparedLineStringIntersects op( prep); 00059 return op.intersects( geom); 00060 } 00061 00065 PreparedLineStringIntersects(PreparedLineString & prep) 00066 : prepLine( prep) 00067 { } 00068 00075 bool intersects(const geom::Geometry * g) const; 00076 00077 protected: 00078 PreparedLineString & prepLine; 00079 00088 bool isAnyTestPointInTarget(const geom::Geometry * testGeom) const; 00089 00090 // Declare type as noncopyable 00091 PreparedLineStringIntersects(const PreparedLineStringIntersects& other); 00092 PreparedLineStringIntersects& operator=(const PreparedLineStringIntersects& rhs); 00093 }; 00094 00095 } // namespace geos::geom::prep 00096 } // namespace geos::geom 00097 } // namespace geos 00098 00099 #endif // GEOS_GEOM_PREP_PREPAREDLINESTRINGINTERSECTS_H 00100