Provides access to members that construct multiple points using other geometries and values.
Description
Constructs a Multipoint according to various properties of an input geometry or relations between input geometries. Useful in finding the points corresponding to properties that are not satisfied by a single output Point.
Members
Name | Description | |
---|---|---|
ConstructArcPoints | Constructs the four arc points (fromPoint, toPoint, center point, intersection point of the tangents at fromPoint and toPoint, in that order) for the specified circular arc. | |
ConstructDivideEqual | Constructs cPoints points evenly distributed along the input curve. | |
ConstructDivideLength | Places points along the input curve each seperate by the specified distance. | |
ConstructIntersection | Constructs the point(s) of intersection/tangency between two segments. Different ways of extending the segments in order to locate additional points can be specified. | |
ConstructIntersectionEx | Constructs the point(s) of intersection/tangency between two segments. Different ways of extending the segments in order to locate additional points can be specified. | |
ConstructTangent | Constructs all points of tangency to a curve from a point. |
IConstructMultipoint.ConstructArcPoints Method
Constructs the four arc points (fromPoint, toPoint, center point, intersection point of the tangents at fromPoint and toPoint, in that order) for the specified circular arc.
Public Sub ConstructArcPoints ( _
ByVal a As ICircularArc _
)
public void ConstructArcPoints (
ICircularArc a
);
Description
Constructs a Multipoint consisting of four points (In that order): The Circular arc's From point, To point, Center point and the point of intersection between the tangents at the From and To points.
Remarks
private void ConstrConstructArcPoints()
{
IPoint centerPoint = new PointClass();
centerPoint.PutCoords(10, 0);
IPoint fromPoint = new PointClass();
fromPoint.PutCoords(0, 0);
IPoint toPoint = new PointClass();
toPoint.PutCoords(0, 20);
IConstructCircularArc circularArcConstruction = new CircularArcClass();
circularArcConstruction.ConstructThreePoints(fromPoint, centerPoint, toPoint, false);
IConstructMultipoint constructMultipoint = new MultipointClass();
constructMultipoint.ConstructArcPoints(circularArcConstruction as ICircularArc);
IPointCollection pointCollection = constructMultipoint as IPointCollection;
System.Windows.Forms.MessageBox.Show("From Point : " + pointCollection.get_Point(0).X + " , " + pointCollection.get_Point(0).Y + "\n" +
"To Point : " + pointCollection.get_Point(1).X + " , " + pointCollection.get_Point(1).Y + "\n" +
"Center Point : " + pointCollection.get_Point(2).X + " , " + pointCollection.get_Point(2).Y + "\n" +
"Intersection Point : " + pointCollection.get_Point(3).X + " , " + pointCollection.get_Point(3).Y + "\n"
);
}
Private Sub ConstructArcPoints()
Dim pConstructCircularArc As ESRI.ArcGIS.Geometry.IConstructCircularArc
Dim pCArc As ESRI.ArcGIS.Geometry.ICircularArc
Dim pPoint1 As ESRI.ArcGIS.Geometry.IPoint
Dim pPoint2 As ESRI.ArcGIS.Geometry.IPoint
Dim pPoint3 As ESRI.ArcGIS.Geometry.IPoint
Dim pTcoll As ESRI.ArcGIS.Geometry.IPointCollection
Dim pConstructMultipoint As ESRI.ArcGIS.Geometry.IConstructMultipoint
Dim pMultipoint As ESRI.ArcGIS.Geometry.IMultipoint
pConstructMultipoint = New ESRI.ArcGIS.Geometry.Multipoint
pConstructCircularArc = New ESRI.ArcGIS.Geometry.CircularArc
pCArc = pConstructCircularArc
pPoint1 = New ESRI.ArcGIS.Geometry.Point
pPoint2 = New ESRI.ArcGIS.Geometry.Point
pPoint3 = New ESRI.ArcGIS.Geometry.Point
pPoint1.PutCoords(100, 100)
pPoint2.PutCoords(300, 300)
pPoint3.PutCoords(500, 150)
pConstructCircularArc.ConstructThreePoints(pPoint1, pPoint2, pPoint3, False)
pConstructMultipoint.ConstructArcPoints(pCArc)
pMultipoint = pConstructMultipoint
pTcoll = pMultipoint
Debug.Print("*********************************************")
Debug.Print(" Report the points")
Debug.Print("*********************************************")
Debug.Print("From Point : " & pTcoll.Point(0).X & " , " & pTcoll.Point(0).Y)
Debug.Print("To Point : " & pTcoll.Point(1).X & " , " & pTcoll.Point(1).Y)
Debug.Print("Center Point : " & pTcoll.Point(2).X & " , " & pTcoll.Point(2).Y)
Debug.Print("Intersection Point : " & pTcoll.Point(3).X & " , " & pTcoll.Point(3).Y)
End Sub
IConstructMultipoint.ConstructDivideEqual Method
Constructs cPoints points evenly distributed along the input curve.
Public Sub ConstructDivideEqual ( _
ByVal inCurve As ICurve, _
ByVal numInnerPoints As Integer _
)
public void ConstructDivideEqual (
ICurve inCurve,
int numInnerPoints
);
Description
Constructs a Multipoint consisting of the From point of the input Curve, n inner points equally spaced over the length of the curve, and the To point of the curve.
Remarks
The number of points in the constructed multipoint is equal to the input numPoints plus the 2 endpoints.
private void ConstructDivideEqual()
{
IPoint centerPoint = new PointClass();
centerPoint.PutCoords(10, 0);
IPoint fromPoint = new PointClass();
fromPoint.PutCoords(0, 0);
IPoint toPoint = new PointClass();
toPoint.PutCoords(0, 20);
ICircularArc circularArcConstruction = new CircularArcClass();
circularArcConstruction.PutCoords(centerPoint, fromPoint, toPoint, esriArcOrientation.esriArcClockwise);
IConstructMultipoint constructMultipoint = new MultipointClass();
constructMultipoint.ConstructDivideEqual(circularArcConstruction as ICurve, 10);
IPointCollection pointCollection = constructMultipoint as IPointCollection;
System.Windows.Forms.MessageBox.Show("Number of points is: " + pointCollection.PointCount);
}
Sub ConstructDivideEqual_Example()
Dim pCArc As ICircularArc, pConstructMultipoint As IConstructMultipoint
Dim pCenter As IPoint, pFrom As IPoint, pTo As IPoint
Dim ptc As IPointCollection
pCArc = New CircularArc
pCenter = New Point
pCenter.PutCoords(10, 0)
pFrom = New Point
pFrom.PutCoords(0, 0)
pTo = New Point
pTo.PutCoords(0, 20)
pCArc.PutCoords(pCenter, pFrom, pTo, esriArcOrientation.esriArcClockwise)
pConstructMultipoint = New Multipoint
pConstructMultipoint.ConstructDivideEqual(pCArc, 10)
ptc = pConstructMultipoint
Debug.Print("Number of points is: " & ptc.PointCount)
End Sub
IConstructMultipoint.ConstructDivideLength Method
Places points along the input curve each seperate by the specified distance.
Public Sub ConstructDivideLength ( _
ByVal inCurve As ICurve, _
ByVal separationDistance As Double _
)
public void ConstructDivideLength (
ICurve inCurve,
double separationDistance
);
Description
Constructs a Multipoint consisting of the endpoints of the Curve and the points along the length of the curve spaced a given distance apart from each other starting at the curve's From point and ending at the To point.
Remarks
If the final inner point is too close to the To point, that inner point is not included in the constructed multipoint.
//This example demonstrates how to use ConstructDivideLentgth
private void ConstructDivideLength()
{
IPoint centerPoint = new PointClass();
centerPoint.PutCoords(10, 0);
IPoint fromPoint = new PointClass();
fromPoint.PutCoords(0, 0);
IPoint toPoint = new PointClass();
toPoint.PutCoords(0, 20);
ICircularArc circularArcConstruction = new CircularArcClass();
circularArcConstruction.PutCoords(centerPoint, fromPoint, toPoint, esriArcOrientation.esriArcClockwise);
IConstructMultipoint constructMultipoint = new MultipointClass();
constructMultipoint.ConstructDivideLength(circularArcConstruction as ICurve, 10);
IPointCollection pointCollection = constructMultipoint as IPointCollection;
System.Windows.Forms.MessageBox.Show("Number of points is: " + pointCollection.PointCount);
}
Sub ConstructDivideEqual_ConstructDivideLength_Example()
Dim pCArc As ICircularArc, pConstructMultipoint As IConstructMultipoint
Dim pCenter As IPoint, pFrom As IPoint, pTo As IPoint
Dim ptc As IPointCollection
pCArc = New CircularArc
pCenter = New Point
pCenter.PutCoords(10, 0)
pFrom = New Point
pFrom.PutCoords(0, 0)
pTo = New Point
pTo.PutCoords(0, 20)
pCArc.PutCoords(pCenter, pFrom, pTo, esriArcOrientation.esriArcClockwise)
pConstructMultipoint = New Multipoint
pConstructMultipoint.ConstructDivideLength(pCArc, pCArc.Length / 11)
ptc = pConstructMultipoint
Debug.Print("Number of points is: " & ptc.PointCount)
End Sub
IConstructMultipoint.ConstructIntersection Method
Constructs the point(s) of intersection/tangency between two segments. Different ways of extending the segments in order to locate additional points can be specified.
Public Sub ConstructIntersection ( _
ByVal segment1 As ISegment, _
ByVal extension1 As esriSegmentExtension, _
ByVal segment2 As ISegment, _
ByVal extension2 As esriSegmentExtension, _
[ByRef params1 As Object], _
[ByRef params2 As Object], _
[ByRef isTangentPoint As Object] _
)
public void ConstructIntersection (
ISegment segment1,
esriSegmentExtension extension1,
ISegment segment2,
esriSegmentExtension extension2,
ref object params1,
ref object params2,
ref object isTangentPoint
);
Description
Constructs a Multipoint containing the points of intersection and tangency between two input geometries. The input geometries can be extended by any of the esriSegmentExtension methods. Optionally, the construction method also returns the relative position and tangency of the intersection point along each curve.
Remarks
private void ConstructIntersection()
{
IPoint[] points = new IPoint[4];
for(int i = 0; i < 4; i++)
{
points[i] = new PointClass();
}
points[0].PutCoords(150, 100);
points[1].PutCoords(200, 600);
points[2].PutCoords(400, 600);
points[3].PutCoords(450, 100);
IBezierCurveGEN bezierCurve = new BezierCurveClass();
bezierCurve.PutCoords(ref points);
IPoint centerPoint = new PointClass();
centerPoint.PutCoords(300, 300);
IPoint fromPoint = new PointClass();
fromPoint.PutCoords(100, 100);
IPoint toPoint = new PointClass();
toPoint.PutCoords(500, 100);
IConstructCircularArc circularArcConstruction = new CircularArcClass();
circularArcConstruction.ConstructThreePoints(fromPoint, centerPoint, toPoint, false);
//params optional
object param0;
object param1;
object isTangentPoint;
IConstructMultipoint constructMultipoint = new MultipointClass();
constructMultipoint.ConstructIntersection(circularArcConstruction as ISegment, esriSegmentExtension.esriNoExtension, bezierCurve as ISegment, esriSegmentExtension.esriNoExtension, out param0, out param1, out isTangentPoint);
IMultipoint multipoint = constructMultipoint as IMultipoint;
IPointCollection pointCollection = multipoint as IPointCollection;
for (int i = 0; i < pointCollection.PointCount; i++)
{
System.Windows.Forms.MessageBox.Show("Point : " + i + " X = " + pointCollection.get_Point(i).X + " Y = " + pointCollection.get_Point(i).Y);
}
}
Private Sub ConstructIntersection()
Dim pConstructCircularArc As ESRI.ArcGIS.Geometry.IConstructCircularArc
Dim pCArc As ESRI.ArcGIS.Geometry.ICircularArc
Dim pPoint1 As ESRI.ArcGIS.Geometry.IPoint
Dim pPoint2 As ESRI.ArcGIS.Geometry.IPoint
Dim pPoint3 As ESRI.ArcGIS.Geometry.IPoint
Dim pTcoll As ESRI.ArcGIS.Geometry.IPointCollection
Dim pConstructMultipoint As ESRI.ArcGIS.Geometry.IConstructMultipoint
Dim pMultipoint As ESRI.ArcGIS.Geometry.IMultipoint
Dim i As Long
Dim pBezier As ESRI.ArcGIS.Geometry.IBezierCurve
Dim pPtCon(0 To 3) As ESRI.ArcGIS.Geometry.IPoint
For i = 0 To 3
pPtCon(i) = New ESRI.ArcGIS.Geometry.Point
Next
pPtCon(0).PutCoords(150, 100)
pPtCon(1).PutCoords(200, 600)
pPtCon(2).PutCoords(400, 600)
pPtCon(3).PutCoords(450, 100)
pBezier = New ESRI.ArcGIS.Geometry.BezierCurve
pBezier.PutCoords(4, pPtCon(0))
pConstructMultipoint = New ESRI.ArcGIS.Geometry.Multipoint
pConstructCircularArc = New ESRI.ArcGIS.Geometry.CircularArc
pCArc = pConstructCircularArc
pPoint1 = New ESRI.ArcGIS.Geometry.Point
pPoint2 = New ESRI.ArcGIS.Geometry.Point
pPoint3 = New ESRI.ArcGIS.Geometry.Point
pPoint1.PutCoords(100, 100)
pPoint2.PutCoords(300, 300)
pPoint3.PutCoords(500, 100)
pConstructCircularArc.ConstructThreePoints(pPoint1, pPoint2, pPoint3, False)
pConstructMultipoint.ConstructIntersection(pCArc, ESRI.ArcGIS.Geometry.esriSegmentExtension.esriNoExtension, pBezier, ESRI.ArcGIS.Geometry.esriSegmentExtension.esriNoExtension)
pMultipoint = pConstructMultipoint
pTcoll = pMultipoint
Debug.Print("*********************************************")
Debug.Print(" Report the intersection points")
Debug.Print("*********************************************")
For i = 0 To pTcoll.PointCount - 1
Debug.Print("Point : " & pTcoll.Point(i).X & " , " & pTcoll.Point(i).Y)
Next
End Sub
IConstructMultipoint.ConstructIntersectionEx Method
Constructs the point(s) of intersection/tangency between two segments. Different ways of extending the segments in order to locate additional points can be specified.
Public Sub ConstructIntersectionEx ( _
ByVal segment1 As ISegment, _
ByVal extension1 As esriSegmentExtension, _
ByVal segment2 As ISegment, _
ByVal extension2 As esriSegmentExtension, _
[ByRef params1 As Double], _
[ByRef params2 As Double], _
[ByRef tangentBits As Integer] _
)
public void ConstructIntersectionEx (
ISegment segment1,
esriSegmentExtension extension1,
ISegment segment2,
esriSegmentExtension extension2,
ref double params1,
ref double params2,
ref int tangentBits
);
Description
Constructs a Multipoint containing the points of intersection and tangency between two input geometries. The input geometries can be extended by any of the esriSegmentExtension methods. Optionally, the construction method also returns the relative position and tangency of the intersection point along each curve.
Remarks
IConstructMultipoint.ConstructTangent Method
Constructs all points of tangency to a curve from a point.
Public Sub ConstructTangent ( _
ByVal inCurve As ICurve, _
ByVal p As IPoint _
)
public void ConstructTangent (
ICurve inCurve,
IPoint p
);
Description
Creates a Multipoint consisting of all points along the input Segment that are Tangent to the input Point.
Remarks
Input must consist of a single segment and not polycurves.
private void ConstructTangent()
{
IPoint[] points = new IPoint[4];
for (int i = 0; i < 4; i++)
{
points[i] = new PointClass();
}
points[0].PutCoords(150, 100);
points[1].PutCoords(200, 600);
points[2].PutCoords(400, 600);
points[3].PutCoords(450, 100);
IBezierCurveGEN bezierCurve = new BezierCurveClass();
bezierCurve.PutCoords(ref points);
IConstructMultipoint constructMultipoint = new MultipointClass();
constructMultipoint.ConstructTangent(bezierCurve as ICurve, points[1]);
IMultipoint multipoint = constructMultipoint as IMultipoint;
IPointCollection pointCollection = multipoint as IPointCollection;
//Report the points
for (int i = 0; i < pointCollection.PointCount; i++)
{
System.Windows.Forms.MessageBox.Show("Point : " + pointCollection.get_Point(i).X + " , " + pointCollection.get_Point(i).Y);
}
}
Private Sub ConstructTangent()
Dim pTcoll As ESRI.ArcGIS.Geometry.IPointCollection
Dim pConstructMultipoint As ESRI.ArcGIS.Geometry.IConstructMultipoint
Dim pMultipoint As ESRI.ArcGIS.Geometry.IMultipoint
Dim i As Long
Dim pBezier As ESRI.ArcGIS.Geometry.IBezierCurve
Dim pPtCon(0 To 3) As ESRI.ArcGIS.Geometry.IPoint
For i = 0 To 3
pPtCon(i) = New ESRI.ArcGIS.Geometry.Point
Next
pPtCon(0).PutCoords(150, 100)
pPtCon(1).PutCoords(200, 600)
pPtCon(2).PutCoords(400, 600)
pPtCon(3).PutCoords(450, 100)
pBezier = New ESRI.ArcGIS.Geometry.BezierCurve
pBezier.PutCoords(4, pPtCon(0))
pConstructMultipoint = New ESRI.ArcGIS.Geometry.Multipoint
pConstructMultipoint.ConstructTangent(pBezier, pPtCon(0))
pMultipoint = pConstructMultipoint
pTcoll = pMultipoint
Debug.Print("*********************************************")
Debug.Print(" Report the points")
Debug.Print("*********************************************")
For i = 0 To pTcoll.PointCount - 1
Debug.Print("Point : " & pTcoll.Point(i).X & " , " & pTcoll.Point(i).Y)
Next
End Sub
Classes that implement IConstructMultipoint
Classes | Description |
---|---|
Multipoint | An ordered collection of points; optionally has measure, height and ID attributes. |