Class PathClass
[ClassInterface(ClassInterfaceType.None)]
[Guid("30707211-52D5-11D0-A8F2-00608C85EDE5")]
public class PathClass : Path, IPointCollection4, IPointCollection3, IPointCollection2, IPointCollection, ISegmentCollection, IPath, ICurve, IGeometry, IConstructPath, ISupportErrorInfo, IClone, ITransform2D, ITransform3D, IXMLSerialize
- Inheritance
-
PathClass
- Implements
- Inherited Members
Constructors
PathClass()
public PathClass()
Explicit Interface Implementations
AddPoint(IPoint, ref object, ref object)
Adds a vertex to a Path, Ring, Polyline, or Polygon; or adds a reference to the input point to a Multipoint, TriangleFan, or TriangleStrip.
virtual void AddPoint(IPoint inPoint, ref object before, ref object after)
Parameters
AddPointCollection(IPointCollection)
Adds copies of points in the input point collection to this Path, Ring, Polyline, or Polygon; or adds references to the points in the collection to this Multipoint, TriangleFan, or TriangleStrip.
virtual void AddPointCollection(IPointCollection newPoints)
Parameters
newPointsIPointCollection
AddPoints(int, ref IPoint)
Adds copies of the input points as vertices to this Path, Ring, Polyline, or Polygon; or references to the input points to this Multipoint, TriangleFan, or TriangleStrip. This method is intended for internal use only.
virtual void AddPoints(int Count, ref IPoint newPoints)
Parameters
AddSegment(ISegment, ref object, ref object)
Adds a reference to the input segment at the end, or before or after a specified index.
virtual void AddSegment(ISegment inSegment, ref object before, ref object after)
Parameters
AddSegmentCollection(ISegmentCollection)
Adds references to the segments from the specified segment collection.
virtual void AddSegmentCollection(ISegmentCollection segments)
Parameters
segmentsISegmentCollection
Remarks
AddSegmentCollection add the other geometry to the last part of the current geometry.
For example, adding a polyline (with one part) to another polyline (with one part)
is adding the second polyline segments into the first part of the other polyline
even if the polylines are disjoint.
AddSegments(int, ref ISegment)
Adds references to segments. This method is intended for internal use only.
virtual void AddSegments(int Count, ref ISegment newSegments)
Parameters
Remarks
Note: the array must contains only ISegment pointers, otherwise it night crash the application.
When using C# you must use the IGeometryBridge interface to call this method.
When using VBNET you must use the IGeometryBridge interface to call this method.
AddWKSPointZs(int, ref WKSPointZ)
Adds vertices/points to this Path, Ring, Polyline, Polygon, Multipoint, TriangleFan, Triangles, TriangleStrip, or MultiPatch.
virtual void AddWKSPointZs(int Count, ref WKSPointZ pointStructures)
Parameters
AddWKSPoints(int, ref WKSPoint)
Adds vertices to this Path, Ring, Polyline, or Polygon, or adds new points to this Multipoint, TriangleFan, or TriangleStrip.
virtual void AddWKSPoints(int Count, ref WKSPoint pointStructures)
Parameters
Assign(IClone)
Assigns the properties of src to the receiver.
virtual void Assign(IClone src)
Parameters
srcIClone
Clone()
Clones the receiver and assigns the result to *clone.
virtual IClone Clone()
Returns
ConstructRigidStretch(IPath, int, int, int, IPoint)
Constructs a scaled, rotated version of srcPath. The point at stretchStartIndex will end up at stretchEnd. The points at startAnchor and endAnchor will remain unchanged. Others will be scaled and rotate proportionately.
virtual void ConstructRigidStretch(IPath srcPath, int stretchStartIndex, int startAnchor, int endAnchor, IPoint stretchEnd)
Parameters
Remarks
Parameters description:
srcPath: Input IPath object. The path to be stretched.
stretchStartIndex: Input Long that represents the index of the origin point on the path to be stretched.
startAnchor: Input Long that represents the start anchor. Typically 0 to represent the first point on the path.
endAnchor: Input Long that represents the end anchor. Typically pointcount-1 to represent the last point on the path.
stretchEnd: Input IPoint object. The destination point where the strecthStartIndex point will be moved.
public void ConstructRigidStretch_Example()
{
//Create the source path
IPath sourcePath = new PathClass();
IPointCollection pointCollection = sourcePath as IPointCollection;
IPoint[] points = new IPoint[5];
for (int i = 0; i < 5; i++)
{
points[i] = new PointClass();
}
points[0].PutCoords(0, 0);
points[1].PutCoords(10, 5);
points[2].PutCoords(20, 20);
points[3].PutCoords(30, 35);
points[4].PutCoords(40, 40);
//helper class to solve C-Style Array usage in COM classes IGeometryBridge geometryBride = new GeometryEnvironmentClass(); geometryBride.AddPoints(pointCollection as IPointCollection4, ref points); //Strecth the whole path by specifying 0 and the last point index
//as the start and end anchors
//The stretch start index is 1, which means that the path will be
//stretched by moving the second point of the path to the stretched point location
int originOfStretch = 1;
int startAnchor = 0;
int endAnchor = pointCollection.PointCount - 1;
//The stretchEnd point is the destination point where the point corresponding to
//originOfStretch index will end up
IPoint stretchEnd = new PointClass();
stretchEnd.PutCoords(10, 30);
//Create a new stretched path
IConstructPath constructionPath = new PathClass();
constructionPath.ConstructRigidStretch(sourcePath, originOfStretch, startAnchor, endAnchor, stretchEnd);
}
'This example demonstrates how to use the ConstructRigidStretch method
Sub ConstructRigidStretch_Example()
Dim pSrcPath As IPath, pPointColl As IPointCollection
Dim pPoints(4) As IPoint, i As Long
Dim pConstPath As IConstructPath, lOriginOfStretch As Long
Dim lStartAnchor As Long, lEndAnchor As Long
Dim pStretchEnd As IPoint
'Create the source path
pSrcPath = New Path
pPointColl = pSrcPath
For i = 0 To 4
pPoints(i) = New Point
Next
pPoints(0).PutCoords(0, 0)
pPoints(1).PutCoords(10, 5)
pPoints(2).PutCoords(20, 20)
pPoints(3).PutCoords(30, 35)
pPoints(4).PutCoords(40, 40)
pPointColl.AddPoints(5, pPoints(0))
'Create a new stretched path
pConstPath = New Path
'Strecth the whole path by specifying 0 and the last point index
'as the start and end anchors
'The stretch start index is 1, which means that the path will be
'stretched by moving the second point of the path to the stretched point location
lOriginOfStretch = 1 'Origin of the stretch
lStartAnchor = 0
lEndAnchor = pPointColl.PointCount - 1
pStretchEnd = New Point
'The pStretchEnd point is the destination point where the point corresponding to
'lOriginOfStrectch index will end up
pStretchEnd.PutCoords(10, 30)
pConstPath.ConstructRigidStretch(pSrcPath, lOriginOfStretch, lStartAnchor, lEndAnchor, pStretchEnd)
End Sub
Deserialize(IXMLSerializeData)
Deserializes an object from XML.
virtual void Deserialize(IXMLSerializeData data)
Parameters
dataIXMLSerializeData
Dimension
The topological dimension of this geometry.
virtual esriGeometryDimension Dimension { get; }
Returns
Remarks
Note: At 9.0, Multipatches are now considered as two dimensional geometry. esriGeometry3Dimension will be used for an upcoming new geometry type.
-1 esriGeometryNoDimension
1 esriGeometry0Dimension
2 esriGeometry1Dimension
4 esriGeometry2Dimension
5 esriGeometry25Dimension
6 esriGeometry3Dimension

