org.deegree.geometry.standard.primitive
Class DefaultLineString

java.lang.Object
  extended by org.deegree.geometry.standard.AbstractDefaultGeometry
      extended by org.deegree.geometry.standard.primitive.DefaultCurve
          extended by org.deegree.geometry.standard.primitive.DefaultLineString
All Implemented Interfaces:
GMLObject, Object, TypedObjectNode, Geometry, Curve, GeometricPrimitive, LineString

public class DefaultLineString
extends DefaultCurve
implements LineString

Default implementation of LineString.

Version:
$Revision: 31649 $, $Date: 2011-08-25 01:03:49 +0200 (Thu, 25 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
 
Field Summary
 
Fields inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
crs, env, id, jtsFactory, jtsGeometry, pm
 
Constructor Summary
DefaultLineString(String id, ICRS crs, PrecisionModel pm, Points controlPoints)
           
 
Method Summary
protected  com.vividsolutions.jts.geom.LineString buildJTSGeometry()
           
 LineString getAsLineString()
          Returns a linear interpolated representation of the curve.
 Points getControlPoints()
          Convenience method for accessing the control points of linear interpolated curves.
 int getCoordinateDimension()
          Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in.
 Curve.CurveType getCurveType()
          Returns the type of curve.
 boolean isSFSCompliant()
          Returns whether this geometry complies with the Simple Feature Specification (SFS).
 
Methods inherited from class org.deegree.geometry.standard.primitive.DefaultCurve
getBoundary, getCurveSegments, getEndPoint, getGeometryType, getLength, getPrimitiveType, getStartPoint, isClosed
 
Methods inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
contains, createFromJTS, crosses, equals, getAsDefaultGeometry, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getDifference, getDistance, getEnvelope, getGMLProperties, getId, getIntersection, getJTSGeometry, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, toString, touches
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deegree.geometry.primitive.Curve
getBoundary, getCurveSegments, getEndPoint, getLength, getPrimitiveType, getStartPoint, isClosed
 
Methods inherited from interface org.deegree.geometry.primitive.GeometricPrimitive
getGeometryType
 
Methods inherited from interface org.deegree.geometry.Geometry
contains, crosses, equals, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getDifference, getDistance, getEnvelope, getId, getIntersection, getPrecision, getUnion, intersects, isBeyond, isDisjoint, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, touches
 
Methods inherited from interface org.deegree.commons.tom.gml.GMLObject
getGMLProperties
 

Constructor Detail

DefaultLineString

public DefaultLineString(String id,
                         ICRS crs,
                         PrecisionModel pm,
                         Points controlPoints)
Parameters:
id -
crs -
pm -
controlPoints -
Method Detail

getCurveType

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

Specified by:
getCurveType in interface Curve
Specified by:
getCurveType in interface LineString
Overrides:
getCurveType in class DefaultCurve
Returns:
the type of curve

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
Overrides:
getControlPoints in class DefaultCurve
Returns:
the control points

getCoordinateDimension

public int getCoordinateDimension()
Description copied from interface: Geometry
Returns the coordinate dimension, i.e. the dimension of the space that the geometry is embedded in.

Specified by:
getCoordinateDimension in interface Geometry
Overrides:
getCoordinateDimension in class DefaultCurve
Returns:
the coordinate dimension

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
Overrides:
getAsLineString in class DefaultCurve
Returns:
curve as a linestring

isSFSCompliant

public boolean isSFSCompliant()
Description copied from interface: Geometry
Returns whether this geometry complies with the Simple Feature Specification (SFS).

Specified by:
isSFSCompliant in interface Geometry
Overrides:
isSFSCompliant in class AbstractDefaultGeometry
Returns:
true, if this geometry complies with the SFS, false otherwise

buildJTSGeometry

protected com.vividsolutions.jts.geom.LineString buildJTSGeometry()
Overrides:
buildJTSGeometry in class DefaultCurve


Copyright © 2011. All Rights Reserved.