GEOS 3.11.1
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
27namespace geos {
28namespace geom {
29class Geometry;
30class GeometryFactory;
31class GeometryCollection;
32class Polygon;
33namespace util {
34class GeometryEditorOperation;
35}
36}
37}
38
39
40namespace geos {
41namespace geom { // geos.geom
42namespace util { // geos.geom.util
43
78class GEOS_DLL GeometryEditor {
79private:
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
92public:
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:52
Supplies a set of utility methods for building Geometry objects from CoordinateSequence or other Geom...
Definition: GeometryFactory.h:66
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:186
Represents a linear polygon, which may include holes.
Definition: Polygon.h:61
Definition: GeometryEditorOperation.h:38
Definition: GeometryEditor.h:78
std::unique_ptr< Geometry > edit(const Geometry *geometry, GeometryEditorOperation *operation)
GeometryEditor(const GeometryFactory *newFactory)
Basic namespace for all GEOS functionalities.
Definition: geos.h:39