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 org.locationtech.jts.shape.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 Coordinate
createCoord
(double x, double y) protected Coordinate
protected boolean
void
Sets a polygonal mask.Methods inherited from class org.locationtech.jts.shape.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:
getGeometry
in classGeometricShapeBuilder
-
isInExtent
-
createCoord
- Overrides:
createCoord
in classGeometricShapeBuilder
-
createRandomCoord
-