Package org.meteoinfo.jts.precision
Class SimpleGeometryPrecisionReducer
- java.lang.Object
-
- org.meteoinfo.jts.precision.SimpleGeometryPrecisionReducer
-
Deprecated.use GeometryPrecisionReducer
public class SimpleGeometryPrecisionReducer extends java.lang.ObjectReduces the precision of the coordinates of aGeometryaccording to the suppliedPrecisionModel, without attempting to preserve valid topology.In the case of
Polygonalgeometries, 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.
-
-
Constructor Summary
Constructors Constructor Description SimpleGeometryPrecisionReducer(PrecisionModel pm)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Geometryreduce(Geometry geom)Deprecated.static Geometryreduce(Geometry g, PrecisionModel precModel)Deprecated.Convenience method for doing precision reduction on a single geometry, with collapses removed and keeping the geometry precision model the same.voidsetChangePrecisionModel(boolean changePrecisionModel)Deprecated.Sets whether thePrecisionModelof the new reduced Geometry will be changed to be thePrecisionModelsupplied to specify the precision reduction.voidsetRemoveCollapsedComponents(boolean removeCollapsed)Deprecated.Sets whether the reduction will result in collapsed components being removed completely, or simply being collapsed to an (invalid) Geometry of the same type.
-
-
-
Constructor Detail
-
SimpleGeometryPrecisionReducer
public SimpleGeometryPrecisionReducer(PrecisionModel pm)
Deprecated.
-
-
Method Detail
-
reduce
public static Geometry reduce(Geometry g, PrecisionModel precModel)
Deprecated.Convenience method for doing precision reduction on a single geometry, with collapses removed and keeping the geometry precision model the same.- Parameters:
g-precModel-- Returns:
- the reduced geometry
-
setRemoveCollapsedComponents
public void setRemoveCollapsedComponents(boolean removeCollapsed)
Deprecated.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- iftruecollapsed components will be removed
-
setChangePrecisionModel
public void setChangePrecisionModel(boolean changePrecisionModel)
Deprecated.Sets whether thePrecisionModelof the new reduced Geometry will be changed to be thePrecisionModelsupplied to specify the precision reduction.The default is to not change the precision model
- Parameters:
changePrecisionModel- iftruethe precision model of the created Geometry will be the the precisionModel supplied in the constructor.
-
-