GEOS  3.9.1dev
PreparedPolygonDistance.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  *
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_PREPAREDPOLYGONDISTANCE_H
21 #define GEOS_GEOM_PREP_PREPAREDPOLYGONDISTANCE_H
22 
23 // Forward declarations
24 namespace geos {
25  namespace geom {
26  class Geometry;
27  namespace prep {
28  class PreparedPolygon;
29  }
30  }
31 }
32 
33 namespace geos {
34 namespace geom { // geos::geom
35 namespace prep { // geos::geom::prep
36 
37 class PreparedPolygon;
38 
40 public:
41 
42  static double distance(const PreparedPolygon& prep, const geom::Geometry* geom)
43  {
44  PreparedPolygonDistance op(prep);
45  return op.distance(geom);
46  }
47 
49  : prepPoly(prep)
50  { }
51 
52  double distance(const geom::Geometry* g) const;
53 
54 protected:
55 
57 
58  // Declare type as noncopyable
59  PreparedPolygonDistance(const PreparedPolygonDistance& other) = delete;
60  PreparedPolygonDistance& operator=(const PreparedPolygonDistance& rhs) = delete;
61 };
62 
63 } // namespace geos::geom::prep
64 } // namespace geos::geom
65 } // namespace geos
66 
67 #endif // GEOS_GEOM_PREP_PREPAREDPOLYGONDISTANCE_H
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
static double distance(const PreparedPolygon &prep, const geom::Geometry *geom)
Basic namespace for all GEOS functionalities.
PreparedPolygonDistance(const PreparedPolygon &prep)
A prepared version of Polygon or MultiPolygon geometries.