GEOS  3.14.0dev
GeometryEditor.h
1 /**********************************************************************
2  *
3  * GEOS - Geometry Engine Open Source
4  * http://geos.osgeo.org
5  *
6  * Copyright (C) 2011 Sandro Santilli <strk@kbt.io>
7  * Copyright (C) 2006 Refractions Research Inc.
8  * Copyright (C) 2001-2002 Vivid Solutions Inc.
9  *
10  * This is free software; you can redistribute and/or modify it under
11  * the terms of the GNU Lesser General Public Licence as published
12  * by the Free Software Foundation.
13  * See the COPYING file for more information.
14  *
15  **********************************************************************
16  *
17  * Last port: geom/util/GeometryEditor.java r320 (JTS-1.12)
18  *
19  **********************************************************************/
20 
21 #pragma once
22 
23 #include <geos/export.h>
24 #include <memory>
25 
26 // Forward declarations
27 namespace geos {
28 namespace geom {
29 class Geometry;
30 class GeometryFactory;
31 class GeometryCollection;
32 class Polygon;
33 namespace util {
34 class GeometryEditorOperation;
35 }
36 }
37 }
38 
39 
40 namespace geos {
41 namespace geom { // geos.geom
42 namespace util { // geos.geom.util
43 
78 class GEOS_DLL GeometryEditor {
79 private:
83  const GeometryFactory* factory;
84 
85  std::unique_ptr<Polygon> editPolygon(const Polygon* polygon,
86  GeometryEditorOperation* operation);
87 
88  std::unique_ptr<GeometryCollection> editGeometryCollection(
89  const GeometryCollection* collection,
90  GeometryEditorOperation* operation);
91 
92 public:
93 
100 
108  GeometryEditor(const GeometryFactory* newFactory);
109 
120  std::unique_ptr<Geometry> edit(const Geometry* geometry,
121  GeometryEditorOperation* operation); // final
122 };
123 
124 } // namespace geos.geom.util
125 } // namespace geos.geom
126 } // namespace geos
127 
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:51
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:70
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:197
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Definition: GeometryEditorOperation.h:38
Definition: GeometryEditor.h:78
GeometryEditor(const GeometryFactory *newFactory)
std::unique_ptr< Geometry > edit(const Geometry *geometry, GeometryEditorOperation *operation)
Basic namespace for all GEOS functionalities.
Definition: Angle.h:25