GEOS  3.9.1dev
Densifier.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) 2010 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: operation/polygonize/Polygonizer.java rev. 1.6 (JTS-1.10)
18  *
19  **********************************************************************/
20 
21 #ifndef GEOS_DENSIFIER_H
22 #define GEOS_DENSIFIER_H
23 
24 #include <geos/export.h>
25 #include <geos/geom/Geometry.h>
28 #include <geos/util/Interrupt.h>
29 
30 #include <vector>
31 
32 #ifdef _MSC_VER
33 #pragma warning(push)
34 /* warning C4251: needs to have dll-interface to be used by */
35 /* clients of class */
36 #pragma warning(disable: 4251)
37 #endif
38 
39 
40 namespace geos {
41 namespace geom {
42 namespace util {
43 
59 public:
60  Densifier(const Geometry* inputGeom);
61 
62  Geometry::Ptr densify(const Geometry* geom, double distanceTolerance);
63  void setDistanceTolerance(double distanceTolerance);
64  Geometry::Ptr getResultGeometry() const;
65 
66 private:
69  static std::unique_ptr<Coordinate::Vect> densifyPoints(const Coordinate::Vect pts, double distanceTolerance,
70  const PrecisionModel* precModel);
71 
73  public:
74  DensifyTransformer(double distanceTolerance);
76  CoordinateSequence::Ptr transformCoordinates(const CoordinateSequence* coords, const Geometry* parent) override;
77  Geometry::Ptr transformPolygon(const Polygon* geom, const Geometry* parent) override;
78  Geometry::Ptr transformMultiPolygon(const MultiPolygon* geom, const Geometry* parent) override;
79  Geometry::Ptr createValidArea(const Geometry* roughAreaGeom);
80  };
81 
82 }; // Densifier
83 
84 } // namespace geos.geom.util
85 } // namespace geos.geom
86 } // namespace geos
87 
88 #ifdef _MSC_VER
89 #pragma warning(pop)
90 #endif
91 
92 #endif // GEOS_DENSIFIER_H
A framework for processes which transform an input Geometry into an output Geometry, possibly changing its structure and type(s).
#define GEOS_DLL
Definition: export.h:28
const Geometry * inputGeom
Definition: Densifier.h:68
Specifies the precision model of the Coordinate in a Geometry.
Basic implementation of Geometry, constructed and destructed by GeometryFactory.
Definition: Geometry.h:188
std::unique_ptr< CoordinateSequence > Ptr
Represents a linear polygon, which may include holes.
Definition: Polygon.h:64
Basic namespace for all GEOS functionalities.
std::vector< Coordinate > Vect
A vector of Coordinate objects (real object, not pointers)
Definition: Coordinate.h:77
The internal representation of a list of coordinates inside a Geometry.
std::unique_ptr< Geometry > Ptr
An unique_ptr of Geometry.
Definition: Geometry.h:201