EnumCurve
A new curve enumerator for this segment collection.
virtual IEnumCurve EnumCurve { get; }
Returns
EnumSegments
A new enumerator for this segment collection.
virtual IEnumSegment EnumSegments { get; }
Returns
EnumVertices
A new enumerator for this point collection.
virtual IEnumVertex EnumVertices { get; }
Returns
Envelope
Creates a copy of this geometry's envelope and returns it.
virtual IEnvelope Envelope { get; }
Returns
Examples
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
<img src="./bitmaps/envelope.gif" align=
"baseline"></span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
</p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> <span style=
"COLOR: blue">public</span> <span style="COLOR: blue">static</span>
<span style="COLOR: teal">IGeometry</span>
GetEnvelopeGeometry()</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> {</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> DeltaX = 2.5;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> DeltaY = 2.5;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> DeltaZ = 2.5;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: teal">IPoint</span> centerPoint =
GetPoint();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: teal">IEnvelope</span> envelope = <span style=
"COLOR: blue">new</span> <span style=
"COLOR: teal">EnvelopeClass</span>();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
envelope.XMin = centerPoint.X - DeltaX;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
envelope.XMax = centerPoint.X + DeltaX;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
envelope.YMin = centerPoint.Y - DeltaY;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
envelope.YMax = centerPoint.Y + DeltaY;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
envelope.ZMin = centerPoint.Z - DeltaZ;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
envelope.ZMax = centerPoint.Z + DeltaZ;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
MakeZAware(envelope <span style="COLOR: blue">as</span>
<span style="COLOR: teal">IGeometry</span>);</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">return</span> envelope <span style=
"COLOR: blue">as</span> <span style=
"COLOR: teal">IGeometry</span>;</span></p>
<p class="MsoNormal" style="MARGIN: 0in 0in 10pt"><span style=
"FONT-SIZE: 10pt; LINE-HEIGHT: 115%; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">
<span style=
"mso-spacerun: yes"> </span>
}</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> <span style=
"COLOR: blue">private</span> <span style=
"COLOR: blue">static</span> <span style="COLOR: teal">IPoint</span>
GetPoint()</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> {</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> Min = -10;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> Max = 10;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: teal">Random</span> random = <span style=
"COLOR: blue">new</span> <span style=
"COLOR: teal">Random</span>();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">double</span> x = Min + (Max - Min) *
random.NextDouble();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">double</span> y = Min + (Max - Min) *
random.NextDouble();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">double</span> z = Min + (Max - Min) *
random.NextDouble();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">return</span> ConstructPoint3D(x, y,
z);</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> }</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
private</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
static</span> <span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
ConstructPoint3D(</span><span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">double</span>
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
x,</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
double</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
y,</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
double</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
z)</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span>
{</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point = ConstructPoint2D(x, y);</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span>
point.Z = z;<br>
<br>
<span style=
"mso-spacerun: yes"> </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
return</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span>
}<br>
<br style="mso-special-character: line-break">
<br style="mso-special-character: line-break"></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
private</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
static</span> <span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
ConstructPoint2D(</span><span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">double</span>
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
x,</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
double</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
y)</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span>
{</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point =</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
new</span> <span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
PointClass</span><span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span>
point.PutCoords(x, y);<br>
<span style="mso-spacerun: yes"> </span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
return</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal"><span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span>
}</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> <span style=
"COLOR: blue">private</span> <span style=
"COLOR: blue">static</span> <span style="COLOR: blue">void</span>
MakeZAware(<span style="COLOR: teal">IGeometry</span>
geometry)</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> {</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: teal">IZAware</span> zAware = geometry
<span style="COLOR: blue">as</span> <span style=
"COLOR: teal">IZAware</span>;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
zAware.ZAware = <span style="COLOR: blue">true</span>;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> }</span></p>
Remarks

FromPoint
The 'from' point of the curve.
virtual IPoint FromPoint { get; set; }
Returns
Remarks

Generalize(double)
Generalizes this path using the Douglas-Peucker algorithm.
virtual void Generalize(double maxAllowableOffset)
Parameters
maxAllowableOffsetdouble
Remarks
For a path with non-linear segments, the output curve may contain more vertices than the input curve, but all output segments will be linear.

