public interface IRing extends IGeometry, Iterable<ICurveSegment>
IRing is a list of consecutively connected ICurveSegments where the last position is
exactly equal to the first position.
By policy, instances of classes that implement this interface cannot be
empty, must be closed and must contain at least one ICurveSegment.| Modifier and Type | Method and Description |
|---|---|
ILineString |
asLineString()
Returns an
ILineString that approximates this IRing. |
ILineString |
asLineString(Length maxSpacing,
Length maxOffset)
Returns a linear approximation of this
IRing as a single ILineString. |
IRing |
getCopy()
Get a (permanent) copy of this
IGeometry. |
IRing |
getCopy(CoordSys crs)
Get a (permanent) copy of this
IGeometry transformed to the
given coordinate system. |
ICurveSegment |
getCurveSegment(int i)
Returns the
ICurveSegment at the specified index. |
int |
getCurveSegmentCount()
Returns the number of
ICurveSegments that this IRing contains. |
Length |
getEndDistance(ComputationType ct)
Returns the distance corresponding to the last direct position of this
IRing. |
com.mapinfo.midev.geometry.DirectPosition |
getEndPosition()
Return the last position of the IRing.
|
com.mapinfo.midev.geometry.DirectPosition |
getPointForDistance(Length len)
Returns the
DirectPosition that lies at the specified distance along this IRing. |
Length |
getStartDistance(ComputationType ct)
Returns the distance corresponding to the first direct position of this
IRing. |
com.mapinfo.midev.geometry.DirectPosition |
getStartPosition()
Return the first position of the IRing.
|
boolean |
isLinear()
Return
true if this IRing is linear; false if not. |
IRing |
reverse()
Returns a new
IRing that has the opposite orientation of this IRing. |
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 IRing is linear; false if not. An IRing is
linear if all the contained ICurveSegments are of type CurveInterpolationType.LINEAR.true if this IRing is linear; false if not.Length getStartDistance(ComputationType ct)
IRing.
The start distance for any IRing is always 0.0. However, the start distance for any
ICurveSegment contained in an IRing is always the distance along that IRing
where it's first direct position lies. The start distance for a stand alone ICurveSegment that is not
part of an IRing is always 0.0.
For any IRing:
pointForDistance(startDistance(ct)) == first direct position endDistance(ct) - startDistance(ct) == getLength() or getPerimeter()
ct - ComputationType to use for the distance calculationIRing.Length getEndDistance(ComputationType ct)
IRing.
The end distance for any IRing is always the same value as that returned by
IGeometry.getPerimeter(ComputationType) respectively. However, the end distance for any
ICurveSegment contained in an IRing is always the distance along that IRing
where it's last direct position lies. The end distance for a stand alone ICurveSegment that is not
part of an IRing is always the same as it's length.
For any IGenericCurve:
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 IRing.len - length along this IRing to return the point. Value must be inclusively between the values
returned by IRing.getStartDistance(ComputationType) and IRing.getEndDistance(ComputationType)DirectPosition that lies at the specified distance along this IRing.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 IRing.getStartDistance(ComputationType) and IRing.getEndDistance(ComputationType)int getCurveSegmentCount()
ICurveSegments that this IRing contains.ICurveSegments that this IRing contains.ICurveSegment getCurveSegment(int i)
ICurveSegment at the specified index.i - zero-based index of ICurveSegment to return.IRing 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()IRing getCopy()
IGeometryIGeometry.getCopy in interface IGeometryIGeometry.IGeometry.getCopy(CoordSys),
IGeometry.isTransient()IRing reverse()
IRing that has the opposite orientation of this IRing.IRing that has the opposite orientation of this IRing.ILineString asLineString()
ILineString that approximates this IRing.ILineString that approximates this IRing.ILineString asLineString(Length maxSpacing, Length maxOffset)
IRing 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.
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
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".IRing as a single ILineString.