GEOS  3.9.1dev
PreparedLineString.h
Go to the documentation of this file.
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2020 Sandro Santilli <strk@kbt.io>
7  * Copyright (C) 2006 Refractions Research Inc.
8  *
9  * This is free software; you can redistribute and/or modify it under
10  * the terms of the GNU Lesser General Public Licence as published
11  * by the Free Software Foundation.
12  * See the COPYING file for more information.
13  *
14  *
15  **********************************************************************
16  *
17  * Last port: geom/prep/PreparedLineString.java rev 1.3 (JTS-1.10)
18  *
19  **********************************************************************/
20 
21 #ifndef GEOS_GEOM_PREP_PREPAREDLINESTRING_H
22 #define GEOS_GEOM_PREP_PREPAREDLINESTRING_H
23 
24 #include <geos/geom/prep/BasicPreparedGeometry.h> // for inheritance
28 
29 #include <memory>
30 
31 namespace geos {
32 namespace geom { // geos::geom
33 namespace prep { // geos::geom::prep
34 
43 private:
44  std::unique_ptr<noding::FastSegmentSetIntersectionFinder> segIntFinder;
46  mutable std::unique_ptr<operation::distance::IndexedFacetDistance> indexedDistance;
47 
48 protected:
49 public:
51  :
53  segIntFinder(nullptr)
54  { }
55 
56  ~PreparedLineString() override;
57 
59 
60  bool intersects(const geom::Geometry* g) const override;
61  std::unique_ptr<geom::CoordinateSequence> nearestPoints(const geom::Geometry* g) const override;
62  double distance(const geom::Geometry* g) const override;
64 
65 };
66 
67 } // namespace geos::geom::prep
68 } // namespace geos::geom
69 } // namespace geos
70 
71 #endif // GEOS_GEOM_PREP_PREPAREDLINESTRING_H
bool intersects(const geom::Geometry *g) const override
noding::SegmentString::ConstVect segStrings
std::unique_ptr< noding::FastSegmentSetIntersectionFinder > segIntFinder
Finds if two sets of SegmentStrings intersect.
double distance(const geom::Geometry *g) const override
Computes the distance between the facets (segments and vertices) of two Geometrys using a Branch-and-...
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
std::unique_ptr< operation::distance::IndexedFacetDistance > indexedDistance
std::vector< const SegmentString * > ConstVect
Definition: SegmentString.h:48
A prepared version of LinearRing, LineString or MultiLineString geometries.
noding::FastSegmentSetIntersectionFinder * getIntersectionFinder()
Basic namespace for all GEOS functionalities.
A base class for PreparedGeometry subclasses.
std::unique_ptr< geom::CoordinateSequence > nearestPoints(const geom::Geometry *g) const override
operation::distance::IndexedFacetDistance * getIndexedFacetDistance() const