com.vividsolutions.jts.precision

Class CommonBitsRemover


public class CommonBitsRemover
extends java.lang.Object

Allow computing and removing common mantissa bits from one or more Geometries.
Version:
1.7

Constructor Summary

CommonBitsRemover()

Method Summary

void
add(Geometry geom)
Add a geometry to the set of geometries whose common bits are being computed.
void
addCommonBits(Geometry geom)
Adds the common coordinate bits back into a Geometry.
Coordinate
getCommonCoordinate()
The common bits of the Coordinates in the supplied Geometries.
Geometry
removeCommonBits(Geometry geom)
Removes the common coordinate bits from a Geometry.

Constructor Details

CommonBitsRemover

public CommonBitsRemover()

Method Details

add

public void add(Geometry geom)
Add a geometry to the set of geometries whose common bits are being computed. After this method has executed the common coordinate reflects the common bits of all added geometries.
Parameters:
geom - a Geometry to test for common bits

addCommonBits

public void addCommonBits(Geometry geom)
Adds the common coordinate bits back into a Geometry. The coordinates of the Geometry are changed.
Parameters:
geom - the Geometry to which to add the common coordinate bits

getCommonCoordinate

public Coordinate getCommonCoordinate()
The common bits of the Coordinates in the supplied Geometries.

removeCommonBits

public Geometry removeCommonBits(Geometry geom)
Removes the common coordinate bits from a Geometry. The coordinates of the Geometry are changed.
Parameters:
geom - the Geometry from which to remove the common coordinate bits
Returns:
the shifted Geometry