GeoNormalize()
Shifts longitudes, if need be, into a continuous range of 360 degrees.
virtual void GeoNormalize()
Remarks
GeoNormalizeFromLongitude(double)
Normalizes longitudes into a continuous range containing the longitude. This method is obsolete.
virtual void GeoNormalizeFromLongitude(double Longitude)
Parameters
Longitudedouble
Remarks
GeometryType
The type of this geometry.
virtual esriGeometryType GeometryType { get; }
Returns
Remarks
esriGeometryNull = 0
esriGeometryPoint = 1
esriGeometryMultipoint = 2
esriGeometryPolyline = 3
esriGeometryPolygon = 4
esriGeometryEnvelope = 5
esriGeometryPath = 6
esriGeometryAny = 7
esriGeometryMultiPatch = 9
esriGeometryRing = 11
esriGeometryLine = 13
esriGeometryCircularArc = 14
esriGeometryBezier3Curve = 15
esriGeometryEllipticArc = 16
esriGeometryBag = 17
esriGeometryTriangleStrip = 18
esriGeometryTriangleFan = 19
esriGeometryRay = 20
esriGeometrySphere = 21
GetPoints(int, int, out IPoint)
virtual void GetPoints(int Index, int Count, out IPoint Points)
Parameters
GetSubcurve(double, double, bool, out ICurve)
Extracts a portion of this curve into a new curve.
virtual void GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)
Parameters
Remarks

HasNonLinearSegments(ref bool)
Indicates if this segment collection contains segments other than lines.
virtual void HasNonLinearSegments(ref bool nonLinearSegments)
Parameters
nonLinearSegmentsbool
ICurve_Dimension
virtual esriGeometryDimension ICurve_Dimension { get; }
Returns
ICurve_Envelope
virtual IEnvelope ICurve_Envelope { get; }
Returns
ICurve_GeoNormalize()
virtual void ICurve_GeoNormalize()
ICurve_GeoNormalizeFromLongitude(double)
virtual void ICurve_GeoNormalizeFromLongitude(double Longitude)
Parameters
Longitudedouble
ICurve_GeometryType
virtual esriGeometryType ICurve_GeometryType { get; }
Returns
ICurve_IsEmpty
virtual bool ICurve_IsEmpty { get; }
Returns
ICurve_Project(ISpatialReference)
virtual void ICurve_Project(ISpatialReference newReferenceSystem)
Parameters
newReferenceSystemISpatialReference
ICurve_QueryEnvelope(IEnvelope)
virtual void ICurve_QueryEnvelope(IEnvelope outEnvelope)
Parameters
outEnvelopeIEnvelope
ICurve_SetEmpty()
virtual void ICurve_SetEmpty()
ICurve_SnapToSpatialReference()
virtual void ICurve_SnapToSpatialReference()
ICurve_SpatialReference
virtual ISpatialReference ICurve_SpatialReference { get; set; }
Returns
IPath_Dimension
virtual esriGeometryDimension IPath_Dimension { get; }
Returns
IPath_Envelope
virtual IEnvelope IPath_Envelope { get; }
Returns
IPath_FromPoint
virtual IPoint IPath_FromPoint { get; set; }
Returns
IPath_GeoNormalize()
virtual void IPath_GeoNormalize()
IPath_GeoNormalizeFromLongitude(double)
virtual void IPath_GeoNormalizeFromLongitude(double Longitude)
Parameters
Longitudedouble
IPath_GeometryType
virtual esriGeometryType IPath_GeometryType { get; }
Returns
IPath_GetSubcurve(double, double, bool, out ICurve)
virtual void IPath_GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)
Parameters
IPath_IsClosed
virtual bool IPath_IsClosed { get; }
Returns
IPath_IsEmpty
virtual bool IPath_IsEmpty { get; }
Returns
IPath_Length
virtual double IPath_Length { get; }
Returns
IPath_Project(ISpatialReference)
virtual void IPath_Project(ISpatialReference newReferenceSystem)
Parameters
newReferenceSystemISpatialReference
IPath_QueryEnvelope(IEnvelope)
virtual void IPath_QueryEnvelope(IEnvelope outEnvelope)
Parameters
outEnvelopeIEnvelope
IPath_QueryFromPoint(IPoint)
virtual void IPath_QueryFromPoint(IPoint from)
Parameters
fromIPoint
IPath_QueryNormal(esriSegmentExtension, double, bool, double, ILine)
virtual void IPath_QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)
Parameters
extensionesriSegmentExtensionDistanceAlongCurvedoubleasRatioboolLengthdoublenormalILine
IPath_QueryPoint(esriSegmentExtension, double, bool, IPoint)
virtual void IPath_QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)
Parameters
extensionesriSegmentExtensionDistanceAlongCurvedoubleasRatiobooloutPointIPoint
IPath_QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)
virtual void IPath_QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)
Parameters
extensionesriSegmentExtensioninPointIPointasRatiobooloutPointIPointDistanceAlongCurvedoubledistanceFromCurvedoublebRightSidebool
IPath_QueryTangent(esriSegmentExtension, double, bool, double, ILine)
virtual void IPath_QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)
Parameters
extensionesriSegmentExtensionDistanceAlongCurvedoubleasRatioboolLengthdoubletangentILine
IPath_QueryToPoint(IPoint)
virtual void IPath_QueryToPoint(IPoint to)
Parameters
toIPoint
IPath_ReverseOrientation()
virtual void IPath_ReverseOrientation()
IPath_SetEmpty()
virtual void IPath_SetEmpty()
IPath_SnapToSpatialReference()
virtual void IPath_SnapToSpatialReference()
IPath_SpatialReference
virtual ISpatialReference IPath_SpatialReference { get; set; }
Returns
IPath_ToPoint
virtual IPoint IPath_ToPoint { get; set; }
Returns
IPointCollection4_AddPoint(IPoint, ref object, ref object)
virtual void IPointCollection4_AddPoint(IPoint inPoint, ref object before, ref object after)
Parameters
IPointCollection4_AddPointCollection(IPointCollection)
virtual void IPointCollection4_AddPointCollection(IPointCollection newPoints)
Parameters
newPointsIPointCollection
IPointCollection4_AddPoints(int, ref IPoint)
virtual void IPointCollection4_AddPoints(int Count, ref IPoint newPoints)
Parameters
IPointCollection4_AddWKSPoints(int, ref WKSPoint)
virtual void IPointCollection4_AddWKSPoints(int Count, ref WKSPoint pointStructures)
Parameters
IPointCollection4_EnumVertices
virtual IEnumVertex IPointCollection4_EnumVertices { get; }
Returns
IPointCollection4_InsertPointCollection(int, IPointCollection)
virtual void IPointCollection4_InsertPointCollection(int Index, IPointCollection newPoints)
Parameters
IndexintnewPointsIPointCollection
IPointCollection4_InsertPoints(int, int, ref IPoint)
virtual void IPointCollection4_InsertPoints(int Index, int Count, ref IPoint newPoints)
Parameters
IPointCollection4_InsertWKSPoints(int, int, ref WKSPoint)
virtual void IPointCollection4_InsertWKSPoints(int Index, int Count, ref WKSPoint newPoints)
Parameters
IPointCollection4_Point[int]
virtual IPoint IPointCollection4_Point[int i] { get; }
Parameters
iint
Returns
IPointCollection4_PointCount
virtual int IPointCollection4_PointCount { get; }
Returns
IPointCollection4_QueryPoint(int, IPoint)
virtual void IPointCollection4_QueryPoint(int Index, IPoint Point)
Parameters
IPointCollection4_QueryPoints(int, int, ref IPoint)
virtual void IPointCollection4_QueryPoints(int Index, int Count, ref IPoint Points)
Parameters
IPointCollection4_QueryWKSPoints(int, int, out WKSPoint)
virtual void IPointCollection4_QueryWKSPoints(int Index, int Count, out WKSPoint pointStructures)
Parameters
IPointCollection4_RemovePoints(int, int)
virtual void IPointCollection4_RemovePoints(int Index, int Count)
Parameters
IPointCollection4_ReplacePointCollection(int, int, IPointCollection)
virtual void IPointCollection4_ReplacePointCollection(int Index, int goingAway, IPointCollection newPoints)
Parameters
IndexintgoingAwayintnewPointsIPointCollection
IPointCollection4_ReplacePoints(int, int, int, ref IPoint)
virtual void IPointCollection4_ReplacePoints(int Index, int comingIn, int goingAway, ref IPoint newPoints)
Parameters
IPointCollection4_SetPointCollection(IPointCollection)
virtual void IPointCollection4_SetPointCollection(IPointCollection newPoints)
Parameters
newPointsIPointCollection
IPointCollection4_SetPoints(int, ref IPoint)
virtual void IPointCollection4_SetPoints(int Count, ref IPoint newPoints)
Parameters
IPointCollection4_SetWKSPoints(int, ref WKSPoint)
virtual void IPointCollection4_SetWKSPoints(int Count, ref WKSPoint pointStructures)
Parameters
IPointCollection4_UpdatePoint(int, IPoint)
virtual void IPointCollection4_UpdatePoint(int i, IPoint p)
Parameters
IndexedEnumSegments[IGeometry]
A new indexed segment enumerator for this segment collection.
virtual IEnumSegment IndexedEnumSegments[IGeometry queryGeometry] { get; }
Parameters
queryGeometryIGeometry
Returns
Remarks
Note: In order to have this method returning an indexed segment enumerator the ISpatialIndex::AllowIndexing property must be set to 'true' on the geometry.
IndexedEnumVertices[IGeometry]
virtual IEnumVertex IndexedEnumVertices[IGeometry queryGeometry] { get; }
Parameters
queryGeometryIGeometry
Returns
InsertPointCollection(int, IPointCollection)
Inserts copies of points, from the input point collection, as vertices into this Path, Ring, Polyline, or Polygon; or references to points in the input point collection into this Multipoint, TriangleFan, or TriangleStrip.
virtual void InsertPointCollection(int Index, IPointCollection newPoints)
Parameters
IndexintnewPointsIPointCollection
InsertPoints(int, int, ref IPoint)
Inserts copies of the input points as vertices into a Path, Ring, Polyline, or Polygon; or references to the input points into a Multipoint, TriangleFan, or TriangleStrip. This method is intended for internal use only.
virtual void InsertPoints(int Index, int Count, ref IPoint newPoints)
Parameters
InsertSegmentCollection(int, ISegmentCollection)
Inserts references to the segments in the input collectoin.
virtual void InsertSegmentCollection(int Index, ISegmentCollection newSegments)
Parameters
IndexintnewSegmentsISegmentCollection
InsertSegmentCollectionEx(int, int, int, ISegmentCollection)
Inserts references to some of the segments from the input collection.
virtual void InsertSegmentCollectionEx(int Index, int start, int Count, ISegmentCollection newSegments)
Parameters
IndexintstartintCountintnewSegmentsISegmentCollection
InsertSegments(int, int, ref ISegment)
Inserts references to the input segments. This method is intended for internal use only.
virtual void InsertSegments(int Index, int Count, ref ISegment newSegments)
Parameters
InsertWKSPointZs(int, int, ref WKSPointZ)
Inserts new vertices/points into this Path, Ring, Polyline, Polygon, Multipoint, TriangleFan, Triangles, TriangleStrip, or MultiPatch.
virtual void InsertWKSPointZs(int Index, int Count, ref WKSPointZ newPoints)
Parameters
InsertWKSPoints(int, int, ref WKSPoint)
Inserts new vertices/points into this Path, Ring, Polyline, Polygon, Multipoint, TriangleFan, TriangleStrip, or MultiPatch.
virtual void InsertWKSPoints(int Index, int Count, ref WKSPoint newPoints)
Parameters
InterfaceSupportsErrorInfo(ref Guid)
virtual void InterfaceSupportsErrorInfo(ref Guid riid)
Parameters
riidGuid
IsClosed
Indicates if 'from' and 'to' points (of each part) are identical.
virtual bool IsClosed { get; }
Returns
Remarks
IsClosed may still return TRUE if the curve consists of improperly constructed geometries (ex. non-continuous paths). IsClosed only checks the location of the From and To points of each part, it does not check the internal parts for topological consistency.

