Interface IMCollection
Provides access to members that control operations on M-aware multipoints, polylines, polygons and multipatches.
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("01FAFF20-5191-11D2-92F6-0000F875171D")]
public interface IMCollection
Remarks
IMCollection supports operations performed on a collection of geometry objects that have M values. For IMCollection operations to be performed, the object must be MAware and have non-NaN Ms.
Properties
MMax
The maximum M value.
double MMax { get; }
Property Value
MMin
The minimum M value.
double MMin { get; }
Property Value
Methods
MultiplyMs(double)
Multiplies all the M values by a factor.
void MultiplyMs(double factor)
Parameters
factordouble
Remarks
The MultiplyMs method will update all the measure attributes for a PolyLine, and should only be used if every measure has been set (i.e. there are no NaNs). Check the IMAware::MSimple property or use the IMSegmentation methods to fill in any missing measure values. MultiplyMs is analogous to scaling spatial coordinates.
public IPolyline MultiplyMs(IPolyline polyline, double factor)
{
//Offset (add) the M values on a PolyLine by a factor
IMAware mAware = polyline as IMAware;
IMCollection mCollection = mAware as IMCollection;
if (mAware.MAware)
{
mCollection.MultiplyMs(factor);
return mCollection as IPolyline;
}
else
{
return null;
}
}
OffsetMs(double)
Offsets all the M values by an offset value.
void OffsetMs(double Offset)
Parameters
Offsetdouble
Remarks
The OffsetMs method will update all the measure attributes for a PolyLine, and should only be used if every measure has been set (i.e. there are no NaNs). Check the IMAware::MSimple property or use the IMSegmentation methods to fill in any missing measure values. OffsetMs is analgous to moving spatial coordinates.
public IPolyline OffsetMs(IPolyline polyline, double offset)
{
//Offset (add) the M values on a PolyLine by a factor
IMAware mAware = polyline as IMAware;
IMCollection mCollection = mAware as IMCollection;
if (mAware.MAware)
{
mCollection.OffsetMs(offset);
return mCollection as IPolyline;
}
else
{
return null;
}
}