com.esri.arcgis.geometry
Interface IMSegmentation

All Superinterfaces:
IMCollection, Serializable
All Known Subinterfaces:
IMSegmentation2, IMSegmentation3, IMSegmentation4
All Known Implementing Classes:
Polygon, Polyline

public interface IMSegmentation
extends IMCollection, Serializable

Provides access to members for defining an M-based linear coordinate system on a polyline or polygon.

Superseded By

IMSegmentation3

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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

See Also:
IPoint.getM(), IMSegmentation, IMSegmentation2, IMCollection, IMAware

Method Summary
 void calculateNonSimpleMs()
          Redefines the non-simple Ms to be values obtained from interpolation of surrounding defined Ms, or extrapolation of Ms.
 void extrapolateMs(int extrapolationStyle, int fromPart, int fromPoint, int toPart, int toPoint)
          Extrapolates the Ms at one or both ends of the geometry based on the M interval between the fromIndex and the toIndex.
 Object getDistancesAtM(boolean asRatio, double m)
          Returns an array of distances along the polyline at which is located the specified M.
 int getMMonotonic()
          A value indicating whether Ms are monotonic, and if so, whether they are ascending or descending.
 Object getMsAtDistance(double distance, boolean asRatio)
          Returns M values at the distance along the geometry.
 IGeometryCollection getPointsAtM(double m, double lateralOffset)
          Returns a multipoint geometry corresponding to the locations along the geometry where the specified M occurs.
 IGeometryCollection getSubcurveBetweenMs(double fromM, double toM)
          Returns a polyline geometry corresponding to the subcurve(s) between the fromM and the toM.
 void insertMAtDistance(double m, double distance, boolean asRatio, boolean createPart, boolean[] splitHappened, int[] newPartIndex, int[] newSegmentIndex)
          Sets the M value at the given distance along the geometry; creates a point at that distance if no point exists there.
 void interpolateMsBetween(int fromPart, int fromPoint, int toPart, int toPoint)
          Generates Ms by linear interpolation of segment distances for all vertices in the range [start+1, end-1].
 void reverseMsOrder()
          Reverses the order of the Ms along the geometry.
 void setAndInterpolateMsBetween(double fromM, double toM)
          Sets the Ms at the beginning and the end of the geometry and interpolates the M values between these values.
 void setMsAsDistance(boolean asRatio)
          Sets the M values to the cumulative length from the origin of the geometry.
 
Methods inherited from interface com.esri.arcgis.geometry.IMCollection
getMMax, getMMin, multiplyMs, offsetMs
 

Method Detail

getMMonotonic

int getMMonotonic()
                  throws IOException,
                         AutomationException
A value indicating whether Ms are monotonic, and if so, whether they are ascending or descending.

Description

Returns an esriMMonotonicEnum indicating whether or not the Ms are monotonic as well as whether they are ascending or descending. The Ms are esriMAscending if the Ms are ordered such that M1 < M2 < M3 < . . . < Mn. The Ms are esriMDescending if the Ms are ordered such that M1 > M2 > M3 > . . . > Mn.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.geometry.esriMMonotonicEnum constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getMsAtDistance

Object getMsAtDistance(double distance,
                       boolean asRatio)
                       throws IOException,
                              AutomationException
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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
distance - The distance (in)
asRatio - The asRatio (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

insertMAtDistance

void insertMAtDistance(double m,
                       double distance,
                       boolean asRatio,
                       boolean createPart,
                       boolean[] splitHappened,
                       int[] newPartIndex,
                       int[] newSegmentIndex)
                       throws IOException,
                              AutomationException
Sets the M value at the given distance along the geometry; creates a point at that distance if no point exists there.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
m - The m (in)
distance - The distance (in)
asRatio - The asRatio (in)
createPart - The createPart (in)
splitHappened - The splitHappened (out: use single element array)
newPartIndex - The newPartIndex (out: use single element array)
newSegmentIndex - The newSegmentIndex (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDistancesAtM

Object getDistancesAtM(boolean asRatio,
                       double m)
                       throws IOException,
                              AutomationException
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.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
asRatio - The asRatio (in)
m - The m (in)
Returns:
A Variant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

reverseMsOrder

void reverseMsOrder()
                    throws IOException,
                           AutomationException
Reverses the order of the Ms along the geometry.

Remarks

Note that the m values are simply reversed. Any length:measure ratios that were present before ReverseMsOrder is called are not preserved.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

interpolateMsBetween

void interpolateMsBetween(int fromPart,
                          int fromPoint,
                          int toPart,
                          int toPoint)
                          throws IOException,
                                 AutomationException
Generates Ms by linear interpolation of segment distances for all vertices in the range [start+1, end-1].

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
fromPart - The fromPart (in)
fromPoint - The fromPoint (in)
toPart - The toPart (in)
toPoint - The toPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setAndInterpolateMsBetween

void setAndInterpolateMsBetween(double fromM,
                                double toM)
                                throws IOException,
                                       AutomationException
Sets the Ms at the beginning and the end of the geometry and interpolates the M values between these values.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
fromM - The fromM (in)
toM - The toM (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setMsAsDistance

void setMsAsDistance(boolean asRatio)
                     throws IOException,
                            AutomationException
Sets the M values to the cumulative length from the origin of the geometry.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
asRatio - The asRatio (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IMSegmentation2.setMsAsDistance2(com.esri.arcgis.geometry.IPoint, double, double, boolean)

extrapolateMs

void extrapolateMs(int extrapolationStyle,
                   int fromPart,
                   int fromPoint,
                   int toPart,
                   int toPoint)
                   throws IOException,
                          AutomationException
Extrapolates the Ms at one or both ends of the geometry based on the M interval between the fromIndex and the toIndex.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
extrapolationStyle - A com.esri.arcgis.geometry.esriExtrapolationEnum constant (in)
fromPart - The fromPart (in)
fromPoint - The fromPoint (in)
toPart - The toPart (in)
toPoint - The toPoint (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

calculateNonSimpleMs

void calculateNonSimpleMs()
                          throws IOException,
                                 AutomationException
Redefines the non-simple Ms to be values obtained from interpolation of surrounding defined Ms, or extrapolation of Ms.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getPointsAtM

IGeometryCollection getPointsAtM(double m,
                                 double lateralOffset)
                                 throws IOException,
                                        AutomationException
Returns a multipoint geometry corresponding to the locations along the geometry where the specified M occurs.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
m - The m (in)
lateralOffset - The lateralOffset (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometryCollection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSubcurveBetweenMs

IGeometryCollection getSubcurveBetweenMs(double fromM,
                                         double toM)
                                         throws IOException,
                                                AutomationException
Returns a polyline geometry corresponding to the subcurve(s) between the fromM and the toM.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Parameters:
fromM - The fromM (in)
toM - The toM (in)
Returns:
A reference to a com.esri.arcgis.geometry.IGeometryCollection
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.
See Also:
IMSegmentation2.getSubcurveBetweenMsEx(double, double, int[], int[])