Reduces the precision of a Geometry according to the supplied PrecisionModel, ensuring that the result is topologically valid.
More...
#include <GeometryPrecisionReducer.h>
Reduces the precision of a Geometry according to the supplied PrecisionModel, ensuring that the result is topologically valid.
◆ GeometryPrecisionReducer()
Create a reducer that will change the precision model of the new reduced Geometry.
- Parameters
-
gf | the factory for the created Geometry. Its PrecisionModel will be used for the reduction. NOTE: ownership left to caller must be kept alive for the whole lifetime of the returned Geometry. |
◆ reduce()
Convenience method for doing precision reduction on a single geometry, with collapses removed and keeping the geometry precision model the same, and preserving polygonal topology.
- Parameters
-
g | the geometry to reduce |
precModel | the precision model to use |
- Returns
- the reduced geometry
References reduce().
Referenced by reduce(), and reducePointwise().
◆ reducePointwise()
Convenience method for doing precision reduction on a single geometry, with collapses removed and keeping the geometry precision model the same, but NOT preserving valid polygonal topology.
- Parameters
-
g | the geometry to reduce |
precModel | the precision model to use |
- Returns
- the reduced geometry
References reduce(), and setPointwise().
◆ setPointwise()
void geos::precision::GeometryPrecisionReducer::setPointwise |
( |
bool |
pointwise | ) |
|
|
inline |
Sets whether the precision reduction will be done in pointwise fashion only.
Pointwise precision reduction reduces the precision of the individual coordinates only, but does not attempt to recreate valid topology. This is only relevant for geometries containing polygonal components.
- Parameters
-
pointwise | if reduction should be done pointwise only |
Referenced by reducePointwise().
◆ setRemoveCollapsedComponents()
void geos::precision::GeometryPrecisionReducer::setRemoveCollapsedComponents |
( |
bool |
remove | ) |
|
|
inline |
Sets whether the reduction will result in collapsed components being removed completely, or simply being collapsed to an (invalid) Geometry of the same type.
- Parameters
-
remove | if true collapsed components will be removed |
The documentation for this class was generated from the following file: