Search in sources :

Example 1 with SineStarFactory

use of com.revolsys.geometry.model.util.SineStarFactory in project com.revolsys.open by revolsys.

the class PreparedPolygonIntersectsStressTest 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;
}
Also used : Geometry(com.revolsys.geometry.model.Geometry) SineStarFactory(com.revolsys.geometry.model.util.SineStarFactory)

Example 2 with SineStarFactory

use of com.revolsys.geometry.model.util.SineStarFactory in project com.revolsys.open by revolsys.

the class TestPerfDistanceGeomPair method newSineStars.

Geometry[] newSineStars(final int nPts) {
    final SineStarFactory gsf = new SineStarFactory();
    gsf.setCentre(new PointDoubleXY(0, 0));
    gsf.setSize(100);
    gsf.setNumPoints(nPts);
    final Geometry g = gsf.newSineStar().getBoundary();
    gsf.setCentre(new PointDoubleXY(0, this.separationDist));
    final Geometry g2 = gsf.newSineStar().getBoundary();
    return new Geometry[] { g, g2 };
}
Also used : Geometry(com.revolsys.geometry.model.Geometry) SineStarFactory(com.revolsys.geometry.model.util.SineStarFactory) PointDoubleXY(com.revolsys.geometry.model.impl.PointDoubleXY)

Example 3 with SineStarFactory

use of com.revolsys.geometry.model.util.SineStarFactory in project com.revolsys.open by revolsys.

the class TestDataBuilder method newSineStar.

public Geometry newSineStar(final int nPts) {
    final SineStarFactory gsf = new SineStarFactory();
    gsf.setCentre(this.origin);
    gsf.setSize(this.size);
    gsf.setNumPoints(nPts);
    gsf.setArmLengthRatio(0.1);
    gsf.setNumArms(20);
    final Geometry poly = gsf.newSineStar();
    return poly;
}
Also used : Geometry(com.revolsys.geometry.model.Geometry) SineStarFactory(com.revolsys.geometry.model.util.SineStarFactory)

Example 4 with SineStarFactory

use of com.revolsys.geometry.model.util.SineStarFactory in project com.revolsys.open by revolsys.

the class PreparedPolygonIntersectsPerfTest 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(50);
    final Geometry poly = gsf.newSineStar();
    return poly;
}
Also used : Geometry(com.revolsys.geometry.model.Geometry) SineStarFactory(com.revolsys.geometry.model.util.SineStarFactory)

Example 5 with SineStarFactory

use of com.revolsys.geometry.model.util.SineStarFactory in project com.revolsys.open by revolsys.

the class TestPerfDistanceGeomSet method newCircleRandomLocation.

Geometry newCircleRandomLocation(final int nPts) {
    final SineStarFactory gsf = new SineStarFactory();
    gsf.setCentre(randomLocation());
    gsf.setSize(GEOM_SIZE);
    gsf.setNumPoints(nPts);
    final Polygon g = gsf.newCircle();
    return g;
}
Also used : SineStarFactory(com.revolsys.geometry.model.util.SineStarFactory) Polygon(com.revolsys.geometry.model.Polygon)

Aggregations

SineStarFactory (com.revolsys.geometry.model.util.SineStarFactory)10 Geometry (com.revolsys.geometry.model.Geometry)9 PointOnGeometryLocator (com.revolsys.geometry.algorithm.locate.PointOnGeometryLocator)1 GeometryFactory (com.revolsys.geometry.model.GeometryFactory)1 Polygon (com.revolsys.geometry.model.Polygon)1 PointDoubleXY (com.revolsys.geometry.model.impl.PointDoubleXY)1 Stopwatch (com.revolsys.geometry.util.Stopwatch)1