Search in sources :

Example 31 with ArcByCenterPoint

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

the class ArcGridSegment method getFirstPart.

@Override
public ArcSegment getFirstPart() {
    ArcByCenterPoint byCenter = arc.toArcByCenterPoint();
    Angle middleAngle = Angle.fromRadians(byCenter.getStartAngle().getRadians() + 0.5 * byCenter.getAngleBetween().getRadians());
    Arc part = new ArcByCenterPointImpl(byCenter.getCenterPoint(), byCenter.getRadius(), byCenter.getStartAngle(), middleAngle, byCenter.isClockwise());
    // match the parent segment's
    return new FixedStartEndGridSegment(part, true, gridSize, getStartPoint(), getMiddlePoint());
}
Also used : ArcByCenterPoint(eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint) Arc(eu.esdihumboldt.util.geometry.interpolation.model.Arc) Angle(eu.esdihumboldt.util.geometry.interpolation.model.Angle) ArcByCenterPointImpl(eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl)

Example 32 with ArcByCenterPoint

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

the class ArcGridSegment method getSecondPart.

@Override
public ArcSegment getSecondPart() {
    ArcByCenterPoint byCenter = arc.toArcByCenterPoint();
    Angle middleAngle = Angle.fromRadians(byCenter.getStartAngle().getRadians() + 0.5 * byCenter.getAngleBetween().getRadians());
    Arc part = new ArcByCenterPointImpl(byCenter.getCenterPoint(), byCenter.getRadius(), middleAngle, byCenter.getEndAngle(), byCenter.isClockwise());
    // match the parent segment's
    return new FixedStartEndGridSegment(part, true, gridSize, getMiddlePoint(), getEndPoint());
}
Also used : ArcByCenterPoint(eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint) Arc(eu.esdihumboldt.util.geometry.interpolation.model.Arc) Angle(eu.esdihumboldt.util.geometry.interpolation.model.Angle) ArcByCenterPointImpl(eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl)

Example 33 with ArcByCenterPoint

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

the class ArcSplitSegment method getSecondPart.

@Override
public ArcSegment getSecondPart() {
    ArcByCenterPoint byCenter = arc.toArcByCenterPoint();
    Angle middleAngle = Angle.fromRadians(byCenter.getStartAngle().getRadians() + 0.5 * byCenter.getAngleBetween().getRadians());
    Arc part = new ArcByCenterPointImpl(byCenter.getCenterPoint(), byCenter.getRadius(), middleAngle, byCenter.getEndAngle(), byCenter.isClockwise());
    return new FixedStartEndSplitSegment(part, maxPositionalError, getMiddlePoint(), getEndPoint());
}
Also used : ArcByCenterPoint(eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint) Arc(eu.esdihumboldt.util.geometry.interpolation.model.Arc) Angle(eu.esdihumboldt.util.geometry.interpolation.model.Angle) ArcByCenterPointImpl(eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl)

Example 34 with ArcByCenterPoint

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

the class ArcSplitSegment method getFirstPart.

@Override
public ArcSegment getFirstPart() {
    ArcByCenterPoint byCenter = arc.toArcByCenterPoint();
    Angle middleAngle = Angle.fromRadians(byCenter.getStartAngle().getRadians() + 0.5 * byCenter.getAngleBetween().getRadians());
    Arc part = new ArcByCenterPointImpl(byCenter.getCenterPoint(), byCenter.getRadius(), byCenter.getStartAngle(), middleAngle, byCenter.isClockwise());
    return new FixedStartEndSplitSegment(part, maxPositionalError, getStartPoint(), getMiddlePoint());
}
Also used : ArcByCenterPoint(eu.esdihumboldt.util.geometry.interpolation.model.ArcByCenterPoint) Arc(eu.esdihumboldt.util.geometry.interpolation.model.Arc) Angle(eu.esdihumboldt.util.geometry.interpolation.model.Angle) ArcByCenterPointImpl(eu.esdihumboldt.util.geometry.interpolation.model.impl.ArcByCenterPointImpl)

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