GEOS  3.8.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 #ifndef GEOS_GEOM_UTIL_GEOMETRYEDITOR_H
22 #define GEOS_GEOM_UTIL_GEOMETRYEDITOR_H
23 
24 #include <geos/export.h>
25 #include <memory>
26 
27 // Forward declarations
28 namespace geos {
29 namespace geom {
30 class Geometry;
31 class GeometryFactory;
32 class GeometryCollection;
33 class Polygon;
34 namespace util {
35 class GeometryEditorOperation;
36 }
37 }
38 }
39 
40 
41 namespace geos {
42 namespace geom { // geos.geom
43 namespace util { // geos.geom.util
44 
79 class GEOS_DLL GeometryEditor {
80 private:
84  const GeometryFactory* factory;
85 
86  std::unique_ptr<Polygon> editPolygon(const Polygon* polygon,
87  GeometryEditorOperation* operation);
88 
89  std::unique_ptr<GeometryCollection> editGeometryCollection(
90  const GeometryCollection* collection,
91  GeometryEditorOperation* operation);
92 
93 public:
94 
100  GeometryEditor();
101 
109  GeometryEditor(const GeometryFactory* newFactory);
110 
121  std::unique_ptr<Geometry> edit(const Geometry* geometry,
122  GeometryEditorOperation* operation); // final
123 };
124 
125 } // namespace geos.geom.util
126 } // namespace geos.geom
127 } // namespace geos
128 
129 #endif
Definition: GeometryEditor.h:79
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
Represents a linear polygon, which may include holes.
Definition: Polygon.h:64
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:66
Represents a collection of heterogeneous Geometry objects.
Definition: GeometryCollection.h:55
Basic namespace for all GEOS functionalities.
Definition: IndexedNestedRingTester.h:25
Definition: GeometryEditorOperation.h:39