IsEmpty
Indicates whether this geometry contains any points.
virtual bool IsEmpty { get; }
Returns
IsEqual(IClone)
Indicates if the receiver and other have the same properties.
virtual bool IsEqual(IClone other)
Parameters
otherIClone
Returns
IsIdentical(IClone)
Indicates if the receiver and other are the same object.
virtual bool IsIdentical(IClone other)
Parameters
otherIClone
Returns
Length
The length of the curve.
virtual double Length { get; }
Returns
Move(double, double)
Moves dx units horizontally and dy units vertically.
virtual void Move(double dx, double dy)
Parameters
Remarks

Move3D(double, double, double)
Moves the object by dx, dy and dz along the x, y, and z axes respectively.
virtual void Move3D(double dx, double dy, double dz)
Parameters
MoveVector(ILine)
Moves a direction and distance v. v can be in a different spatial reference than the geometry being moved.
virtual void MoveVector(ILine v)
Parameters
vILine
Remarks

MoveVector3D(IVector3D)
Moves the object by an offset defined by a 3D vector.
virtual void MoveVector3D(IVector3D v)
Parameters
Point[int]
A copy of the ith vertex of a Path, Ring, Polyline, or Polygon; or a reference to the ith point of a Multipoint, TriangleFan, or TriangleStrip.
virtual IPoint Point[int i] { get; }
Parameters
iint
Returns
Examples
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
<img src="./bitmaps/point.gif" align="baseline"></span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
</p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> <span style=
"COLOR: blue">public</span> <span style="COLOR: blue">static</span>
<span style="COLOR: teal">IGeometry</span>
GetPointGeometry()</span></span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> {</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> Min = -10;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">const</span> <span style=
"COLOR: blue">double</span> Max = 10;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: teal">Random</span> random = <span style=
"COLOR: blue">new</span> <span style=
"COLOR: teal">Random</span>();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">double</span> x = Min + (Max - Min) *
random.NextDouble();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">double</span> y = Min + (Max - Min) *
random.NextDouble();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">double</span> z = Min + (Max - Min) *
random.NextDouble();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
</p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point = ConstructPoint3D(x, y, z);</span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
</p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes">
<span style=
"mso-spacerun: yes"> </span>
MakeZAware(point <span style="COLOR: blue">as</span> <span style=
"COLOR: teal">IGeometry</span>);</span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: blue">return</span> point <span style=
"COLOR: blue">as</span> <span style=
"COLOR: teal">IGeometry</span>;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> }</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"> </span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
private</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
static</span> <span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
ConstructPoint3D(</span><span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">double</span>
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
x,</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
double</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
y,</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
double</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
z)</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span>
{</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point = ConstructPoint2D(x, y);</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span>
point.Z = z;<br>
<br>
<span style=
"mso-spacerun: yes"> </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
return</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span>
}<br>
<br style="mso-special-character: line-break">
<br style="mso-special-character: line-break"></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
private</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
static</span> <span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
ConstructPoint2D(</span><span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">double</span>
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
x,</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
double</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
y)</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span>
{</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
IPoint</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point =</span> <span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
new</span> <span style=
"FONT-SIZE: 10pt; COLOR: teal; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
PointClass</span><span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">();</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span>
point.PutCoords(x, y);<br>
<span style="mso-spacerun: yes"> </span></span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span></span>
<span style=
"FONT-SIZE: 10pt; COLOR: blue; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
return</span> <span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
point;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 10pt; LINE-HEIGHT: normal"><span style=
"FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 'Courier New'; mso-no-proof: yes; mso-fareast-font-family: 'Times New Roman'">
<span style=
"mso-spacerun: yes"> </span>
}</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> <span style=
"COLOR: blue">private</span> <span style=
"COLOR: blue">static</span> <span style="COLOR: blue">void</span>
MakeZAware(<span style="COLOR: teal">IGeometry</span>
geometry)</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> {</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
<span style="COLOR: teal">IZAware</span> zAware = geometry
<span style="COLOR: blue">as</span> <span style=
"COLOR: teal">IZAware</span>;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span>
zAware.ZAware = <span style="COLOR: blue">true</span>;</span></p>
<p class="MsoNormal" style=
"MARGIN: 0in 0in 0pt; LINE-HEIGHT: normal; mso-layout-grid-align: none">
<span style=
"FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-no-proof: yes"><span style="mso-spacerun: yes">
</span> }</span></p>
Remarks
Note: Since a copy of the point is returned by Point (get_Point) for path, ring, polyline and polygon the IPointCollection::UpdatePoint method must be used to update points on those geometry types.
PointCount
The number of points in the collection.
virtual int PointCount { get; }
Returns
Project(ISpatialReference)
Projects this geometry into a new spatial reference.
virtual void Project(ISpatialReference newReferenceSystem)
Parameters
newReferenceSystemISpatialReference
Remarks
Note: This method can only be called upon the top level geometries (Points, Multipoints, Polylines and Polygons). If the from/to spatial references have different geographic coordinate systems, the Project method looks for a GeoTransformationsOperationSet. If the set of Geotransformations is present in memory, Project will use it to perform a geographic/datum Transformation. To use a specific geotransformation, use the IGeometry2::ProjectEx method.
//Create Spatial Reference Factory
ISpatialReferenceFactory srFactory = new SpatialReferenceEnvironmentClass();
ISpatialReference sr1;
//GCS to project from
IGeographicCoordinateSystem gcs = srFactory.CreateGeographicCoordinateSystem((int)esriSRGeoCSType.esriSRGeoCS_NAD1983);
sr1 = gcs;
sr1.SetFalseOriginAndUnits(-180, -90, 1000000);
//Projected Coordinate System to project into
IProjectedCoordinateSystem pcs = srFactory.CreateProjectedCoordinateSystem((int)esriSRProjCSType.esriSRProjCS_NAD1983N_AmericaLambert);
pcs.SetFalseOriginAndUnits(0, 0, 1000);
ISpatialReference sr2;
sr2 = pcs;
//Point to project
IPoint point = new PointClass() as IPoint;
point.PutCoords(-117.17, 34.06);
//Geometry Interface to do actual project
IGeometry geometry;
geometry = point;
geometry.SpatialReference = sr1;
geometry.Project(sr2);
point = geometry as IPoint;
double x;
double y;
point.QueryCoords(out x, out y);
Debug.Print("X: " + x.ToString());
Debug.Print("Y: " + y.ToString());
ProjectToPlane(IPoint, IVector3D, IVector3D)
Generates a polygon footprint for the object in an arbitrary plane. The footprint may have multiple parts.
virtual IGeometry ProjectToPlane(IPoint planarOrigin, IVector3D planarPositiveX, IVector3D planarNorm)
Parameters
Returns
Remarks
This method can be used to get the xy-footprint of a multipatch if set all the parameters to Null.


public static void TransformMultiPatchGeometry()
{
//Transform3D: Cylinder Projected To XY Plane Via ProjectToPlane()
//Define Origin At Which ProjectToPlane Operation Should Be Performed
IPoint
planarOriginPoint = ConstructPoint3D(0, 0,
0);
//Construct A Vector3D Corresponding To The Positive X Vector
IVector3D planarPositiveXVector3D = ConstructVector3D(10, 0, 0);
//Construct A Vector3D Corresponding To The Normal Vector
IVector3D planarNormalVector3D = ConstructVector3D(0, 0, 10);
IGeometry geometry = GetMultiPatchGeometry();
ITransform3D transform3D = geometry as ITransform3D;
IGeometry
transform3D.ProjectToPlane(
planarOriginPoint,
planarPositiveXVector3D,
planarNormalVector3D
);
}
private static IVector3D ConstructVector3D(double xComponent, double yComponent, double zComponent)
{
IVector3D vector3D = new Vector3DClass();
vector3D.SetComponents(xComponent, yComponent, zComponent);
return vector3D;
}
QueryChordLengthTangents(int, IPoint, ref bool, IPoint, ref bool)
Returns tangent vectors (relative to corresponding endpoint) at both sides of a Bezier end point; and whether they have been set by user or by smoothing process.
virtual void QueryChordLengthTangents(int pointIndex, IPoint prevTangent, ref bool prevSetByUser, IPoint nextTangent, ref bool nextSetByUser)
Parameters
QueryEnvelope(IEnvelope)
Copies this geometry's envelope properties into the specified envelope.
virtual void QueryEnvelope(IEnvelope outEnvelope)
Parameters
outEnvelopeIEnvelope
Remarks
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

