Class RandomPointsBuilder
- java.lang.Object
-
- org.locationtech.jts.shape.GeometricShapeBuilder
-
- org.locationtech.jts.shape.random.RandomPointsBuilder
-
public class RandomPointsBuilder extends GeometricShapeBuilder
Creates random point sets contained in a region defined by either a rectangular or a polygonal extent.- Author:
- mbdavis
-
-
Constructor Summary
Constructors Constructor Description RandomPointsBuilder()Create a shape factory which will create shapes using the defaultGeometryFactory.RandomPointsBuilder(GeometryFactory geomFact)Create a shape factory which will create shapes using the givenGeometryFactory.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GeometrygetGeometry()voidsetExtent(Geometry mask)Sets a polygonal mask.-
Methods inherited from class org.locationtech.jts.shape.GeometricShapeBuilder
getCentre, getDiameter, getExtent, getRadius, getSquareBaseLine, getSquareExtent, setExtent, setNumPoints
-
-
-
-
Constructor Detail
-
RandomPointsBuilder
public RandomPointsBuilder()
Create a shape factory which will create shapes using the defaultGeometryFactory.
-
RandomPointsBuilder
public RandomPointsBuilder(GeometryFactory geomFact)
Create a shape factory which will create shapes using the givenGeometryFactory.- Parameters:
geomFact- the factory to use
-
-
Method Detail
-
setExtent
public void setExtent(Geometry mask)
Sets a polygonal mask.- Parameters:
mask-- Throws:
java.lang.IllegalArgumentException- if the mask is not polygonal
-
getGeometry
public Geometry getGeometry()
- Specified by:
getGeometryin classGeometricShapeBuilder
-
-