public interface ICurve extends IGeometry, Iterable<ICurveSegment>
ICurve is an ordered, connected, sequence of ICurveSegment.
By policy, instances of classes that implement this interface cannot be empty and must contain at least a one
ICurveSegment.| Modifier and Type | Method and Description |
|---|---|
ILineString |
asLineString()
Return an
ILineString that approximates this curve. |
ILineString |
asLineString(Length maxSpacing,
Length maxOffset)
Approximates the curve as a single
ILineString. |
ICurve |
getCopy()
Get a (permanent) copy of this
IGeometry. |
ICurve |
getCopy(CoordSys crs)
Get a (permanent) copy of this
IGeometry transformed to the
given coordinate system. |
ICurveSegment |
getCurveSegment(int i)
Return the specified
ICurveSegment from this ICurve. |
int |
getCurveSegmentCount()
Returns the number of segments making up this curve.
|
Length |
getEndDistance(ComputationType ct)
Returns the distance corresponding to the last
IDirectPosition of this generic curve. |
com.mapinfo.midev.geometry.DirectPosition |
getEndPosition()
Returns the last position of the curve.
|
Length |
getLength(ComputationType ct)
Returns the total length of this geometry using the given
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
IDirectPosition of this generic curve. |
com.mapinfo.midev.geometry.DirectPosition |
getStartPosition()
Returns the first position of the curve.
|
boolean |
isClosed()
Return
true if this ICurve forms a cycle; false if not. |
boolean |
isLinear()
Returns
true if this ICurve contains only straight lines; false if not. |
ICurve |
reverse()
Create a new curve, defining the same set of direct positions, but with
the opposite orientation.
|
contains, getArea, getCoordSys, getDimension, getEnvelope, getPerimeter, getSpatialInfo, getType, isEmpty, isTransient, mAllSet, mSet, zAllSet, zSetforEach, iterator, spliteratorcom.mapinfo.midev.geometry.DirectPosition getStartPosition()
com.mapinfo.midev.geometry.DirectPosition getEndPosition()
boolean isLinear()
true if this ICurve contains only straight lines; false if not.true if this ICurve contains only straight lines; false if not.Length getStartDistance(ComputationType ct)
IDirectPosition of this generic curve.
The start distance for any 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 calculationIDirectPosition of this generic curve.InvalidGeometryOperationException - if the given computation type is incompatible with the
coordinate system of this geometryLength getEndDistance(ComputationType ct)
IDirectPosition of this generic curve.
The end distance for any ICurve or IRing is always the same value as that returned by
ICurve.getLength(ComputationType) or
IGeometry.getPerimeter(com.mapinfo.midev.unit.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 calculationIDirectPosition of this generic curve.InvalidComputationTypeException - 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 ICurve to return the point.
Value must be inclusively between the values
returned by ICurve.getStartDistance(ComputationType) and ICurve.getEndDistance(com.mapinfo.midev.unit.ComputationType)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 ICurve.getStartDistance(com.mapinfo.midev.unit.ComputationType) and ICurve.getEndDistance(ComputationType)boolean isClosed()
true if this ICurve forms a cycle; false if not.true if the last position of this ICurve
is equal to the first position; false if geometry is empty or
first and last position are not equal. Considers x,y.IRingint getCurveSegmentCount()
ICurveSegment getCurveSegment(int i)
ICurveSegment from this ICurve.i - zero-based index of segment to return.ICurve 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()ICurve getCopy()
IGeometryIGeometry.getCopy in interface IGeometryIGeometry.IGeometry.getCopy(CoordSys),
IGeometry.isTransient()ICurve reverse()
ICurve whose start position and end position are reversed from
this segment.Length getLength(ComputationType ct)
ComputationType.
The total length is the sum of the lengths of all the constituent parts of the geometry. It is possible for the
total length to be zero if the geometry is degenerate and all its points are co-incident.
The length of an empty geometry is 0.ct - the preferred computation model.InvalidComputationTypeException - if the given computation type is incompatible with the
coordinate system of this geometryILineString asLineString()
ILineString that approximates this curve.ILineString approximating this curve.ILineString asLineString(Length maxSpacing, Length maxOffset)
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.
Regardless of parameters, the control points of all the curve segments are
always included (except the first position of all but the first segment,
as explained above). If both parameters are zero, then only the control
points are returned.maxSpacing - the maximum distance between points in the constructed
LineString. A maxSpacing of zero means "no limit".maxOffset - the maximum deviation of the constructed LineString from this
curve. A maxOffset of zero means "no limit".ILineString approximating this curve.