Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.vividsolutions.jts.precision
Class SimpleGeometryPrecisionReducer

    java.lang.Object
      com.vividsolutions.jts.precision.SimpleGeometryPrecisionReducer

public class SimpleGeometryPrecisionReducer
extends java.lang.Object

Reduces the precision of a `Geometry` according to the supplied `PrecisionModel`, without attempting to preserve valid topology.

The topology of the resulting geometry may be invalid if topological collapse occurs due to coordinates being shifted. It is up to the client to check this and handle it if necessary. Collapses may not matter for some uses. An example is simplifying the input to the buffer algorithm. The buffer algorithm does not depend on the validity of the input geometry.

Version:
  1.7

Constructor Summary
`SimpleGeometryPrecisionReducer(PrecisionModel pm)`

Method Summary
`Geometry` | `reduce(Geometry geom)`
`void` | `setChangePrecisionModel(boolean changePrecisionModel)` Sets whether the `PrecisionModel` of the new reduced Geometry will be changed to be the `PrecisionModel` supplied to specify the reduction.
`void` | `setRemoveCollapsedComponents(boolean removeCollapsed)` Sets whether the reduction will result in collapsed components being removed completely, or simply being collapsed to an (invalid) Geometry of the same type.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SimpleGeometryPrecisionReducer

    public SimpleGeometryPrecisionReducer(PrecisionModel pm)

Method Detail

### setRemoveCollapsedComponents

    public void setRemoveCollapsedComponents(boolean removeCollapsed)

  Sets whether the reduction will result in collapsed components being removed completely, or simply being collapsed to an (invalid) Geometry of the same type. The default is to remove collapsed components.

  Parameters:
    `removeCollapsed` - if `true` collapsed components will be removed

### setChangePrecisionModel

    public void setChangePrecisionModel(boolean changePrecisionModel)

  Sets whether the `PrecisionModel` of the new reduced Geometry will be changed to be the `PrecisionModel` supplied to specify the reduction. The default is to not change the precision model

  Parameters:
    `changePrecisionModel` - if `true` the precision model of the created Geometry will be the the precisionModel supplied in the constructor.

### reduce

    public Geometry reduce(Geometry geom)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD