GEOS 3.11.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#pragma once
21
22namespace geos {
23namespace geom { // geos::geom
24namespace prep { // geos::geom::prep
25
26class PreparedLineStringNearestPoints {
27public:
28
29 static std::unique_ptr<geom::CoordinateSequence>
30 nearestPoints(const PreparedLineString& prep, const geom::Geometry* geom)
31 {
32 PreparedLineStringNearestPoints op(prep);
33 return op.nearestPoints(geom);
34 }
35
36 PreparedLineStringNearestPoints(const PreparedLineString& prep)
37 : prepLine(prep)
38 { }
39
40 std::unique_ptr<geom::CoordinateSequence> nearestPoints(const geom::Geometry* g) const;
41
42protected:
43
44 const PreparedLineString& prepLine;
45
46 // Declare type as noncopyable
47 PreparedLineStringNearestPoints(const PreparedLineStringNearestPoints& other) = delete;
48 PreparedLineStringNearestPoints& operator=(const PreparedLineStringNearestPoints& rhs) = delete;
49};
50
51} // namespace geos::geom::prep
52} // namespace geos::geom
53} // namespace geos
54
Basic namespace for all GEOS functionalities.
Definition: geos.h:39