org.deegree.geometry.primitive
Interface Curve

All Superinterfaces:
GeometricPrimitive, Geometry, GMLObject, Object, TypedObjectNode
All Known Subinterfaces:
CompositeCurve, LinearRing, LineString, OrientableCurve, Ring
All Known Implementing Classes:
CurveReference, DefaultCompositeCurve, DefaultCurve, DefaultLinearRing, DefaultLineString, DefaultOrientableCurve, DefaultRing, LineStringReference

public interface Curve
extends GeometricPrimitive

Curve instances are 1D-geometries that consist of a number of curve segments.

Author:
Andreas Poth, last edited by: $Author: mschneider $
See Also:
CompositeCurve, LineString, OrientableCurve, Ring

Nested Class Summary
static class Curve.CurveType
          Convenience enum type for discriminating the different curve variants.
 
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.GeometricPrimitive
GeometricPrimitive.PrimitiveType
 
Nested classes/interfaces inherited from interface org.deegree.geometry.Geometry
Geometry.GeometryType
 
Method Summary
 LineString getAsLineString()
          Returns a linear interpolated representation of the curve.
 Pair<Point,Point> getBoundary()
          The boundary of a curve is the set of points at either end of the curve.
 Points getControlPoints()
          Convenience method for accessing the control points of linear interpolated curves.
 List<CurveSegment> getCurveSegments()
          Returns the segments that constitute this curve.
 Curve.CurveType getCurveType()
          Returns the type of curve.
 Point getEndPoint()
          Returns the end point of the curve.
 Measure getLength(Unit requestedUnit)
           
 GeometricPrimitive.PrimitiveType getPrimitiveType()
          Must always return GeometricPrimitive.PrimitiveType.Curve.
 Point getStartPoint()
          Returns the start point of the curve.
 boolean isClosed()
          Returns whether the curve forms a closed loop.
 
Methods inherited from interface org.deegree.geometry.primitive.GeometricPrimitive
getGeometryType
 
Methods inherited from interface org.deegree.geometry.Geometry
contains, crosses, equals, getBuffer, getCentroid, getConvexHull, getCoordinateDimension, getCoordinateSystem, getDifference, getDistance, getEnvelope, getId, getIntersection, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isSFSCompliant, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, touches
 
Methods inherited from interface org.deegree.commons.tom.gml.GMLObject
getGMLProperties
 

Method Detail

getPrimitiveType

GeometricPrimitive.PrimitiveType getPrimitiveType()
Must always return GeometricPrimitive.PrimitiveType.Curve.

Specified by:
getPrimitiveType in interface GeometricPrimitive
Returns:
GeometricPrimitive.PrimitiveType.Curve

getCurveType

Curve.CurveType getCurveType()
Returns the type of curve.

Returns:
the type of curve

isClosed

boolean isClosed()
Returns whether the curve forms a closed loop.

Returns:
true, if the curve forms a closed loop, false otherwise

getLength

Measure getLength(Unit requestedUnit)
Parameters:
requestedUnit -
Returns:
length of the curve

getBoundary

Pair<Point,Point> getBoundary()
The boundary of a curve is the set of points at either end of the curve. If the curve is a cycle, the two ends are identical, and the curve (if topologically closed) is considered to not have a boundary.

Returns:
boundary of a curve. If a curve does not have a boundary because it is closed an empty List shall be retruned

getStartPoint

Point getStartPoint()
Returns the start point of the curve.

Returns:
the start point of the curve

getEndPoint

Point getEndPoint()
Returns the end point of the curve.

Returns:
the end point of the curve

getCurveSegments

List<CurveSegment> getCurveSegments()
Returns the segments that constitute this curve.

Returns:
the segments that constitute this curve

getControlPoints

Points getControlPoints()
Convenience method for accessing the control points of linear interpolated curves.

NOTE: This method is only safe to use when the curve is a LineString or LinearRing or it only consists of LineStringSegments. In any other case it will fail.

Returns:
the control points
Throws:
IllegalArgumentException - if the curve is not linear interpolated

getAsLineString

LineString getAsLineString()
Returns a linear interpolated representation of the curve.

NOTE: This method is only safe to use when the curve is a LineString or LinearRing or it only consists of LineStringSegments. In any other case it will fail.

Returns:
curve as a linestring
Throws:
IllegalArgumentException - if the curve is not linear interpolated


Copyright © 2011. All Rights Reserved.