Class GeometryStretcherView
- java.lang.Object
-
- org.locationtech.jtstest.testbuilder.model.GeometryStretcherView
-
public class GeometryStretcherView extends java.lang.Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classGeometryStretcherView.StretchedGeometryContainer
-
Field Summary
Fields Modifier and Type Field Description private GeometryEditModelgeomModelprivate booleanisViewPerformantprivate EnvelopemaskEnvprivate static intMAX_VERTICES_IN_MASKThe maximum number of vertices which can be shown.static doubleNEARNESS_TOL_IN_VIEWThe nearness tolerance in view pixels.private doublenearnessTolprivate java.util.List[]stretchCoordsprivate Geometry[]stretchGeomprivate doublestretchSize
-
Constructor Summary
Constructors Constructor Description GeometryStretcherView(GeometryEditModel geomEditModel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeometryContainergetContainer(int i)GeometrygetStretchedGeometry(int index)java.util.ListgetStretchedVertices(int index)private booleanisCacheValid()booleanisViewPerformant()voidsetEnvelope(Envelope maskEnv)voidsetNearnessTolerance(double nearnessTol)voidsetStretchSize(double stretchSize)Sets the amount by which vertices will be stretched (in geometry units).private voidupdateCache()
-
-
-
Field Detail
-
MAX_VERTICES_IN_MASK
private static final int MAX_VERTICES_IN_MASK
The maximum number of vertices which can be shown. This is chosen to ensure reasonable performance for rendering.- See Also:
- Constant Field Values
-
NEARNESS_TOL_IN_VIEW
public static final double NEARNESS_TOL_IN_VIEW
The nearness tolerance in view pixels. This is chosen to be as large as possible (which minimizes change to geometries) but small enough that points which appear to be coincident on the screen at a given zoom level will be magnified.- See Also:
- Constant Field Values
-
geomModel
private GeometryEditModel geomModel
-
stretchGeom
private Geometry[] stretchGeom
-
stretchCoords
private java.util.List[] stretchCoords
-
isViewPerformant
private boolean isViewPerformant
-
maskEnv
private Envelope maskEnv
-
stretchSize
private double stretchSize
-
nearnessTol
private double nearnessTol
-
-
Constructor Detail
-
GeometryStretcherView
public GeometryStretcherView(GeometryEditModel geomEditModel)
-
-
Method Detail
-
getContainer
public GeometryContainer getContainer(int i)
-
setStretchSize
public void setStretchSize(double stretchSize)
Sets the amount by which vertices will be stretched (in geometry units).- Parameters:
stretchSize-
-
setNearnessTolerance
public void setNearnessTolerance(double nearnessTol)
-
setEnvelope
public void setEnvelope(Envelope maskEnv)
-
isViewPerformant
public boolean isViewPerformant()
-
getStretchedGeometry
public Geometry getStretchedGeometry(int index)
-
getStretchedVertices
public java.util.List getStretchedVertices(int index)
-
updateCache
private void updateCache()
-
isCacheValid
private boolean isCacheValid()
-
-