Class RandomPointsBuilder
java.lang.Object
org.locationtech.jts.shape.GeometricShapeBuilder
org.locationtech.jts.shape.random.RandomPointsBuilder
Creates random point sets contained in a
region defined by either a rectangular or a polygonal extent.
- Author:
- mbdavis
-
Field Summary
FieldsFields inherited from class GeometricShapeBuilder
extent, geomFactory, numPts -
Constructor Summary
ConstructorsConstructorDescriptionCreate 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
Modifier and TypeMethodDescriptionprotected CoordinatecreateCoord(double x, double y) protected Coordinateprotected booleanvoidSets a polygonal mask.Methods inherited from class GeometricShapeBuilder
getCentre, getDiameter, getExtent, getRadius, getSquareBaseLine, getSquareExtent, setExtent, setNumPoints
-
Field Details
-
maskPoly
-
-
Constructor Details
-
RandomPointsBuilder
public RandomPointsBuilder()Create a shape factory which will create shapes using the defaultGeometryFactory. -
RandomPointsBuilder
Create a shape factory which will create shapes using the givenGeometryFactory.- Parameters:
geomFact- the factory to use
-
-
Method Details
-
setExtent
Sets a polygonal mask.- Parameters:
mask-- Throws:
IllegalArgumentException- if the mask is not polygonal
-
getGeometry
- Specified by:
getGeometryin classGeometricShapeBuilder
-
isInExtent
-
createCoord
- Overrides:
createCoordin classGeometricShapeBuilder
-
createRandomCoord
-