GEOS 3.8.1
PreparedLineString.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/PreparedLineString.java rev 1.3 (JTS-1.10)
17 *
18 **********************************************************************/
19
20#ifndef GEOS_GEOM_PREP_PREPAREDLINESTRING_H
21#define GEOS_GEOM_PREP_PREPAREDLINESTRING_H
22
23#include <geos/geom/prep/BasicPreparedGeometry.h> // for inheritance
24#include <geos/noding/SegmentString.h>
25#include <geos/noding/FastSegmentSetIntersectionFinder.h>
26
27#include <memory>
28
29namespace geos {
30namespace geom { // geos::geom
31namespace prep { // geos::geom::prep
32
41private:
42 std::unique_ptr<noding::FastSegmentSetIntersectionFinder> segIntFinder;
43 mutable noding::SegmentString::ConstVect segStrings;
44
45protected:
46public:
47 PreparedLineString(const Geometry* geom)
48 :
50 segIntFinder(nullptr)
51 { }
52
53 ~PreparedLineString() override;
54
55 noding::FastSegmentSetIntersectionFinder* getIntersectionFinder();
56
57 bool intersects(const geom::Geometry* g) const override;
58
59};
60
61} // namespace geos::geom::prep
62} // namespace geos::geom
63} // namespace geos
64
65#endif // GEOS_GEOM_PREP_PREPAREDLINESTRING_H
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
A base class for PreparedGeometry subclasses.
Definition: BasicPreparedGeometry.h:59
A prepared version of LinearRing, LineString or MultiLineString geometries.
Definition: PreparedLineString.h:40
bool intersects(const geom::Geometry *g) const override
Finds if two sets of SegmentStrings intersect.
Definition: FastSegmentSetIntersectionFinder.h:51
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25