QueryFromPoint(IPoint)
Copies this curve's 'from' point to the input point.
virtual void QueryFromPoint(IPoint from)
Parameters
fromIPoint
Remarks
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

//The example shows how to query the from and to points of a curve.
public void ICurveQueryPoints(IFeature currentFeature)
{
if (currentFeature.Shape.GeometryType == esriGeometryType.esriGeometryPolyline ||
currentFeature.Shape.GeometryType == esriGeometryType.esriGeometryLine)
{
ICurve curve = currentFeature.Shape as ICurve;
IPoint fromPoint = new PointClass();
IPoint toPoint = new PointClass();
curve.QueryFromPoint(fromPoint);
curve.QueryToPoint(toPoint);
System.Windows.Forms.MessageBox.Show("ICurve properties..." + "\n" +
"Curve.QueryFromPoint (x,y) = " + fromPoint.X + "," + fromPoint.Y + "\n" +
"Curve.QueryToPoint (x,y) = " + toPoint.X + "," + toPoint.Y);
}
}
' The example shows how to query the from and to points of a curve.
Public Sub t_ICurve_QueryPoints(ByVal pFeature As IFeature)
Dim pCurve As ICurve
Dim pPointFrom As IPoint
Dim pPointTo As IPoint
pPointFrom = New Point
pPointTo = New Point
If pFeature.Shape.GeometryType = esriGeometryType.esriGeometryPolyline Or _
esriGeometryType.esriGeometryPolyline Or esriGeometryType.esriGeometryLine Then
pCurve = pFeature.Shape
pCurve.QueryFromPoint(pPointFrom)
pCurve.QueryToPoint(pPointTo)
MsgBox("+++ICurve properties..." & vbCrLf _
& "Curve.QueryFromPoint (x,y) = " & pPointFrom.X & "," & pPointFrom.Y & vbCrLf _
& "Curve.QueryToPoint (x,y) = " & pPointTo.X & "," & pPointTo.Y & vbCrLf)
End If
End Sub
QueryNormal(esriSegmentExtension, double, bool, double, ILine)
Constructs a line normal to a curve from a point at a specified distance along the curve.
virtual void QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)
Parameters
extensionesriSegmentExtensionDistanceAlongCurvedoubleasRatioboolLengthdoublenormalILine
Remarks

QueryPoint(esriSegmentExtension, double, bool, IPoint)
Copies to outPoint the properties of a point on the curve at a specified distance from the beginning of the curve.
virtual void QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)
Parameters
extensionesriSegmentExtensionDistanceAlongCurvedoubleasRatiobooloutPointIPoint
Remarks
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

QueryPoint(int, IPoint)
Queries for a point in the PointCollection at given index.
virtual void QueryPoint(int Index, IPoint Point)
Parameters
Remarks
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.
QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)
Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.
virtual void QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)
Parameters
extensionesriSegmentExtensioninPointIPointasRatiobooloutPointIPointDistanceAlongCurvedoubledistanceFromCurvedoublebRightSidebool
Remarks
AsRatio is an input parameter that only affects the DistanceAlongCurve
distanceFromCurve is an output parameter that represents the minimum distance between the curve and the input point.
DistanceAlongCurve is an output parameter that represents the distance between the Frompoint of the input curve and the returned point on the curve.
bRightSide is an output parameter that tells if the input point is on the right side of the curve. The direction of the curve determines the right and left sides.
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

QueryPoints(int, int, ref IPoint)
Copies some points to an existing array of points. This method is intended for internal use only.
virtual void QueryPoints(int Index, int Count, ref IPoint Points)
Parameters
QuerySegments(int, int, out ISegment)
Returns references to some of the input segments. This method is intended for internal use only.
virtual void QuerySegments(int Index, int Count, out ISegment segments)
Parameters
QueryTangent(esriSegmentExtension, double, bool, double, ILine)
Constructs a line tangent to a curve from a point at a specified distance along the curve.
virtual void QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)
Parameters
extensionesriSegmentExtensionDistanceAlongCurvedoubleasRatioboolLengthdoubletangentILine
Remarks

QueryToPoint(IPoint)
Copies the curve's 'to' point into the input point.
virtual void QueryToPoint(IPoint to)
Parameters
toIPoint
Remarks
Note: The output geometry must be co-created prior to the query. The output geometry is not co-created by the method; it is populated. This can be used in performance critical situations. For example, creating the geometry only once outside a loop and use the query method could improve performance.

