use of com.revolsys.geometry.util.GeometricShapeFactory in project com.revolsys.open by revolsys.
the class PolygonUnionPerfTest method newPolygon.
Geometry newPolygon(final Point base, final double size, final int nPts) {
final GeometricShapeFactory gsf = new GeometricShapeFactory(this.factory);
gsf.setCentre(base);
gsf.setSize(size);
gsf.setNumPoints(nPts);
final Geometry poly = gsf.newCircle();
// System.out.println(circle);
return poly;
}
use of com.revolsys.geometry.util.GeometricShapeFactory in project com.revolsys.open by revolsys.
the class SerializabilityTest method testSerializable.
public void testSerializable() throws Exception {
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
final ObjectOutputStream oos = new ObjectOutputStream(baos);
final GeometricShapeFactory gsf = new GeometricShapeFactory(fact);
final Geometry g = gsf.newCircle();
oos.writeObject(g);
}
use of com.revolsys.geometry.util.GeometricShapeFactory in project com.revolsys.open by revolsys.
the class WKBTest method testBigPolygon.
public void testBigPolygon() throws IOException, ParseException {
final GeometricShapeFactory shapeFactory = new GeometricShapeFactory(this.geomFactory);
shapeFactory.setBase(new PointDoubleXY(0, 0));
shapeFactory.setSize(1000);
shapeFactory.setNumPoints(1000);
final Geometry geom = shapeFactory.newRectangle();
runWKBTest(geom, 2, false);
}
use of com.revolsys.geometry.util.GeometricShapeFactory in project com.revolsys.open by revolsys.
the class TestPerfDistanceGeomPair method newCircles.
Geometry[] newCircles(final int nPts) {
final GeometricShapeFactory gsf = new GeometricShapeFactory();
gsf.setCentre(new PointDoubleXY(0, 0));
gsf.setSize(100);
gsf.setNumPoints(nPts);
final Polygon gRect = gsf.newCircle();
gsf.setCentre(new PointDoubleXY(0, this.separationDist));
final Polygon gRect2 = gsf.newCircle();
return new Geometry[] { gRect, gRect2 };
}
use of com.revolsys.geometry.util.GeometricShapeFactory in project com.revolsys.open by revolsys.
the class PreparedPolygonIntersectsStressTest method newTestLine.
LineString newTestLine(final Point base, final double size, final int nPts) {
final GeometricShapeFactory gsf = new GeometricShapeFactory();
gsf.setCentre(base);
gsf.setSize(size);
gsf.setNumPoints(nPts);
final Geometry circle = gsf.newCircle();
// System.out.println(circle);
return (LineString) circle.getBoundary();
}
Aggregations