Package com.vividsolutions.jts.shape.random

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


    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

    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

Related Classes of com.vividsolutions.jts.shape.random.RandomPointsInGridBuilder

Copyright © 2018 www.massapicom. 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.