QueryWKSPointZs(int, int, out WKSPointZ)
Copies vertices/points coordinates to the array of point structures.
virtual void QueryWKSPointZs(int Index, int Count, out WKSPointZ pointStructures)
Parameters
QueryWKSPoints(int, int, out WKSPoint)
Copies vertices'/points' coordinates to the array of point structures.
virtual void QueryWKSPoints(int Index, int Count, out WKSPoint pointStructures)
Parameters
RemovePoints(int, int)
Removes vertices from a Path, Ring, Polyline, or Polygon, or references to points from a Multipoint, TriangleFan, or TriangleStrip.
virtual void RemovePoints(int Index, int Count)
Parameters
RemoveSegments(int, int, bool)
Removes references to some segments. If closeGap is TRUE, then any remaining internal gap in the path, ring, polyline or polygon is connected with a single line segment.
virtual void RemoveSegments(int Index, int Count, bool closeGap)
Parameters
ReplacePointCollection(int, int, IPointCollection)
Replaces vertices/points within a PointCollection.
virtual void ReplacePointCollection(int Index, int goingAway, IPointCollection newPoints)
Parameters
IndexintgoingAwayintnewPointsIPointCollection
ReplacePoints(int, int, int, ref IPoint)
Replaces vertices/points within a PointCollection.
virtual void ReplacePoints(int Index, int comingIn, int goingAway, ref IPoint newPoints)
Parameters
ReplaceSegmentCollection(int, int, ISegmentCollection)
Remove and inserts some segments.
virtual void ReplaceSegmentCollection(int Index, int goingAway, ISegmentCollection newSegments)
Parameters
IndexintgoingAwayintnewSegmentsISegmentCollection
ReplaceSegments(int, int, int, ref ISegment)
Removes and inserts from segments. This method is intended for internal use only.
virtual void ReplaceSegments(int Index, int comingIn, int goingAway, ref ISegment newSegments)
Parameters
Remarks
ReplaceSegments will return an error ("The index is either too large or too small") if the inputs are inconsistent. For example, specifying index = 4 on a polyline with only 2 segments.
On multipart geometry, segments cannot be replaced on more than one part at the time. For example, an error (("The index is either too large or too small") is returned on a polyline with two parts containing three segments each when specifying index= 2, incoming= 2, removal= 2. The error is returned because the first part doesn't contain enough segments to remove two segments starting at index = 2. This behavior is enforced for performance reasons. Please see the example.
When using C# you must use the IGeometryBridge interface to call this method.
When using VBNET you must use the IGeometryBridge interface to call this method.
ReverseOrientation()
Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc).
virtual void ReverseOrientation()
Remarks
The ReverseOrientation method works the same way as the Arcedit FLIP command. It reverses the order of the vertices in the Curve.
Caution should be taken in using ReverseOrientation on Polygons. Since ReverseOrientation changes the direction of each Ring within the Polygon, all Exterior Rings become Interior Rings and vice versa.

public void ReverseOrientation(IFeatureClass featureClass, int oidToEdit)
{
IFeature feature = featureClass.GetFeature(oidToEdit);
if (feature.Shape.GeometryType == esriGeometryType.esriGeometryPolygon)
{
IArea area = feature.Shape as IArea;
double beforeReverse = area.Area;
ICurve curve = feature.Shape as ICurve;
curve.ReverseOrientation();
double afterReverse = area.Area;
System.Windows.Forms.MessageBox.Show(String.Format("The polygon area is originally {0}, after the orientation was reversed the area is {1}.",beforeReverse,afterReverse));
}
}
Rotate(IPoint, double)
Rotates about the specified origin point. The angle is in radians. The origin can be in a different spatial reference than the geometry being rotated.
virtual void Rotate(IPoint Origin, double rotationAngle)
Parameters
Remarks
An Envelope cannot be Rotated.

RotateVector3D(IVector3D, double)
Rotates the object about axis defined by the specified vector through an angle measured in radians.
virtual void RotateVector3D(IVector3D axis, double rotationAngle)
Parameters
Remarks
The angle of rotation must be in radians. To convert to radians from decimal degrees, multiply by PI/180.

public static void TransformMultiPatchGeometry()
{
const double DegreesOfRotation = 45;
//Transform3D: Cylinder Rotated Around An Axis Via RotateVector3D()
//Construct A Vector3D Corresponding To The Desired Axis Of Rotation
IVector3D axisOfRotationVector3D = ConstructVector3D(0, 10, 0);
//Obtain Angle Of Rotation In Radians
double angleOfRotationInRadians = GetRadians(DegreesOfRotation);
IGeometry geometry = GetMultiPatchGeometry();
ITransform3D transform3D = geometry as ITransform3D;
transform3D.RotateVector3D(axisOfRotationVector3D, angleOfRotationInRadians);
}
private static IVector3D ConstructVector3D(double xComponent, double yComponent, double zComponent)
{
IVector3D vector3D = new Vector3DClass();
vector3D.SetComponents(xComponent, yComponent, zComponent);
return vector3D;
}
private static double GetRadians(double decimalDegrees)
{
return decimalDegrees * (Math.PI / 180);
}
Scale(IPoint, double, double)
Scales about the specified origin using seperate horizonal and vertical scales. The origin point can be in a different spatial reference than the geometry being scaled.
virtual void Scale(IPoint Origin, double sx, double sy)
Parameters
Remarks
Note: Caution must be taken when scaling a CircularArc or a geometry containing CircularArc segments. Unless Abs(ScaleX) = Abs(ScaleY), the resulting CircularArcs will not retain the characteristics of the original geometry (since they remain CircularArcs).

