GEOS  3.8.0dev
PreparedLineStringIntersects.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2006 Refractions Research Inc.
7  *
8  * This is free software; you can redistribute and/or modify it under
9  * the terms of the GNU Lesser General Public Licence as published
10  * by the Free Software Foundation.
11  * See the COPYING file for more information.
12  *
13  *
14  **********************************************************************
15  *
16  * Last port: geom/prep/PreparedLineStringIntersects.java r338 (JTS-1.12)
17  *
18  **********************************************************************/
19 
20 #ifndef GEOS_GEOM_PREP_PREPAREDLINESTRINGINTERSECTS_H
21 #define GEOS_GEOM_PREP_PREPAREDLINESTRINGINTERSECTS_H
22 
23 #include <geos/geom/prep/PreparedLineString.h>
24 #include <geos/algorithm/PointLocator.h>
25 #include <geos/geom/util/ComponentCoordinateExtracter.h>
26 #include <geos/geom/Coordinate.h>
27 #include <geos/noding/SegmentStringUtil.h>
28 
29 namespace geos {
30 namespace geom { // geos::geom
31 namespace prep { // geos::geom::prep
32 
45 public:
46 
55  static bool
57  {
59  return op.intersects(geom);
60  }
61 
66  : prepLine(prep)
67  { }
68 
75  bool intersects(const geom::Geometry* g) const;
76 
77 protected:
78  PreparedLineString& prepLine;
79 
88  bool isAnyTestPointInTarget(const geom::Geometry* testGeom) const;
89 
90  // Declare type as noncopyable
92  PreparedLineStringIntersects& operator=(const PreparedLineStringIntersects& rhs) = delete;
93 };
94 
95 } // namespace geos::geom::prep
96 } // namespace geos::geom
97 } // namespace geos
98 
99 #endif // GEOS_GEOM_PREP_PREPAREDLINESTRINGINTERSECTS_H
100 
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
A prepared version of LinearRing, LineString or MultiLineString geometries.
Definition: PreparedLineString.h:43
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
bool isAnyTestPointInTarget(const geom::Geometry *testGeom) const
Computes the intersects spatial relationship predicate for a target PreparedLineString relative to al...
Definition: PreparedLineStringIntersects.h:44
static bool intersects(PreparedLineString &prep, const geom::Geometry *geom)
Definition: PreparedLineStringIntersects.h:56
PreparedLineStringIntersects(PreparedLineString &prep)
Definition: PreparedLineStringIntersects.h:65