|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.geometry.linearization.CurveLinearizer
public class CurveLinearizer
Provides methods for the linearization of Curves and CurveSegments.
Currently, the following CurveSegment variants are handled correctly:
ArcCircleCubicSplineLineStringSegment (trivial)
| Constructor Summary | |
|---|---|
CurveLinearizer(GeometryFactory geomFac)
|
|
| Method Summary | |
|---|---|
static boolean |
areCollinear(Point p0,
Point p1,
Point p2)
Tests if the given three points are collinear. |
Curve |
linearize(Curve curve,
LinearizationCriterion crit)
Returns a linearized version of the given Curve geometry. |
LineStringSegment |
linearize(CurveSegment segment,
LinearizationCriterion crit)
Returns a linearized version (i.e. a LineStringSegment) of the given CurveSegment. |
LineStringSegment |
linearizeArc(Arc arc,
LinearizationCriterion crit)
Returns a linearized version (i.e. a LineStringSegment) of the given Arc. |
LineStringSegment |
linearizeCubicSpline(CubicSpline spline,
LinearizationCriterion crit)
Returns a linearized version (i.e. a LineStringSegment) of the given CubicSpline. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CurveLinearizer(GeometryFactory geomFac)
geomFac - | Method Detail |
|---|
public Curve linearize(Curve curve,
LinearizationCriterion crit)
Curve geometry.
NOTE: This method respects the semantic difference between Curve and Ring geometries: if the
input is a Ring, a ring geometry will be returned.
curve - crit -
public LineStringSegment linearize(CurveSegment segment,
LinearizationCriterion crit)
LineStringSegment) of the given CurveSegment.
segment - the segment to be linearizedcrit - determines the interpolation quality / number of interpolation points
public LineStringSegment linearizeArc(Arc arc,
LinearizationCriterion crit)
LineStringSegment) of the given Arc.
If the three control points p0, p1 and p2 of the arc are collinear, i.e.
on a straight line, the behaviour depends on the type of Arc:
arc - curve segment to be linearizedcrit - determines the interpolation quality / number of interpolation points
public LineStringSegment linearizeCubicSpline(CubicSpline spline,
LinearizationCriterion crit)
LineStringSegment) of the given CubicSpline.
A cubic spline consists of n polynomials of degree 3: Sj(x) = aj + bj*(x-xj) + cj*(x-xj)2 + dj*(x-xj)3; that acts upon the interval [xj,xj+1], 0 <=j< n.
The algorithm for generating points on a spline defined with only control points and starting/ending tangents can be found at http://persson.berkeley.edu/128A/lec14-2x3.pdf (last visited 19/08/09)
spline - curve segment to be linearizedcrit - determines the interpolation quality / number of interpolation points
public static boolean areCollinear(Point p0,
Point p1,
Point p2)
NOTE: Only this method should be used throughout the whole linearization process for testing collinearity to avoid inconsistent results (the necessary EPSILON would differ).
p0 - p1 - p2 -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||