Interface IConstructPoint2

Namespace
ESRI.ArcGIS.Geometry
Assembly
ESRI.Server.Geometry.dll

Provides access to additional point construction methods.

[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("AFFE2936-6D7D-4261-B391-0DE4269DD4B3")]
public interface IConstructPoint2 : IConstructPoint

Methods

ConstructAlong(ICurve, esriSegmentExtension, double, bool)

void ConstructAlong(ICurve curve, esriSegmentExtension extension, double distance, bool asRatio)

Parameters

curve ICurve
extension esriSegmentExtension
distance double
asRatio bool

ConstructAngleBisector(IPoint, IPoint, IPoint, double, bool)

void ConstructAngleBisector(IPoint from, IPoint through, IPoint to, double distance, bool useAcuteAngle)

Parameters

from IPoint
through IPoint
to IPoint
distance double
useAcuteAngle bool

ConstructAngleDistance(IPoint, double, double)

void ConstructAngleDistance(IPoint p, double inAngle, double distance)

Parameters

p IPoint
inAngle double
distance double

ConstructAngleIntersection(IPoint, double, IPoint, double)

void ConstructAngleIntersection(IPoint p1, double angle1, IPoint p2, double angle2)

Parameters

p1 IPoint
angle1 double
p2 IPoint
angle2 double

ConstructAverage(IPointCollection, esriGeometryAttributes)

Constructs the geometric average of the input point collection. Optionally uses the specified attribute as a source of weights on the locations of the points.

void ConstructAverage(IPointCollection Points, esriGeometryAttributes attributeType)

Parameters

Points IPointCollection
attributeType esriGeometryAttributes

Remarks

If attributeType is esriAttributeNone then the average point location is computed; otherwise the attribute specified by attributeType serves as a weight. Points whose weight attribute is NaN are ignored (a weight of 0 has a similar affect). The resulting point will have the (weighted) average for all their attributes. However this does not apply to ID's; no average is calculated for them in any case; but thay can be used as weight.

Only the following attributeType values are permitted: esriAttributeNone, esriAttributeZ, esriAttributeM, esriAttributeID.

