org.deegree.geometry.standard.primitive
Class DefaultLinearRing

java.lang.Object
  extended by org.deegree.geometry.standard.AbstractDefaultGeometry
      extended by org.deegree.geometry.standard.primitive.DefaultRing
          extended by org.deegree.geometry.standard.primitive.DefaultLinearRing
All Implemented Interfaces:
GMLObject, Object, TypedObjectNode, Geometry, Curve, GeometricPrimitive, LinearRing, Ring

public class DefaultLinearRing
extends DefaultRing
implements LinearRing

Default implementation of Ring.

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.Ring
Ring.RingType
 
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.primitive.DefaultRing
members, segments
 
Fields inherited from class org.deegree.geometry.standard.AbstractDefaultGeometry
crs, env, id, jtsFactory, jtsGeometry, pm
 
Constructor Summary
DefaultLinearRing(String id, ICRS crs, PrecisionModel pm, Points controlPoints)
          Creates a new DefaultLinearRing instance from the given parameters.
 
Method Summary
protected  com.vividsolutions.jts.geom.LinearRing 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()
          Must always return Curve.CurveType.Ring.
 Ring.RingType getRingType()
          Returns the type of ring.
 
Methods inherited from class org.deegree.geometry.standard.primitive.DefaultRing
getBoundary, getCurveSegments, getEndPoint, getGeometryType, getLength, getMembers, 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, isSFSCompliant, 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.Ring
getMembers
 
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, isSFSCompliant, isWithin, isWithinDistance, overlaps, setCoordinateSystem, setGMLProperties, setId, setPrecision, touches
 
Methods inherited from interface org.deegree.commons.tom.gml.GMLObject
getGMLProperties
 

Constructor Detail

DefaultLinearRing

public DefaultLinearRing(String id,
                         ICRS crs,
                         PrecisionModel pm,
                         Points controlPoints)
Creates a new DefaultLinearRing instance from the given parameters.

Parameters:
id - identifier, may be null
crs - coordinate reference system, may be null
pm - precision model, may be null
controlPoints -
Method Detail

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 DefaultRing
Returns:
the coordinate dimension

getCurveType

public Curve.CurveType getCurveType()
Description copied from interface: Ring
Must always return Curve.CurveType.Ring.

Specified by:
getCurveType in interface Curve
Specified by:
getCurveType in interface Ring
Overrides:
getCurveType in class DefaultRing
Returns:
Curve.CurveType.Ring

getRingType

public Ring.RingType getRingType()
Description copied from interface: Ring
Returns the type of ring.

Specified by:
getRingType in interface LinearRing
Specified by:
getRingType in interface Ring
Overrides:
getRingType in class DefaultRing
Returns:
the type of ring

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 DefaultRing
Returns:
curve as a linestring

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 DefaultRing
Returns:
the control points

buildJTSGeometry

protected com.vividsolutions.jts.geom.LinearRing buildJTSGeometry()
Overrides:
buildJTSGeometry in class DefaultRing


Copyright © 2011. All Rights Reserved.