GEOS  3.9.1
PreparedLineStringNearestPoints.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2020 Sandro Santilli <strk@kbt.io>
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: ORIGINAL WORK
17  *
18  **********************************************************************/
19 
20 #ifndef GEOS_GEOM_PREP_PREPAREDLINESTRINGNEARESTPOINTS_H
21 #define GEOS_GEOM_PREP_PREPAREDLINESTRINGNEARESTPOINTS_H
22 
23 namespace geos {
24 namespace geom { // geos::geom
25 namespace prep { // geos::geom::prep
26 
27 class PreparedLineStringNearestPoints {
28 public:
29 
30  static std::unique_ptr<geom::CoordinateSequence>
31  nearestPoints(const PreparedLineString& prep, const geom::Geometry* geom)
32  {
33  PreparedLineStringNearestPoints op(prep);
34  return op.nearestPoints(geom);
35  }
36 
37  PreparedLineStringNearestPoints(const PreparedLineString& prep)
38  : prepLine(prep)
39  { }
40 
41  std::unique_ptr<geom::CoordinateSequence> nearestPoints(const geom::Geometry* g) const;
42 
43 protected:
44 
45  const PreparedLineString& prepLine;
46 
47  // Declare type as noncopyable
48  PreparedLineStringNearestPoints(const PreparedLineStringNearestPoints& other) = delete;
49  PreparedLineStringNearestPoints& operator=(const PreparedLineStringNearestPoints& rhs) = delete;
50 };
51 
52 } // namespace geos::geom::prep
53 } // namespace geos::geom
54 } // namespace geos
55 
56 #endif // GEOS_GEOM_PREP_PREPAREDLINESTRINGNEARESTPOINTS_H
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:26