org.deegree.geometry.refs
Class CurveReference<T extends Curve>

java.lang.Object
  extended by org.deegree.commons.tom.Reference<T>
      extended by org.deegree.commons.tom.gml.GMLReference<T>
          extended by org.deegree.geometry.refs.GeometryReference<T>
              extended by org.deegree.geometry.refs.GeometricPrimitiveReference<T>
                  extended by org.deegree.geometry.refs.CurveReference<T>
Type Parameters:
T -
All Implemented Interfaces:
GMLObject, Object, TypedObjectNode, Geometry, Curve, GeometricPrimitive
Direct Known Subclasses:
LineStringReference

public class CurveReference<T extends Curve>
extends GeometricPrimitiveReference<T>
implements Curve

The class TODO add class documentation here.

Version:
$Revision: 31641 $, $Date: 2011-08-24 21:24:55 +0200 (Wed, 24 Aug 2011) $
Author:
Markus Schneider, last edited by: $Author: mschneider $

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.deegree.geometry.primitive.Curve
Curve.CurveType
 
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
 
Constructor Summary
CurveReference(GMLReferenceResolver resolver, String uri, String baseURL)
          Creates a new CurveReference instance.
 
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()
          Returns the type of primitive.
 Point getStartPoint()
          Returns the start point of the curve.
 boolean isClosed()
          Returns whether the curve forms a closed loop.
 
Methods inherited from class org.deegree.geometry.refs.GeometricPrimitiveReference
getGeometryType
 
Methods inherited from class org.deegree.geometry.refs.GeometryReference
contains, crosses, equals, getBuffer, getCentroid, getConvexHull, getCoordinateDimension, getCoordinateSystem, getDifference, getDistance, getEnvelope, getGMLProperties, getIntersection, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isSFSCompliant, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, touches
 
Methods inherited from class org.deegree.commons.tom.Reference
getId, getReferencedObject, getURI, isLocal, isResolved, resolve
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
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
 

Constructor Detail

CurveReference

public CurveReference(GMLReferenceResolver resolver,
                      String uri,
                      String baseURL)
Creates a new CurveReference instance.

Parameters:
resolver - used for resolving the reference, must not be null
uri - the geometry's uri, must not be null
baseURL - base URL for resolving the uri, may be null (no resolving of relative URLs)
Method Detail

getAsLineString

public LineString getAsLineString()
Description copied from interface: Curve
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.

Specified by:
getAsLineString in interface Curve
Returns:
curve as a linestring

getBoundary

public Pair<Point,Point> getBoundary()
Description copied from interface: Curve
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.

Specified by:
getBoundary in interface Curve
Returns:
boundary of a curve. If a curve does not have a boundary because it is closed an empty List shall be retruned

getControlPoints

public Points getControlPoints()
Description copied from interface: Curve
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.

Specified by:
getControlPoints in interface Curve
Returns:
the control points

getCurveSegments

public List<CurveSegment> getCurveSegments()
Description copied from interface: Curve
Returns the segments that constitute this curve.

Specified by:
getCurveSegments in interface Curve
Returns:
the segments that constitute this curve

getCurveType

public Curve.CurveType getCurveType()
Description copied from interface: Curve
Returns the type of curve.

Specified by:
getCurveType in interface Curve
Returns:
the type of curve

getEndPoint

public Point getEndPoint()
Description copied from interface: Curve
Returns the end point of the curve.

Specified by:
getEndPoint in interface Curve
Returns:
the end point of the curve

getLength

public Measure getLength(Unit requestedUnit)
Specified by:
getLength in interface Curve
Returns:
length of the curve

getPrimitiveType

public GeometricPrimitive.PrimitiveType getPrimitiveType()
Description copied from interface: GeometricPrimitive
Returns the type of primitive.

Specified by:
getPrimitiveType in interface Curve
Specified by:
getPrimitiveType in interface GeometricPrimitive
Overrides:
getPrimitiveType in class GeometricPrimitiveReference<T extends Curve>
Returns:
the type of primitive

getStartPoint

public Point getStartPoint()
Description copied from interface: Curve
Returns the start point of the curve.

Specified by:
getStartPoint in interface Curve
Returns:
the start point of the curve

isClosed

public boolean isClosed()
Description copied from interface: Curve
Returns whether the curve forms a closed loop.

Specified by:
isClosed in interface Curve
Returns:
true, if the curve forms a closed loop, false otherwise


Copyright © 2011. All Rights Reserved.