Search in sources :

Example 11 with ArcByCenterPoint

use of eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint in project hale by halestudio.

the class SplitInterpolationTest method testLarge.

@Test
public void testLarge() throws IOException {
    ArcByCenterPoint arc = new ArcByCenterPointImpl(new Coordinate(0, 0), 50.0, Angle.fromDegrees(45), Angle.fromDegrees(135), true);
    splitInterpolationTest(arc, 0.1);
}
Also used : ArcByCenterPoint(eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint) Coordinate(com.vividsolutions.jts.geom.Coordinate) ArcByCenterPointImpl(eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl) AbstractArcTest(eu.esdihumboldt.util.geometry.interpolation.AbstractArcTest) Test(org.junit.Test)

Example 12 with ArcByCenterPoint

use of eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint in project hale by halestudio.

the class SplitInterpolationTest method testHalfCircle.

@Test
public void testHalfCircle() throws IOException {
    ArcByCenterPoint arc = new ArcByCenterPointImpl(new Coordinate(0, 0), 1.0, Angle.fromDegrees(0), Angle.fromDegrees(180), true);
    splitInterpolationTest(arc, 0.1);
}
Also used : ArcByCenterPoint(eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint) Coordinate(com.vividsolutions.jts.geom.Coordinate) ArcByCenterPointImpl(eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl) AbstractArcTest(eu.esdihumboldt.util.geometry.interpolation.AbstractArcTest) Test(org.junit.Test)

Example 13 with ArcByCenterPoint

use of eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint in project hale by halestudio.

the class SplitInterpolationTest 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);
    splitInterpolationTest(arc, 0.1);
}
Also used : ArcByCenterPoint(eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint) Coordinate(com.vividsolutions.jts.geom.Coordinate) ArcByCenterPointImpl(eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl) AbstractArcTest(eu.esdihumboldt.util.geometry.interpolation.AbstractArcTest) Test(org.junit.Test)

Example 14 with ArcByCenterPoint

use of eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint in project hale by halestudio.

the class CurveGeometryTest method init.

// XXX different segments need different count of coordinates
// XXX missing Clothoid handler
@Override
public void init() {
    super.init();
    Coordinate[] coordinates = new Coordinate[] { new Coordinate(0.01, 3.2), new Coordinate(3.33, 3.33), new Coordinate(0.01, -3.2) };
    lineStringReference = geomFactory.createLineString(coordinates);
    lineStringChecker = combine(noCoordinatePairs(), referenceChecker(lineStringReference));
    lineStringGridChecker = combine(referenceChecker(lineStringReference, InterpolationHelper.DEFAULT_MAX_POSITION_ERROR), gridConfig.geometryChecker());
    ArcByCenterPoint cbp = new ArcByPointsImpl(new Coordinate(0.01, 3.2), new Coordinate(3.33, 3.33), new Coordinate(0.01, -3.2)).toArcByCenterPoint();
    circleByPoints = new ArcByCenterPointImpl(cbp.getCenterPoint(), cbp.getRadius(), Angle.fromDegrees(0), Angle.fromDegrees(0), false);
}
Also used : ArcByPointsImpl(eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByPointsImpl) ArcByCenterPoint(eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint) Coordinate(com.vividsolutions.jts.geom.Coordinate) ArcByCenterPointImpl(eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl)

Example 15 with ArcByCenterPoint

use of eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint in project hale by halestudio.

the class GridInterpolationTest method testLarge.

@Test
public void testLarge() throws IOException {
    ArcByCenterPoint arc = new ArcByCenterPointImpl(new Coordinate(0, 0), 50.0, Angle.fromDegrees(45), Angle.fromDegrees(135), true);
    gridInterpolationTest(arc, 0.1, false);
}
Also used : ArcByCenterPoint(eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint) Coordinate(com.vividsolutions.jts.geom.Coordinate) ArcByCenterPointImpl(eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl) AbstractArcTest(eu.esdihumboldt.util.geometry.interpolation.AbstractArcTest) Test(org.junit.Test)

Aggregations

ArcByCenterPoint (eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint)34 Coordinate (com.vividsolutions.jts.geom.Coordinate)28 AbstractArcTest (eu.esdihumboldt.util.geometry.interpolation.AbstractArcTest)25 Test (org.junit.Test)25 ArcByCenterPointImpl (eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl)18 ArcByPoints (eu.esdihumboldt.util.geometry.interpolation.model.ArcByPoints)15 Arc (eu.esdihumboldt.util.geometry.interpolation.model.Arc)6 Angle (eu.esdihumboldt.util.geometry.interpolation.model.Angle)4 ArcByPointsImpl (eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByPointsImpl)3 LineString (com.vividsolutions.jts.geom.LineString)1 DefaultGeometryProperty (eu.esdihumboldt.hale.common.instance.geometry.DefaultGeometryProperty)1 GeometryNotSupportedException (eu.esdihumboldt.hale.io.gml.geometry.GeometryNotSupportedException)1 InterpolationAlgorithm (eu.esdihumboldt.util.geometry.interpolation.InterpolationAlgorithm)1 Arc2D (java.awt.geom.Arc2D)1