Examples of RandomPointsInGridBuilder


Examples of com.vividsolutions.jts.shape.random.RandomPointsInGridBuilder

import com.vividsolutions.jts.shape.random.RandomPointsInGridBuilder;

public class CreateRandomShapeFunctions {

  public static Geometry randomPointsInGrid(Geometry g, int nPts) {
    RandomPointsInGridBuilder shapeBuilder = new RandomPointsInGridBuilder(FunctionsUtil.getFactoryOrDefault(g));
    shapeBuilder.setExtent(FunctionsUtil.getEnvelopeOrDefault(g));
    shapeBuilder.setNumPoints(nPts);
    return shapeBuilder.getGeometry();
  }
View Full Code Here

Examples of com.vividsolutions.jts.shape.random.RandomPointsInGridBuilder

    shapeBuilder.setNumPoints(nPts);
    return shapeBuilder.getGeometry();
  }

  public static Geometry randomPointsInGridCircles(Geometry g, int nPts) {
    RandomPointsInGridBuilder shapeBuilder = new RandomPointsInGridBuilder(FunctionsUtil.getFactoryOrDefault(g));
    shapeBuilder.setExtent(FunctionsUtil.getEnvelopeOrDefault(g));
    shapeBuilder.setNumPoints(nPts);
    shapeBuilder.setConstrainedToCircle(true);
    return shapeBuilder.getGeometry();
  }
View Full Code Here

Examples of com.vividsolutions.jts.shape.random.RandomPointsInGridBuilder

    shapeBuilder.setConstrainedToCircle(true);
    return shapeBuilder.getGeometry();
  }

  public static Geometry randomPointsInGridWithGutter(Geometry g, int nPts, double gutterFraction) {
    RandomPointsInGridBuilder shapeBuilder = new RandomPointsInGridBuilder(FunctionsUtil.getFactoryOrDefault(g));
    shapeBuilder.setExtent(FunctionsUtil.getEnvelopeOrDefault(g));
    shapeBuilder.setNumPoints(nPts);
    shapeBuilder.setGutterFraction(gutterFraction);
    return shapeBuilder.getGeometry();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.