use of com.revolsys.geometry.model.util.SineStarFactory in project com.revolsys.open by revolsys.
the class PreparedPolygonIntersectsPerfTest method newLine.
Geometry newLine(final Point base, final double size, final int nPts) {
final SineStarFactory gsf = new SineStarFactory();
gsf.setCentre(base);
gsf.setSize(size);
gsf.setNumPoints(nPts);
final Geometry circle = gsf.newSineStar();
// System.out.println(circle);
return circle.getBoundary();
}
use of com.revolsys.geometry.model.util.SineStarFactory in project com.revolsys.open by revolsys.
the class RectangleIntersectsPerfTest method newSineStar.
Geometry newSineStar(final Point origin, final double size, final int nPts) {
final SineStarFactory gsf = new SineStarFactory();
gsf.setCentre(origin);
gsf.setSize(size);
gsf.setNumPoints(nPts);
gsf.setArmLengthRatio(2);
gsf.setNumArms(20);
final Geometry poly = gsf.newSineStar();
return poly;
}
use of com.revolsys.geometry.model.util.SineStarFactory in project com.revolsys.open by revolsys.
the class PointInAreaPerfTest method run.
public void run() {
final GeometryFactory geomFactory = GeometryFactory.DEFAULT_3D;
final SineStarFactory ssFact = new SineStarFactory();
ssFact.setSize(1000.0);
ssFact.setNumPoints(2000);
ssFact.setArmLengthRatio(0.1);
ssFact.setNumArms(100);
final Geometry area = ssFact.newSineStar();
// System.out.println(area);
final Stopwatch sw = new Stopwatch();
final PointOnGeometryLocator pia = new MCIndexedPointInAreaLocator(area);
// PointInAreaLocator pia = new IntervalIndexedPointInAreaLocator(area);
// PointInAreaLocator pia = new SimplePointInAreaLocator(area);
final PointInAreaPerfTester perfTester = new PointInAreaPerfTester(geomFactory, area);
perfTester.setNumPoints(50000);
perfTester.setPIA(pia);
perfTester.run();
// System.out.println("Overall time: " + sw.getTimeString());
}
use of com.revolsys.geometry.model.util.SineStarFactory in project com.revolsys.open by revolsys.
the class PreparedGeometryThreadSafeTest method newSineStar.
Geometry newSineStar(final Point origin, final double size, final int nPts) {
final SineStarFactory gsf = new SineStarFactory(this.factory);
gsf.setCentre(origin);
gsf.setSize(size);
gsf.setNumPoints(nPts);
gsf.setArmLengthRatio(0.1);
gsf.setNumArms(20);
final Geometry poly = gsf.newSineStar();
return poly;
}
use of com.revolsys.geometry.model.util.SineStarFactory in project com.revolsys.open by revolsys.
the class StressTestHarness method newSineStar.
Geometry newSineStar(final Point origin, final double size, final int nPts) {
final SineStarFactory gsf = new SineStarFactory();
gsf.setCentre(origin);
gsf.setSize(size);
gsf.setNumPoints(nPts);
gsf.setArmLengthRatio(0.1);
gsf.setNumArms(20);
final Geometry poly = gsf.newSineStar();
return poly;
}
Aggregations