Interface IMSegmentation
Provides access to members for defining an M-based linear coordinate system on a polyline or polygon.
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("FD5E17EC-D717-11D2-9F34-00C04F6BDF06")]
public interface IMSegmentation : IMCollection
Remarks
The IMSegmentation interface provides methods designed to work with the dynamic segmentation functionality in ArcObjects. The CalculateNonSimpleMs method will interpolate or extrapolate missing (NaN) measure values, based on the existing values. Use the ExtrapolateMs or InterpolateMsBetween methods to set m attributes for only the specified vertices of a PolyLine. InsertMAtDistance will update a single vertex's m attribute, or if the specified distance does not fall on a vertex, a new vertex will be inserted into the PolyLine at that location.
IMSegmentation also provides methods to query a measured PolyLine, based on its m attributes. For example GetSubCurveBetweenMs and GetPointsAtM can be used to find geometries along a measured PolyLine. Note that if the m attributes do not monotonically increase along the line (check the MMonotonic property), the result of GetSubcurveBetweenMs may have more than one part or the result of GetPointsAtM will have more than one point.
The CalculateNonSimpleMs, SetAndInterpolateMsBetween, and SetMsAsDistance methods all ensure a PolyLine is MSimple.
Properties
MMax
double MMax { get; }
Property Value
MMin
double MMin { get; }
Property Value
MMonotonic
A value indicating whether Ms are monotonic, and if so, whether they are ascending or descending.
esriMMonotonicEnum MMonotonic { get; }
Property Value
Methods
CalculateNonSimpleMs()
Redefines the non-simple Ms to be values obtained from interpolation of surrounding defined Ms, or extrapolation of Ms.
void CalculateNonSimpleMs()
ExtrapolateMs(esriExtrapolationEnum, int, int, int, int)
Extrapolates the Ms at one or both ends of the geometry based on the M interval between the fromIndex and the toIndex.
void ExtrapolateMs(esriExtrapolationEnum extrapolationStyle, int fromPart, int FromPoint, int toPart, int ToPoint)
Parameters
extrapolationStyleesriExtrapolationEnumfromPartintFromPointinttoPartintToPointint
GetDistancesAtM(bool, double)
Returns an array of distances along the polyline at which is located the specified M. If the geometry's M's are monotonic along the geometry then the array will only have one element.
object GetDistancesAtM(bool asRatio, double M)
Parameters
Returns
GetMsAtDistance(double, bool)
Returns M values at the distance along the geometry. An array of one or two Ms is returned. Two Ms can be returned if the given distance is exactly at the beginning or ending of a part.
object GetMsAtDistance(double distance, bool asRatio)
Parameters
Returns
GetPointsAtM(double, double)
Returns a multipoint geometry corresponding to the locations along the geometry where the specified M occurs.
IGeometryCollection GetPointsAtM(double M, double lateralOffset)
Parameters
Returns
GetSubcurveBetweenMs(double, double)
Returns a polyline geometry corresponding to the subcurve(s) between the fromM and the toM.
IGeometryCollection GetSubcurveBetweenMs(double fromM, double toM)
Parameters
Returns
InsertMAtDistance(double, double, bool, bool, out bool, out int, out int)
Sets the M value at the given distance along the geometry; creates a point at that distance if no point exists there.
void InsertMAtDistance(double M, double distance, bool asRatio, bool createPart, out bool SplitHappened, out int newPartIndex, out int newSegmentIndex)
Parameters
MdoubledistancedoubleasRatioboolcreatePartboolSplitHappenedboolnewPartIndexintnewSegmentIndexint
InterpolateMsBetween(int, int, int, int)
Generates Ms by linear interpolation of segment distances for all vertices in the range [start+1, end-1].
void InterpolateMsBetween(int fromPart, int FromPoint, int toPart, int ToPoint)
Parameters
MultiplyMs(double)
void MultiplyMs(double factor)
Parameters
factordouble
OffsetMs(double)
void OffsetMs(double Offset)
Parameters
Offsetdouble
ReverseMsOrder()
Reverses the order of the Ms along the geometry.
void ReverseMsOrder()
Remarks
Note that the m values are simply reversed. Any length:measure ratios that were present before ReverseMsOrder is called are not preserved.
SetAndInterpolateMsBetween(double, double)
Sets the Ms at the beginning and the end of the geometry and interpolates the M values between these values.
void SetAndInterpolateMsBetween(double fromM, double toM)
Parameters
SetMsAsDistance(bool)
Sets the M values to the cumulative length from the origin of the geometry.
void SetMsAsDistance(bool asRatio)
Parameters
asRatiobool