use of eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint in project hale by halestudio.
the class GridInterpolationTest method test90Deegrees.
@Test
public void test90Deegrees() throws IOException {
ArcByCenterPoint arc = new ArcByCenterPointImpl(new Coordinate(0, 0), Math.sqrt(2.0), Angle.fromDegrees(45), Angle.fromDegrees(135), false);
gridInterpolationTest(arc, 0.1, false);
}
use of eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint in project hale by halestudio.
the class GridInterpolationTest method testOffsetBig.
@Test
public void testOffsetBig() throws IOException {
ArcByCenterPoint arc = new ArcByCenterPointImpl(new Coordinate(2, 2), 15.0, Angle.fromDegrees(45), Angle.fromDegrees(135), true);
gridInterpolationTest(arc, 0.1, false);
}
use of eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint in project hale by halestudio.
the class GridInterpolationTest method testHalfCircleAllGrid.
@Test
public void testHalfCircleAllGrid() throws IOException {
ArcByCenterPoint arc = new ArcByCenterPointImpl(new Coordinate(0.5, 0.5), 0.95, Angle.fromDegrees(0), Angle.fromDegrees(180), true);
gridInterpolationTest(arc, 0.1, true);
}
use of eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint in project hale by halestudio.
the class GridInterpolationTest method testOffsetCircle.
@Test
public void testOffsetCircle() throws IOException {
ArcByCenterPoint arc = new ArcByCenterPointImpl(new Coordinate(2, 2), 5.0, Angle.fromDegrees(0), Angle.fromDegrees(0), true);
gridInterpolationTest(arc, 0.1, false);
}
use of eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint in project hale by halestudio.
the class ArcByCenterPointImplTest method testCW2.
@Test
public void testCW2() throws IOException {
ArcByCenterPoint arc = new ArcByCenterPointImpl(new Coordinate(0, 0), Math.sqrt(2.0), Angle.fromDegrees(45), Angle.fromDegrees(135), true);
drawArcWithMarkers(arc);
assertEquals(-270.0, arc.getAngleBetween().getDegrees(), 1e-10);
assertFalse(arc.isCircle());
assertFalse(InterpolationUtil.isStraightLine(arc));
ArcByPoints converted = arc.toArcByPoints();
assertEqualsCoord(new Coordinate(1, 1), converted.getStartPoint());
assertEqualsCoord(new Coordinate(0, -Math.sqrt(2.0)), converted.getMiddlePoint());
assertEqualsCoord(new Coordinate(-1, 1), converted.getEndPoint());
}
Aggregations