[C#]

//This example demonstrates how to use the ConstructAverage method
private void ConstructAverage_Example()
{
    IPointCollection4 pointCollection = new MultipointClass();
    object Missing = Type.Missing;
    //Create a MAware and a ZAware multipoint
    IPoint[] points = new IPoint[4];
    for(int i = 0; i < 4; i++)
    {
        points[i]= new PointClass();
    }
    points[0].PutCoords(0, 0);
    points[0].Z = 10;
    points[0].M = 10;
    points[1].PutCoords(0, 5);
    points[1].Z = 10;
    points[1].M = 10;
    points[2].PutCoords(5, 5);
    points[2].Z = 20;
    points[2].M = 20;
    points[3].PutCoords(5, 0);
    points[3].Z = 10;
    points[3].M = 20;
    IGeometryBridge geomBridge = new GeometryEnvironmentClass();
    geomBridge.AddPoints(pointCollection, ref points);
    IZAware zAwareCollection = pointCollection as IZAware;
    zAwareCollection.ZAware = true;
    IMAware mAwareCollection = pointCollection as IMAware;
    mAwareCollection.MAware = true;
    IConstructPoint2 constructionPoint = new PointClass();
    //Construct the average point with esriAttributeM
    constructionPoint.ConstructAverage(pointCollection, esriGeometryAttributes.esriAttributeM);
    IPoint outPutPoint1 = constructionPoint as IPoint;
    System.Windows.Forms.MessageBox.Show("Output point with esriAttributeM: " + outPutPoint1.X + " , " + outPutPoint1.Y + " , " + outPutPoint1.M);
    //Construct the average point with esriAttributeZ
    constructionPoint.ConstructAverage(pointCollection, esriGeometryAttributes.esriAttributeZ);
    IPoint outPutPoint2 = constructionPoint as IPoint;
    System.Windows.Forms.MessageBox.Show("Output point with esriAttributeZ: " + outPutPoint2.X + " , " + outPutPoint2.Y + " , " + outPutPoint2.Z);
}






































[Visual Basic .NET]

    'This example demonstrates how to use the ConstructAverage method
    Sub ConstructAverage_Example()
        Dim pPoints(0 To 3) As IPoint, pPointcol As IPointCollection4
        Dim pZawareCol As IZAware, pMawareCol As IMAware
        Dim pPoint As IPoint, pconstpoint2 As IConstructPoint2
        'Create a MAware and a ZAware multipoint
        pPoints(0) = New Point
        pPoints(1) = New Point
        pPoints(2) = New Point
        pPoints(3) = New Point
        pPoints(0).PutCoords(0, 0)
        pPoints(1).PutCoords(0, 5)
        pPoints(2).PutCoords(5, 5)
        pPoints(3).PutCoords(5, 0)
        pPoints(0).Z = 10
        pPoints(1).Z = 10
        pPoints(2).Z = 20
        pPoints(3).Z = 10
        pPoints(0).M = 10
        pPoints(1).M = 10
        pPoints(2).M = 20
        pPoints(3).M = 10
        pPointcol = New Multipoint
        Dim pGeometryBridge As IGeometryBridge
        pGeometryBridge = New GeometryEnvironment
        pGeometryBridge.AddPoints(pPointcol, pPoints)
        pZawareCol = pPointcol
        pZawareCol.ZAware = True
        pMawareCol = pPointcol
        pMawareCol.MAware = True
        pconstpoint2 = New Point
        '** Construct the average point with esriAttributeM
        pconstpoint2.ConstructAverage(pPointcol, esriGeometryAttributes.esriAttributeM)
        pPoint = pconstpoint2
        Debug.Print("***** esriAttributeM *****")
        Debug.Print(pPoint.X & " , " & pPoint.Y & " , " & pPoint.M)
        '** Construct the average point with esriAttributeZ
        pconstpoint2 = New Point
        pconstpoint2.ConstructAverage(pPointcol, esriGeometryAttributes.esriAttributeZ)
        pPoint = pconstpoint2
        Debug.Print("***** esriAttributeZ *****")
        Debug.Print(pPoint.X & " , " & pPoint.Y & " , " & pPoint.Z)
    End Sub









































ConstructDeflection(ILine, double, double)

void ConstructDeflection(ILine baseLine, double distance, double inAngle)

Parameters

baseLine ILine
distance double
inAngle double

ConstructDeflectionIntersection(ILine, double, double, bool)

void ConstructDeflectionIntersection(ILine baseLine, double startAngle, double endAngle, bool OnRightSide)

Parameters

baseLine ILine
startAngle double
endAngle double
OnRightSide bool

ConstructOffset(ICurve, esriSegmentExtension, double, bool, double)

void ConstructOffset(ICurve curve, esriSegmentExtension extension, double distance, bool asRatio, double Offset)

Parameters

curve ICurve
extension esriSegmentExtension
distance double
asRatio bool
Offset double

ConstructParallel(ISegment, esriSegmentExtension, IPoint, double)

void ConstructParallel(ISegment Segment, esriSegmentExtension extension, IPoint start, double distance)

Parameters

Segment ISegment
extension esriSegmentExtension
start IPoint
distance double

ConstructPerpendicular(ISegment, esriSegmentExtension, IPoint, double, bool)

void ConstructPerpendicular(ISegment @base, esriSegmentExtension extension, IPoint p, double distance, bool bUseLineOrientation)

Parameters

base ISegment
extension esriSegmentExtension
p IPoint
distance double
bUseLineOrientation bool

ConstructThreePointResection(IPoint, double, IPoint, double, IPoint, out double)

void ConstructThreePointResection(IPoint point1, double angleP1P2, IPoint point2, double angleP2P3, IPoint point3, out double arcAngle)

Parameters

point1 IPoint
angleP1P2 double
point2 IPoint
angleP2P3 double
point3 IPoint
arcAngle double