com.vividsolutions.jts.shape.random
Class RandomPointsBuilder
java.lang.Object
com.vividsolutions.jts.shape.GeometricShapeBuilder
com.vividsolutions.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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
maskPoly
protected Geometry maskPoly
RandomPointsBuilder
public RandomPointsBuilder()
- Create a shape factory which will create shapes using the default
GeometryFactory
.
RandomPointsBuilder
public RandomPointsBuilder(GeometryFactory geomFact)
- Create a shape factory which will create shapes using the given
GeometryFactory
.
- Parameters:
geomFact
- the factory to use
setExtent
public void setExtent(Geometry mask)
- Sets a polygonal mask.
- Parameters:
mask
-
getGeometry
public Geometry getGeometry()
- Specified by:
getGeometry
in class GeometricShapeBuilder
isInExtent
protected boolean isInExtent(Coordinate p)
createCoord
protected Coordinate createCoord(double x,
double y)
- Overrides:
createCoord
in class GeometricShapeBuilder
createRandomCoord
protected Coordinate createRandomCoord(Envelope env)