public interface ICurveSegment extends IGeometry
ICurveSegment is an ordered sequence of control points and the rule for
interpolating a curve along the control points from the first to the last.
By policy, instances of classes that implement this interface cannot be
empty and must contain at least a start position and an end position. Specific
implementations of this interface could require that instances have more than
two control points.| Modifier and Type | Method and Description |
|---|---|
ILineString |
asLineString()
Returns an
ILineString that approximates this ICurveSegment. |
ILineString |
asLineString(Length maxSpacing,
Length maxOffset)
Returns an
ILineString that approximates this ICurveSegment. |
com.mapinfo.midev.geometry.DirectPosition |
getControlPoint(int i,
com.mapinfo.midev.geometry.DirectPosition dp)
Returns the specified control point as a
DirectPosition and fills in the specified DirectPosition. |
int |
getControlPointCount()
Returns the number of control points in this
ICurveSegment. |
IDirectPositionIterator |
getControlPointIterator()
Returns an
IDirectPositionIterator that allows iterating over this ICurveSegment's control points. |
IDirectPositionList |
getControlPoints()
Returns the control points of this
ICurveSegment as an IDirectPositionList. |
ICurveSegment |
getCopy()
Get a (permanent) copy of this
IGeometry. |
ICurveSegment |
getCopy(CoordSys crs)
Get a (permanent) copy of this
IGeometry transformed to the
given coordinate system. |
Length |
getEndDistance(ComputationType ct)
Returns the distance corresponding to the last direct position of this generic curve.
|
com.mapinfo.midev.geometry.DirectPosition |
getEndPosition()
Returns the last position of the curve.
|
CurveInterpolationType |
getInterpolationType()
Returns the interpolation rule used for this segment.
|
Length |
getLength(ComputationType ct)
Returns the length of this
ICurveSegment using the specified ComputationType. |
com.mapinfo.midev.geometry.DirectPosition |
getPointForDistance(Length len)
Returns the
DirectPosition that lies at the specified distance along this curve. |
Length |
getStartDistance(ComputationType ct)
Returns the distance corresponding to the first direct position of this generic curve.
|
com.mapinfo.midev.geometry.DirectPosition |
getStartPosition()
Returns the first position of the curve.
|
boolean |
isClosed()
Returns
true if this ICurveSegment is a closed or not (i.e. |
boolean |
isLinear()
Returns
true if this ICurveSegment consists entirely of straight lines; false if not. |
ICurveSegment |
reverse()
Returns an
ICurveSegment that has the opposite orientation as this ICurveSegment. |
contains, getArea, getCoordSys, getDimension, getEnvelope, getPerimeter, getSpatialInfo, getType, isEmpty, isTransient, mAllSet, mSet, zAllSet, zSetcom.mapinfo.midev.geometry.DirectPosition getStartPosition()
com.mapinfo.midev.geometry.DirectPosition getEndPosition()
boolean isLinear()
true if this ICurveSegment consists entirely of straight lines; false if not.true if this ICurveSegment consists entirely of straight lines; false if not.Length getStartDistance(ComputationType ct)
ICurve or IRing is always 0.0.
However, the start distance for any ICurveSegment contained in an ICurve or IRing
is always the distance along that ICurve or IRing where it's first direct position lies.
The start distance for a stand alone ICurveSegment that is not part of an
ICurve or IRing is always 0.0.
For any generic curve:
pointForDistance(startDistance(ct)) == first direct position endDistance(ct) - startDistance(ct) == getLength() or getPerimeter()
ct - ComputationType to use for the distance calculationInvalidComputationTypeException - if the given computation type is incompatible with the
coordinate system of this geometryLength getEndDistance(ComputationType ct)
ICurve or IRing is always the same value as that returned by
ICurve.getLength(ComputationType) or
IGeometry.getPerimeter(ComputationType) respectively.
However, the end distance for any ICurveSegment contained in an ICurve or IRing
is always the distance along that ICurve or IRing where it's last direct position lies.
The end distance for a stand alone ICurveSegment that is not part of an
ICurve or IRing is always the same as it's length.
For any generic curve:
pointForDistance(endDistance(ct)) == last direct position endDistance(ct) - startDistance(ct) == getLength() or getPerimeter()
ct - ComputationType to use for the distance calculationInvalidComputationTypeException - if the given computation type is incompatible with the
coordinate system of this geometrycom.mapinfo.midev.geometry.DirectPosition getPointForDistance(Length len)
DirectPosition that lies at the specified distance along this curve.len - length along this generic curve to return the point.
Value must be inclusively between the values
returned by ICurveSegment.getStartDistance(ComputationType) and ICurveSegment.getEndDistance(ComputationType)DirectPosition that lies at the specified distance along this curve.InvalidComputationTypeException - if the computation type of the length is incompatible with the
coordinate system of the geometry or if the value of len is not inclusively between the values
returned by ICurveSegment.getStartDistance(ComputationType) and ICurveSegment.getEndDistance(com.mapinfo.midev.unit.ComputationType)int getControlPointCount()
ICurveSegment.
This method will always return a value of at least two since all
implementations of this interface must have, at a minimum, a start
position and an end position.ICurveSegment.CurveInterpolationType getInterpolationType()
com.mapinfo.midev.geometry.DirectPosition getControlPoint(int i,
com.mapinfo.midev.geometry.DirectPosition dp)
DirectPosition and fills in the specified DirectPosition.i - zero based index of the control point to return.dp - direct position to contain the values, cannot be null.DirectPosition.IDirectPositionIterator getControlPointIterator()
IDirectPositionIterator that allows iterating over this ICurveSegment's control points.IDirectPositionIterator that allows iterating over this ICurveSegment's control points.boolean isClosed()
true if this ICurveSegment is a closed or not (i.e. last control point == first
control point); false if not.true if this ICurveSegment is a closed or not (i.e. last control point == first
control point); false if not.ICurveSegment reverse()
ICurveSegment that has the opposite orientation as this ICurveSegment.ICurveSegment that has the opposite orientation as this ICurveSegment.IDirectPositionList getControlPoints()
ICurveSegment as an IDirectPositionList.ICurveSegment as an IDirectPositionList.ICurveSegment getCopy()
IGeometryIGeometry.getCopy in interface IGeometryIGeometry.IGeometry.getCopy(CoordSys),
IGeometry.isTransient()ICurveSegment getCopy(CoordSys crs)
IGeometryIGeometry transformed to the
given coordinate system.getCopy in interface IGeometrycrs - coordinate system of the returned copyIGeometry in the given coordinate systemIGeometry.isTransient()Length getLength(ComputationType ct)
ICurveSegment using the specified ComputationType.ct - the preferred computation model.ICurveSegment using the specified ComputationType.InvalidComputationTypeException - if the given computation type is incompatible with the
coordinate system of this geometryILineString asLineString()
ILineString that approximates this ICurveSegment.ILineString that approximates this ICurveSegment.ILineString asLineString(Length maxSpacing, Length maxOffset)
ILineString that approximates this ICurveSegment.
Approximates the ICurveSegment as a single ILineString. The first position of the
second and subsequent segments of this curve are omitted because they would be x/y equal
to the end position of the previous segment.
maxSpacing - the maximum distance between points in the constructed
ILineString. A maxSpacing of zero means "no limit".maxOffset - the maximum deviation of the constructed ILineString from this
curve. A maxOffset of zero means "no limit".ILineString that approximates this ICurveSegment.