//Create Point you wish to scale
IPoint startingPoint = new PointClass() as IPoint;
startingPoint.PutCoords(10, 10);
//Create a point to act as origin
IPoint origin = new PointClass() as IPoint;
origin.PutCoords(15, 15);
//Cast the startingPoint into the correct Interface
ITransform2D transformScalePoint = startingPoint as ITransform2D;
//Perform Scale
transformScalePoint.Scale(origin, .5, .5);
double x;
double y;
startingPoint.QueryCoords(out x, out y);
Debug.Print(x.ToString());
Debug.Print(y.ToString());
Scale3D(IPoint, double, double, double)
Scales the object about the specified origin point. sx, sy, and sz are the scaling factors for the x, y, and z dimensions repectively.
virtual void Scale3D(IPoint Origin, double sx, double sy, double sz)
Parameters
Segment[int]
A reference to the ith segment.
virtual ISegment Segment[int i] { get; }
Parameters
iint
Returns
SegmentCount
The number of segments.
virtual int SegmentCount { get; }
Returns
SegmentsChanged()
Informs the segment collection that any cached values that it may be maintaining (envelope, length, etc.) are invalid. Use this method after editing segments directly.
virtual void SegmentsChanged()
Serialize(IXMLSerializeData)
Serializes an object to XML.
virtual void Serialize(IXMLSerializeData data)
Parameters
dataIXMLSerializeData
SetChordLengthTangents(int, IPoint, IPoint)
Sets tangent vectors (relative to corresponding endpoint) at both sides of a Bezier end point; if either is Nothing, they will be set by smoothing process.
virtual void SetChordLengthTangents(int pointIndex, IPoint prevTangent, IPoint nextTangent)
Parameters
SetCircle(IPoint, double)
Defines this path, ring, polyline or polygon to contain a single circular arc segment that is closed.
virtual void SetCircle(IPoint cp, double circleRadius)
Parameters
SetEmpty()
Removes all points from this geometry.
virtual void SetEmpty()
Remarks
Use the SetEmpty method to clear geometries and release memory. For example, a polygon with 100 rings will have an internal array of 100 pointers to ring objects. That array will go away and Release will be called on each ring. If that polygon had the only reference on those rings, then they'll go away, which releases all their segments, which may also then go away.
{
geometry.SetEmpty();
return geometry.IsEmpty;
}
SetPointCollection(IPointCollection)
Replaces all vertices of this Path, Ring, Polyline, or Polygon with copies of the points in the input collection; or all points of this Multipoint, TriangleFan, or TriangleStrip with references to points from the input collection.
virtual void SetPointCollection(IPointCollection newPoints)
Parameters
newPointsIPointCollection
SetPoints(int, ref IPoint)
Replaces all existing vertices of this Path, Ring, Polyline, or Polygon with copies of the input points; or all existing points of this Multipoint, TriangleFan, or TriangleStrip with references to the input points (for C++ and VB users only).
virtual void SetPoints(int Count, ref IPoint newPoints)
Parameters
SetRectangle(IEnvelope)
Defines this path, ring, polyline or polygon to have four line segments in the same positions as the sides of the input envelope.
virtual void SetRectangle(IEnvelope inEnvelope)
Parameters
inEnvelopeIEnvelope
Remarks
The method uses the spatial reference of the input envelope to determine whether or not the output geometry is simple.
If the input envelope does not have a spatial reference, the output geometry will be assumed non-simple geometry.
If the input envelope has a spatial reference, and its width and height are greater than 3*tolerance, then the output geometry is a simple geometry. Otherwise, the output is non-simple.
SetSegmentCollection(ISegmentCollection)
Replaces all segments with references to segments from the input collection.
virtual void SetSegmentCollection(ISegmentCollection newSegments)
Parameters
newSegmentsISegmentCollection
SetSegments(int, ref ISegment)
Replaces all segments with references to the input segments. This method is intended for internal use only.
virtual void SetSegments(int Count, ref ISegment newSegments)
Parameters
SetWKSPointZs(int, ref WKSPointZ)
Replaces all vertices/points of this Path, Ring, Polyline, Polygon, Multipoint, TriangleFan, Triangles, TriangleStrip, or MultiPatch with new ones.
virtual void SetWKSPointZs(int Count, ref WKSPointZ pointStructures)
Parameters
SetWKSPoints(int, ref WKSPoint)
Replaces all vertices of this Path, Ring, Polyline, or Polygon with new ones, or replaces all points of this Multipoint, TriangleFan, or TriangleStrip with new ones.
virtual void SetWKSPoints(int Count, ref WKSPoint pointStructures)
Parameters
Smooth(double)
Converts this path into a smooth approximation of itself that contains only Bezier curve segments.
virtual void Smooth(double maxAllowableOffset)
Parameters
maxAllowableOffsetdouble
Remarks

SmoothLocal(int)
Replaces up to four segments (two on each of the specified vertex index) with bezier curves.
virtual void SmoothLocal(int vertexIndex)
Parameters
vertexIndexint
Remarks

SnapToSpatialReference()
Moves points of this geometry so that they can be represented in the precision of the geometry's associated spatial reference system.
virtual void SnapToSpatialReference()
Remarks
SpatialReference
The spatial reference associated with this geometry.
virtual ISpatialReference SpatialReference { get; set; }
Returns
SynchronizeEmptyAttributes()
If, at end point shared by two segments, one segment has an empty value for an attribute and the other has a non-empty value, use the non-empty value for both.
virtual void SynchronizeEmptyAttributes()
ToPoint
The 'to' point of the curve.
virtual IPoint ToPoint { get; set; }
Returns
Remarks

Transform(esriTransformDirection, ITransformation)
Applies an arbitrary transformation. In particular, the transformation parameter can be either an affine transformation or a geographic transformation (datum shift).
virtual void Transform(esriTransformDirection Direction, ITransformation Transformation)
Parameters
DirectionesriTransformDirectionTransformationITransformation
Transform3D(esriTransformDirection, ITransformation3D)
Applies an arbitrary 3D transformation.
virtual void Transform3D(esriTransformDirection Direction, ITransformation3D Transformation)
Parameters
DirectionesriTransformDirectionTransformationITransformation3D
UpdatePoint(int, IPoint)
Changes the ith vertex or point to be a copy of the input point.
virtual void UpdatePoint(int i, IPoint p)
Parameters
Remarks
For efficiency UpdatePoint does not check if the spatial reference of the input point is equal to the spatial reference of the PointCollection. Please make sure that the spatial reference of the input point is equal to the spatial reference of the PointCollection before you pass the point in.
Note : You can also explicitly check the spatial reference by
using IClone::IsEqual
//Point to use in the UpdatePoint call
IPoint point = new PointClass() as IPoint;
//Point Collection to UpdatePoint
IPointCollection ptCollection = new MultipointClass() as IPointCollection;
//Set the spatial reference of the Point Collection usually it has already been set
ISpatialReferenceFactory srFactory = new SpatialReferenceEnvironmentClass() as ISpatialReferenceFactory;
IGeometry geom = ptCollection as IGeometry;
geom.SpatialReference = srFactory.CreateProjectedCoordinateSystem((int)esriSRProjCSType.esriSRProjCS_NAD1983N_AmericaLambert);
ISpatialReference sr = geom.SpatialReference;
//This line does nothing if the two spatial references are already equal
point.Project(sr);
//The integer is the number of point in the point collection you are updating
ptCollection.UpdatePoint(1, point);