|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree_impl.model.geometry.GM_Object_Impl
org.deegree_impl.model.geometry.GM_Primitive_Impl
org.deegree_impl.model.geometry.GM_OrientablePrimitive_Impl
org.deegree_impl.model.geometry.GM_OrientableCurve_Impl
org.deegree_impl.model.geometry.GM_Curve_Impl
default implementation of the GM_Curve interface from package jago.model. ------------------------------------------------------------
Field Summary | |
protected char |
orientation
|
protected java.util.ArrayList |
segments
|
private static long |
serialVersionUID
Use serialVersionUID for interoperability. |
Fields inherited from class org.deegree_impl.model.geometry.GM_Object_Impl |
boundary, centroid, convexHull, crs, empty, envelope, mute, valid |
Constructor Summary | |
GM_Curve_Impl(char orientation,
GM_CurveSegment[] segments)
initialize the curve by submitting a spatial reference system, an array of curve segments and the orientation of the curve |
|
GM_Curve_Impl(GM_CurveSegment[] segments)
initialize the curve by submitting a spatial reference system and an array of curve segments. the orientation of the curve is '+' |
Method Summary | |
void |
addCurveSegment(GM_CurveSegment segment)
adds a segment at the end of the curve |
private void |
calculateBoundary()
calculates the boundary of the Curve |
private void |
calculateCentroid()
calculates the centroid of the Curve |
private void |
calculateEnvelope()
calculates the envelope of the Curve |
protected void |
calculateParam()
recalculates internal parameters |
java.lang.Object |
clone()
returns a shallow copy of the geometry |
void |
deleteCurveSegmentAt(int index)
deletes the segment at the submitted index |
boolean |
equals(java.lang.Object other)
checks if this curve is completly equal to the submitted geometry |
GM_LineString |
getAsLineString()
returns the curve as GM_LineString. if there isn't a curve segment within the curve null will be returned |
int |
getCoordinateDimension()
The operation "coordinateDimension" shall return the dimension of the coordinates that define this GM_Object, which must be the same as the coordinate dimension of the coordinate reference system for this GM_Object. |
GM_CurveBoundary |
getCurveBoundary()
returns the boundary of the curve |
GM_CurveSegment |
getCurveSegmentAt(int index)
returns the curve segment at the submitted index |
int |
getDimension()
The operation "dimension" shall return the inherent dimension of this GM_Object, which shall be less than or equal to the coordinate dimension. |
GM_Point |
getEndPoint()
returns the last point of the curve.if the curve doesn't contain a segment or the last segment doesn't contain a point null will be returned |
double |
getLength()
returns the length of the curve in units of the related spatial reference system |
int |
getNumberOfCurveSegments()
returns the number of segments building the curve |
char |
getOrientation()
returns the orientation of a curve |
GM_Point |
getStartPoint()
returns the first point of the curve. if the curve doesn't contain a segment or the first segment doesn't contain a point null will be returned |
void |
insertCurveSegmentAt(GM_CurveSegment segment,
int index)
inserts a segment in the curve at the submitted position. all points with a position that equals index or is higher will be shifted |
boolean |
intersects(GM_Object gmo)
The Boolean valued operation "intersects" shall return TRUE if this GM_Object intersects another GM_Object. |
boolean |
isEmpty()
returns true if no segment is within the curve |
void |
setCurveSegmentAt(GM_CurveSegment segment,
int index)
writes a segment to the curve at submitted position. the old point will be deleted |
void |
setOrientation(char orientation)
sets the curves orientation |
java.lang.String |
toString()
|
void |
translate(double[] d)
translate each point of the curve with the values of the submitted double array. |
Methods inherited from class org.deegree_impl.model.geometry.GM_Object_Impl |
contains, contains, difference, distance, getBoundary, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getEnvelope, intersection, isValid, isWithinDistance, setCoordinateSystem, setEmpty, setValid, union |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.deegree.model.geometry.GM_OrientablePrimitive |
getOrientation, setOrientation |
Methods inherited from interface org.deegree.model.geometry.GM_Object |
contains, contains, difference, distance, getBoundary, getBuffer, getCentroid, getConvexHull, getCoordinateSystem, getEnvelope, intersection, isWithinDistance, union |
Field Detail |
private static final long serialVersionUID
protected java.util.ArrayList segments
protected char orientation
Constructor Detail |
public GM_Curve_Impl(GM_CurveSegment[] segments) throws GM_Exception
segments
- array of GM_CurveSegmentpublic GM_Curve_Impl(char orientation, GM_CurveSegment[] segments) throws GM_Exception
segments
- array of GM_CurveSegmentorientation
- of the curveMethod Detail |
private void calculateEnvelope()
private void calculateBoundary()
private void calculateCentroid()
protected void calculateParam()
GM_Object_Impl
calculateParam
in class GM_Object_Impl
public GM_CurveBoundary getCurveBoundary()
getCurveBoundary
in interface GM_OrientableCurve
public int getDimension()
getDimension
in interface GM_Object
public int getCoordinateDimension()
getCoordinateDimension
in interface GM_Object
public boolean intersects(GM_Object gmo)
intersects
in interface GM_Object
intersects
in class GM_Object_Impl
gmo
- the GM_Object to intersect with
public double getLength()
getLength
in interface GM_GenericCurve
public int getNumberOfCurveSegments()
getNumberOfCurveSegments
in interface GM_Curve
public GM_Point getStartPoint()
getStartPoint
in interface GM_GenericCurve
public GM_Point getEndPoint()
getEndPoint
in interface GM_GenericCurve
public GM_LineString getAsLineString() throws GM_Exception
getAsLineString
in interface GM_GenericCurve
GM_Exception
public GM_CurveSegment getCurveSegmentAt(int index) throws GM_Exception
getCurveSegmentAt
in interface GM_Curve
index
- index of the curve segment that should be returned
GM_Exception
- a exception will be thrown if index is smaller
than '0' or larger than getNumberOfCurveSegments()-1public void setCurveSegmentAt(GM_CurveSegment segment, int index) throws GM_Exception
setCurveSegmentAt
in interface GM_Curve
segment
- curve segment that should be setindex
- index where to set the curve segment
GM_Exception
- a exception will be thrown if index is smaller
than '0' or larger than getNumberOfCurveSegments()-1 or
or the starting point of the submitted curve segment isn't equal to
the ending point of segment at index-1 and/or the ending
point of the submitted segment isn't equals to the curve segment at
index+1public void insertCurveSegmentAt(GM_CurveSegment segment, int index) throws GM_Exception
insertCurveSegmentAt
in interface GM_Curve
segment
- curve segment that should be insertedindex
- index where to insert the curve segment
GM_Exception
- a exception will be thrown if index is smaller
than '0' or larger than getNumberOfCurveSegments()-1 or
or the starting point of the submitted curve segment isn't equal to
the ending point of segment at index-1 and/or the ending
point of the submitted segment isn't equals to the curve segment at
index+1public void addCurveSegment(GM_CurveSegment segment) throws GM_Exception
addCurveSegment
in interface GM_Curve
segment
- curve segment that should be set
GM_Exception
- a exception will be thrown if the starting point of the submitted
curve segment isn't equal to the ending point of the last segment.public void deleteCurveSegmentAt(int index) throws GM_Exception
deleteCurveSegmentAt
in interface GM_Curve
index
- index of the curve segement that should be removed
from the curve.
GM_Exception
- will be thrown if index is smaller '0' or
larger getNumberOfCurveSegments()-1public boolean isEmpty()
isEmpty
in interface GM_Object
isEmpty
in class GM_Object_Impl
public void translate(double[] d)
translate
in interface GM_Object
translate
in class GM_Object_Impl
public boolean equals(java.lang.Object other)
equals
in class GM_Object_Impl
other
- object to compare to
public java.lang.Object clone()
clone
in class GM_Object_Impl
public java.lang.String toString()
toString
in class GM_Object_Impl
public char getOrientation()
getOrientation
in interface GM_OrientablePrimitive
public void setOrientation(char orientation) throws GM_Exception
setOrientation
in interface GM_OrientablePrimitive
orientation
- orientation of the curve ('+'|'-')
GM_Exception
- will be thrown if orientation is invalid
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |