Class LineClass

Namespace
ESRI.ArcGIS.Geometry
Assembly
ESRI.Server.Geometry.dll
[Guid("6F4E63E0-5AB4-11D0-A8F6-00608C85EDE5")]
[ClassInterface(ClassInterfaceType.None)]
public class LineClass : Line, ILine3, ILine2, ILine, ITransform2D, ICurve3, ICurve2, ISegment, ICurve, IGeometry, IConstructLine, IProximityOperator, ISupportErrorInfo, IClone, ISegmentM, ISegmentZ, ISegmentID, ICurve3D, IProximityOperator3D
Inheritance
LineClass
Implements
Inherited Members

Constructors

LineClass()

public LineClass()

Explicit Interface Implementations

Angle

The angle between this line and the positive x-axis.

virtual double Angle { get; }

Returns

double

Remarks


The following Visual Basic example gets the angle of a line and converts it to degrees :

dAngleDegree = (180 * pLine.Angle) / Pi

Where Pi = 4 * Atn(1)

Line Angle Example

Assign(IClone)

Assigns the properties of src to the receiver.

virtual void Assign(IClone src)

Parameters

src IClone

Clone()

Clones the receiver and assigns the result to *clone.

virtual IClone Clone()

Returns

IClone

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

Constructs a line segment being the bisector through the angle defined by the three input points.

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

Parameters

from IPoint
through IPoint
to IPoint
Length double
useAcuteAngle bool

Remarks

 

ConstructLine ConstructAngleBisector Example

[C#]

// This example constructs a new line using the ConstructAngleBisector method.
// Note the usage of the acute angle.
public void ConstructLineFromAngleBisector()
{
    IPoint fromPoint = new PointClass();
    fromPoint.PutCoords(1, 0);
    IPoint throughPoint = new PointClass();
    throughPoint.PutCoords(1, 1);
    IPoint toPoint = new PointClass();
    toPoint.PutCoords(0, 1);








    IConstructLine constructLine = new LineClass();

    double distance = 1.4142135623731;
    constructLine.ConstructAngleBisector(fromPoint, throughPoint, toPoint, distance, false);
    ILine line = constructLine as ILine;

    printProperties(line);
    // Now use the the acute angle with the same data.
    //Gives same results as setting dDist to -1.4142135623731 and not using
    // the acute angle.
    constructLine.ConstructAngleBisector(fromPoint, throughPoint, toPoint, distance, true);
    ILine line2 = constructLine as ILine;
    printProperties(line2);
}
private void printProperties(ILine line)
{
    IPoint outFromPoint = new PointClass();
    IPoint outToPoint = new PointClass();
    line.QueryCoords(outFromPoint, outToPoint);
    System.Windows.Forms.MessageBox.Show(outFromPoint.X + " , " +
                                   outFromPoint.Y + " , " +
                                   outToPoint.X + " , " +
                                   outToPoint.Y + "\n" +
                                   "angle = " + line.Angle);
}

















[Visual Basic .NET]

    '+++ This example constructs a new line using the ConstructAngleBisector method.
    '+++ Note the usage of the acute angle.

    Public Sub t_Line_ConstructAngleBisector()
        On Error GoTo Errorhandler
        Dim pPointFrom As IPoint
        Dim pPointTo As IPoint
        Dim pPointThrough As IPoint
        Dim pLine As ILine
        Dim pCLine As IConstructLine
        Dim dDist As Double
        Dim pP1 As IPoint
        Dim pP2 As IPoint








        pPointFrom = New Point
        pPointTo = New Point
        pPointThrough = New Point
        pLine = New Line
        pCLine = New Line
        pP1 = New Point
        pP2 = New Point





        pPointFrom.PutCoords(1, 0)
        pPointTo.PutCoords(0, 1)
        pPointThrough.PutCoords(1, 1)
        dDist = 1.4142135623731


        pCLine.ConstructAngleBisector(pPointFrom, pPointThrough, pPointTo, dDist, False)
        pLine = pCLine
        pLine.QueryCoords(pP1, pP2)
        MsgBox(pP1.X & "," & pP1.Y & " to " & pP2.X & "," & pP2.Y _
        & vbCrLf & "angle = " & pLine.Angle)




        '+++ Now use the the acute angle with the same data.
        '+++ Gives same results as setting dDist to -1.4142135623731 and not using
        '+++ the acute angle.


        pCLine.ConstructAngleBisector(pPointFrom, pPointThrough, pPointTo, dDist, True)
        pLine = pCLine
        pLine.QueryCoords(pP1, pP2)
        MsgBox(pP1.X & "," & pP1.Y & " to " & pP2.X & "," & pP2.Y _
        & vbCrLf & "angle = " & pLine.Angle)



        Exit Sub

Errorhandler:
        MsgBox(Err.Number & "..." & Err.Description)
        Exit Sub

    End Sub

ConstructExtended(ILine, esriSegmentExtension)

Extends a line segment until one or both of its endpoints reaches the boundary of the domain of the line's associated spatial reference.

virtual void ConstructExtended(ILine inLine, esriSegmentExtension extendHow)

Parameters

inLine ILine
extendHow esriSegmentExtension

Remarks

To extend a Line to another Curve, wrap the Line in a Polyline and use IConstructCurve::ConstructExtended.

ConvertDistanceMeasureToRatio(double, ref double)

Converts the distance measure to a ratio of the total distance.

virtual void ConvertDistanceMeasureToRatio(double distanceMeasure, ref double distanceRatio)

Parameters

distanceMeasure double
distanceRatio double

Densify(int, double, out int, out ILine)

Densify segment into the specified number of smaller segments. This method is intended for internal use only.

virtual void Densify(int cInSlots, double maxDeviation, out int pcOutSegments, out ILine segments)

Parameters

cInSlots int
maxDeviation double
pcOutSegments int
segments ILine

Remarks

Densifying individual segments can be accomplished in client code by add the segment to a temporary polyline, then densifying the polyline using one of the methods on IPolycurve. Alternatively, the IGeometryBridge interface on the GeometryEnvironment object can be used.

[C#]

When using C# you must use the IGeometryBridge interface to call this method.

[Visual Basic .NET]

When using VBNET you must use the IGeometryBridge interface to call this method.

Dimension

virtual esriGeometryDimension Dimension { get; }

Returns

esriGeometryDimension

Envelope

virtual IEnvelope Envelope { get; }

Returns

IEnvelope

EnvelopeIntersection(IEnvelope, bool, ref double, ref double, ref int, out int)

Finds intersections with clipping envelope; boundaryOverlap is ignored for non-linear segments.

virtual void EnvelopeIntersection(IEnvelope intersectionEnvelope, bool boundaryOverlap, ref double segmentParams, ref double envelopeDistances, ref int numIntersections, out int outcode)

Parameters

intersectionEnvelope IEnvelope
boundaryOverlap bool
segmentParams double
envelopeDistances double
numIntersections int
outcode int

FromPoint

virtual IPoint FromPoint { get; set; }

Returns

IPoint

GeoNormalize()

virtual void GeoNormalize()

GeoNormalizeFromLongitude(double)

virtual void GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

GeographicShift(double)

Shift longitudes to the right of splitLongitude. This method is obsolete.

virtual void GeographicShift(double splitLongitude)

Parameters

splitLongitude double

GeometryType

virtual esriGeometryType GeometryType { get; }

Returns

esriGeometryType

GetDistanceAtVertexAttribute(esriGeometryAttributes, double, bool)

Gets the distance corresponding to the attribute value along the segment.

virtual double GetDistanceAtVertexAttribute(esriGeometryAttributes attributeType, double attributeValue, bool asRatio)

Parameters

attributeType esriGeometryAttributes
attributeValue double
asRatio bool

Returns

double

GetDistanceAtVertexAttribute3D(esriGeometryAttributes, double, bool)

Gets the distance corresponding to the attribute value along the line.

virtual double GetDistanceAtVertexAttribute3D(esriGeometryAttributes attributeType, double attributeValue, bool asRatio)

Parameters

attributeType esriGeometryAttributes
attributeValue double
asRatio bool

Returns

double

GetIDs(out int, out int)

Get the IDs on the segment's endpoints.

virtual void GetIDs(out int fromID, out int toID)

Parameters

fromID int
toID int

GetMs(out double, out double)

Get the Ms on the segment's endpoints.

virtual void GetMs(out double fromM, out double toM)

Parameters

fromM double
toM double

GetPointsAtVertexAttribute(esriGeometryAttributes, double, double, out IPointCollection)

Gets the point at the location corresponding to the attribute value.

virtual void GetPointsAtVertexAttribute(esriGeometryAttributes attributeType, double attributeValue, double lateralOffset, out IPointCollection outPoints)

Parameters

attributeType esriGeometryAttributes
attributeValue double
lateralOffset double
outPoints IPointCollection

GetSubSegmentBetweenVertexAttributes(esriGeometryAttributes, double, double, out ISegment)

Gets the segment corresponding to the extent along the segment between the 'from' and 'to' attribute values.

virtual void GetSubSegmentBetweenVertexAttributes(esriGeometryAttributes attributeType, double fromAttribute, double toAttribute, out ISegment outSegment)

Parameters

attributeType esriGeometryAttributes
fromAttribute double
toAttribute double
outSegment ISegment

GetSubcurve(double, double, bool, out ICurve)

virtual void GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

GetSubcurve3D(double, double, bool, out ICurve3D)

Extracts a portion of this curve into a new curve.

virtual void GetSubcurve3D(double fromDistance, double toDistance, bool bAsRatio, out ICurve3D ppOutSubCurve)

Parameters

fromDistance double
toDistance double
bAsRatio bool
ppOutSubCurve ICurve3D

GetVertexAttributeAtDistance(esriGeometryAttributes, double, bool)

Gets the attribute value corresponding to the distance along the segment.

virtual double GetVertexAttributeAtDistance(esriGeometryAttributes attributeType, double distance, bool asRatio)

Parameters

attributeType esriGeometryAttributes
distance double
asRatio bool

Returns

double

GetVertexAttributeAtDistance3D(esriGeometryAttributes, double, bool)

Gets the attribute value corresponding to the 3D distance along the line.

virtual double GetVertexAttributeAtDistance3D(esriGeometryAttributes attributeType, double distance, bool asRatio)

Parameters

attributeType esriGeometryAttributes
distance double
asRatio bool

Returns

double

GetZs(out double, out double)

Get the Zs on the segment's endpoints.

virtual void GetZs(out double fromZ, out double toZ)

Parameters

fromZ double
toZ double

HasVertexAttributes(esriGeometryAttributes, out bool, out bool)

Returns two booleans telling if the segment as from attribute and to attribute values.

virtual void HasVertexAttributes(esriGeometryAttributes attributeType, out bool hasFromAttribute, out bool hasToAttribute)

Parameters

attributeType esriGeometryAttributes
hasFromAttribute bool
hasToAttribute bool

HorizontalIntersectionCount(ref WKSPoint, out bool)

Returns the number of horizontal intersections.

virtual int HorizontalIntersectionCount(ref WKSPoint p, out bool pointOnLine)

Parameters

p WKSPoint
pointOnLine bool

Returns

int

ICurve2_Dimension

virtual esriGeometryDimension ICurve2_Dimension { get; }

Returns

esriGeometryDimension

ICurve2_Envelope

virtual IEnvelope ICurve2_Envelope { get; }

Returns

IEnvelope

ICurve2_FromPoint

virtual IPoint ICurve2_FromPoint { get; set; }

Returns

IPoint

ICurve2_GeoNormalize()

virtual void ICurve2_GeoNormalize()

ICurve2_GeoNormalizeFromLongitude(double)

virtual void ICurve2_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

ICurve2_GeometryType

virtual esriGeometryType ICurve2_GeometryType { get; }

Returns

esriGeometryType

ICurve2_GetSubcurve(double, double, bool, out ICurve)

virtual void ICurve2_GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

ICurve2_IsClosed

virtual bool ICurve2_IsClosed { get; }

Returns

bool

ICurve2_IsEmpty

virtual bool ICurve2_IsEmpty { get; }

Returns

bool

ICurve2_Length

virtual double ICurve2_Length { get; }

Returns

double

ICurve2_Project(ISpatialReference)

virtual void ICurve2_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

ICurve2_QueryEnvelope(IEnvelope)

virtual void ICurve2_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

ICurve2_QueryFromPoint(IPoint)

virtual void ICurve2_QueryFromPoint(IPoint from)

Parameters

from IPoint

ICurve2_QueryNormal(esriSegmentExtension, double, bool, double, ILine)

virtual void ICurve2_QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

ICurve2_QueryPoint(esriSegmentExtension, double, bool, IPoint)

virtual void ICurve2_QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

ICurve2_QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)

virtual void ICurve2_QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)

Parameters

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

ICurve2_QueryTangent(esriSegmentExtension, double, bool, double, ILine)

virtual void ICurve2_QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

ICurve2_QueryToPoint(IPoint)

virtual void ICurve2_QueryToPoint(IPoint to)

Parameters

to IPoint

ICurve2_ReverseOrientation()

virtual void ICurve2_ReverseOrientation()

ICurve2_SetEmpty()

virtual void ICurve2_SetEmpty()

ICurve2_SnapToSpatialReference()

virtual void ICurve2_SnapToSpatialReference()

ICurve2_SpatialReference

virtual ISpatialReference ICurve2_SpatialReference { get; set; }

Returns

ISpatialReference

ICurve2_ToPoint

virtual IPoint ICurve2_ToPoint { get; set; }

Returns

IPoint

ICurve3_Dimension

virtual esriGeometryDimension ICurve3_Dimension { get; }

Returns

esriGeometryDimension

ICurve3_Envelope

virtual IEnvelope ICurve3_Envelope { get; }

Returns

IEnvelope

ICurve3_FromPoint

virtual IPoint ICurve3_FromPoint { get; set; }

Returns

IPoint

ICurve3_GeoNormalize()

virtual void ICurve3_GeoNormalize()

ICurve3_GeoNormalizeFromLongitude(double)

virtual void ICurve3_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

ICurve3_GeometryType

virtual esriGeometryType ICurve3_GeometryType { get; }

Returns

esriGeometryType

ICurve3_GetSubcurve(double, double, bool, out ICurve)

virtual void ICurve3_GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

ICurve3_IsClosed

virtual bool ICurve3_IsClosed { get; }

Returns

bool

ICurve3_IsEmpty

virtual bool ICurve3_IsEmpty { get; }

Returns

bool

ICurve3_Length

virtual double ICurve3_Length { get; }

Returns

double

ICurve3_Project(ISpatialReference)

virtual void ICurve3_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

ICurve3_PutCoordsEx(IPoint, IPoint)

virtual void ICurve3_PutCoordsEx(IPoint from, IPoint to)

Parameters

from IPoint
to IPoint

ICurve3_QueryEnvelope(IEnvelope)

virtual void ICurve3_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

ICurve3_QueryFromPoint(IPoint)

virtual void ICurve3_QueryFromPoint(IPoint from)

Parameters

from IPoint

ICurve3_QueryNormal(esriSegmentExtension, double, bool, double, ILine)

virtual void ICurve3_QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

ICurve3_QueryPoint(esriSegmentExtension, double, bool, IPoint)

virtual void ICurve3_QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

ICurve3_QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)

virtual void ICurve3_QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)

Parameters

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

ICurve3_QueryTangent(esriSegmentExtension, double, bool, double, ILine)

virtual void ICurve3_QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

ICurve3_QueryToPoint(IPoint)

virtual void ICurve3_QueryToPoint(IPoint to)

Parameters

to IPoint

ICurve3_ReverseOrientation()

virtual void ICurve3_ReverseOrientation()

ICurve3_SetEmpty()

virtual void ICurve3_SetEmpty()

ICurve3_SnapToSpatialReference()

virtual void ICurve3_SnapToSpatialReference()

ICurve3_SpatialReference

virtual ISpatialReference ICurve3_SpatialReference { get; set; }

Returns

ISpatialReference

ICurve3_ToPoint

virtual IPoint ICurve3_ToPoint { get; set; }

Returns

IPoint

ICurve_Dimension

virtual esriGeometryDimension ICurve_Dimension { get; }

Returns

esriGeometryDimension

ICurve_Envelope

virtual IEnvelope ICurve_Envelope { get; }

Returns

IEnvelope

ICurve_FromPoint

The 'from' point of the curve.

virtual IPoint ICurve_FromPoint { get; set; }

Returns

IPoint

Remarks

 

FromPoint Example

ICurve_GeoNormalize()

virtual void ICurve_GeoNormalize()

ICurve_GeoNormalizeFromLongitude(double)

virtual void ICurve_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

ICurve_GeometryType

virtual esriGeometryType ICurve_GeometryType { get; }

Returns

esriGeometryType

ICurve_GetSubcurve(double, double, bool, out ICurve)

Extracts a portion of this curve into a new curve.

virtual void ICurve_GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

Remarks

 

Subcurve Example

ICurve_IsClosed

Indicates if 'from' and 'to' points (of each part) are identical.

virtual bool ICurve_IsClosed { get; }

Returns

bool

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.

ICurve IsClosed Example

ICurve_IsEmpty

virtual bool ICurve_IsEmpty { get; }

Returns

bool

ICurve_Length

The length of the curve.

virtual double ICurve_Length { get; }

Returns

double

ICurve_Project(ISpatialReference)

virtual void ICurve_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

ICurve_QueryEnvelope(IEnvelope)

virtual void ICurve_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

ICurve_QueryFromPoint(IPoint)

Copies this curve's 'from' point to the input point.

virtual void ICurve_QueryFromPoint(IPoint from)

Parameters

from IPoint

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 Example

[C#]

//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);
    }
}














[Visual Basic .NET]

    ' 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








ICurve_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 ICurve_QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

Remarks

 

QueryNormal Example

ICurve_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 ICurve_QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

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.

ICurve QueryPoint Example

ICurve_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 ICurve_QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)

Parameters

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

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.

QueryPointAndDistance Example

ICurve_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 ICurve_QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

Remarks

 

QueryTangent Example

ICurve_QueryToPoint(IPoint)

Copies the curve's 'to' point into the input point.

virtual void ICurve_QueryToPoint(IPoint to)

Parameters

to IPoint

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.

QueryToPoint Example

ICurve_ReverseOrientation()

Reverses the parameterization of the curve ('from' point becomes 'to' point, first segment becomes last segment, etc).

virtual void ICurve_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.

Reverse Orientation Example

[C#]

    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));
        }
    }











ICurve_SetEmpty()

virtual void ICurve_SetEmpty()

ICurve_SnapToSpatialReference()

virtual void ICurve_SnapToSpatialReference()

ICurve_SpatialReference

virtual ISpatialReference ICurve_SpatialReference { get; set; }

Returns

ISpatialReference

ICurve_ToPoint

The 'to' point of the curve.

virtual IPoint ICurve_ToPoint { get; set; }

Returns

IPoint

Remarks

 

ToPoint Example

IGeometry_Dimension

The topological dimension of this geometry.

virtual esriGeometryDimension IGeometry_Dimension { get; }

Returns

esriGeometryDimension

Remarks


Note: At 9.0, Multipatches are now considered as two dimensional geometry. esriGeometry3Dimension will be used for an upcoming new geometry type.
Supported esriGeometryDimensions:

-1    esriGeometryNoDimension
1    esriGeometry0Dimension
2    esriGeometry1Dimension
4    esriGeometry2Dimension
5    esriGeometry25Dimension
6    esriGeometry3Dimension






Dimension Example





IGeometry_Envelope

Creates a copy of this geometry's envelope and returns it.

virtual IEnvelope IGeometry_Envelope { get; }

Returns

IEnvelope

Examples

Sample Snippet

<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

 

Envelope Example

IGeometry_GeoNormalize()

Shifts longitudes, if need be, into a continuous range of 360 degrees.

virtual void IGeometry_GeoNormalize()

Remarks

GeoNormalize acts on geometries whose geographic system coordinates are below -180 degrees longitude or over +180 degrees longitude or on geometries that span the +-180 degrees longitude.
 
This method requires the geometry to have a valid spatial reference (geographic or projected coordinate system).
 
This method is used internally as part of the projection process for polygons and polylines.  It is typically not used by itself.
 

IGeometry_GeoNormalizeFromLongitude(double)

Normalizes longitudes into a continuous range containing the longitude. This method is obsolete.

virtual void IGeometry_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

Remarks

This method is obsolete.  Use IGeometry::GeoNormalize instead.
 
This method requires the geometry to have a valid spatial reference (geographic or projected coordinate system).

IGeometry_GeometryType

The type of this geometry.

virtual esriGeometryType IGeometry_GeometryType { get; }

Returns

esriGeometryType

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

















Geometry Type Example

IGeometry_IsEmpty

Indicates whether this geometry contains any points.

virtual bool IGeometry_IsEmpty { get; }

Returns

bool

IGeometry_Project(ISpatialReference)

Projects this geometry into a new spatial reference.

virtual void IGeometry_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

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.

[C#]
//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());

IGeometry_QueryEnvelope(IEnvelope)

Copies this geometry's envelope properties into the specified envelope.

virtual void IGeometry_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

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.

QueryEnvelope Example

IGeometry_SetEmpty()

Removes all points from this geometry.

virtual void IGeometry_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.


[C#]     private bool EmptyGeometry(IGeometry geometry)
    {
        geometry.SetEmpty();
        return geometry.IsEmpty;
    }



IGeometry_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 IGeometry_SnapToSpatialReference()

Remarks

SnapToSpatialReference rounds all coordinates to the resolution defined by the geometry's spatial reference system. This has a similar effect on the geometry as storing the geometry in a Geodatabase.

IGeometry_SpatialReference

The spatial reference associated with this geometry.

virtual ISpatialReference IGeometry_SpatialReference { get; set; }

Returns

ISpatialReference

ILine2_Angle

virtual double ILine2_Angle { get; }

Returns

double

ILine2_Dimension

virtual esriGeometryDimension ILine2_Dimension { get; }

Returns

esriGeometryDimension

ILine2_Envelope

virtual IEnvelope ILine2_Envelope { get; }

Returns

IEnvelope

ILine2_FromPoint

virtual IPoint ILine2_FromPoint { get; set; }

Returns

IPoint

ILine2_GeoNormalize()

virtual void ILine2_GeoNormalize()

ILine2_GeoNormalizeFromLongitude(double)

virtual void ILine2_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

ILine2_GeometryType

virtual esriGeometryType ILine2_GeometryType { get; }

Returns

esriGeometryType

ILine2_GetSubcurve(double, double, bool, out ICurve)

virtual void ILine2_GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

ILine2_IsClosed

virtual bool ILine2_IsClosed { get; }

Returns

bool

ILine2_IsEmpty

virtual bool ILine2_IsEmpty { get; }

Returns

bool

ILine2_Length

virtual double ILine2_Length { get; }

Returns

double

ILine2_Project(ISpatialReference)

virtual void ILine2_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

ILine2_PutCoords(IPoint, IPoint)

virtual void ILine2_PutCoords(IPoint from, IPoint to)

Parameters

from IPoint
to IPoint

ILine2_QueryCoords(IPoint, IPoint)

virtual void ILine2_QueryCoords(IPoint from, IPoint to)

Parameters

from IPoint
to IPoint

ILine2_QueryEnvelope(IEnvelope)

virtual void ILine2_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

ILine2_QueryFromPoint(IPoint)

virtual void ILine2_QueryFromPoint(IPoint from)

Parameters

from IPoint

ILine2_QueryNormal(esriSegmentExtension, double, bool, double, ILine)

virtual void ILine2_QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

ILine2_QueryPoint(esriSegmentExtension, double, bool, IPoint)

virtual void ILine2_QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

ILine2_QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)

virtual void ILine2_QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)

Parameters

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

ILine2_QueryTangent(esriSegmentExtension, double, bool, double, ILine)

virtual void ILine2_QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

ILine2_QueryToPoint(IPoint)

virtual void ILine2_QueryToPoint(IPoint to)

Parameters

to IPoint

ILine2_ReverseOrientation()

virtual void ILine2_ReverseOrientation()

ILine2_SetEmpty()

virtual void ILine2_SetEmpty()

ILine2_SnapToSpatialReference()

virtual void ILine2_SnapToSpatialReference()

ILine2_SpatialReference

virtual ISpatialReference ILine2_SpatialReference { get; set; }

Returns

ISpatialReference

ILine2_ToPoint

virtual IPoint ILine2_ToPoint { get; set; }

Returns

IPoint

ILine3_Angle

virtual double ILine3_Angle { get; }

Returns

double

ILine3_Dimension

virtual esriGeometryDimension ILine3_Dimension { get; }

Returns

esriGeometryDimension

ILine3_Envelope

virtual IEnvelope ILine3_Envelope { get; }

Returns

IEnvelope

ILine3_FromPoint

virtual IPoint ILine3_FromPoint { get; set; }

Returns

IPoint

ILine3_GeoNormalize()

virtual void ILine3_GeoNormalize()

ILine3_GeoNormalizeFromLongitude(double)

virtual void ILine3_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

ILine3_GeometryType

virtual esriGeometryType ILine3_GeometryType { get; }

Returns

esriGeometryType

ILine3_GetSubcurve(double, double, bool, out ICurve)

virtual void ILine3_GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

ILine3_IsClosed

virtual bool ILine3_IsClosed { get; }

Returns

bool

ILine3_IsEmpty

virtual bool ILine3_IsEmpty { get; }

Returns

bool

ILine3_Length

virtual double ILine3_Length { get; }

Returns

double

ILine3_Project(ISpatialReference)

virtual void ILine3_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

ILine3_PutCoords(IPoint, IPoint)

virtual void ILine3_PutCoords(IPoint from, IPoint to)

Parameters

from IPoint
to IPoint

ILine3_PutWKSCoords(ref WKSPoint, ref WKSPoint)

virtual void ILine3_PutWKSCoords(ref WKSPoint from, ref WKSPoint to)

Parameters

from WKSPoint
to WKSPoint

ILine3_QueryCoords(IPoint, IPoint)

virtual void ILine3_QueryCoords(IPoint from, IPoint to)

Parameters

from IPoint
to IPoint

ILine3_QueryEnvelope(IEnvelope)

virtual void ILine3_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

ILine3_QueryFromPoint(IPoint)

virtual void ILine3_QueryFromPoint(IPoint from)

Parameters

from IPoint

ILine3_QueryNormal(esriSegmentExtension, double, bool, double, ILine)

virtual void ILine3_QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

ILine3_QueryPoint(esriSegmentExtension, double, bool, IPoint)

virtual void ILine3_QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

ILine3_QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)

virtual void ILine3_QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)

Parameters

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

ILine3_QueryTangent(esriSegmentExtension, double, bool, double, ILine)

virtual void ILine3_QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

ILine3_QueryToPoint(IPoint)

virtual void ILine3_QueryToPoint(IPoint to)

Parameters

to IPoint

ILine3_QueryWKSCoords(out WKSPoint, out WKSPoint)

virtual void ILine3_QueryWKSCoords(out WKSPoint from, out WKSPoint to)

Parameters

from WKSPoint
to WKSPoint

ILine3_ReverseOrientation()

virtual void ILine3_ReverseOrientation()

ILine3_SetEmpty()

virtual void ILine3_SetEmpty()

ILine3_SnapToSpatialReference()

virtual void ILine3_SnapToSpatialReference()

ILine3_SpatialReference

virtual ISpatialReference ILine3_SpatialReference { get; set; }

Returns

ISpatialReference

ILine3_ToPoint

virtual IPoint ILine3_ToPoint { get; set; }

Returns

IPoint

ISegment_Dimension

virtual esriGeometryDimension ISegment_Dimension { get; }

Returns

esriGeometryDimension

ISegment_Envelope

virtual IEnvelope ISegment_Envelope { get; }

Returns

IEnvelope

ISegment_FromPoint

virtual IPoint ISegment_FromPoint { get; set; }

Returns

IPoint

ISegment_GeoNormalize()

virtual void ISegment_GeoNormalize()

ISegment_GeoNormalizeFromLongitude(double)

virtual void ISegment_GeoNormalizeFromLongitude(double Longitude)

Parameters

Longitude double

ISegment_GeometryType

virtual esriGeometryType ISegment_GeometryType { get; }

Returns

esriGeometryType

ISegment_GetSubcurve(double, double, bool, out ICurve)

virtual void ISegment_GetSubcurve(double fromDistance, double toDistance, bool asRatio, out ICurve outSubcurve)

Parameters

fromDistance double
toDistance double
asRatio bool
outSubcurve ICurve

ISegment_IsClosed

virtual bool ISegment_IsClosed { get; }

Returns

bool

ISegment_IsEmpty

virtual bool ISegment_IsEmpty { get; }

Returns

bool

ISegment_Length

virtual double ISegment_Length { get; }

Returns

double

ISegment_Project(ISpatialReference)

virtual void ISegment_Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

ISegment_QueryEnvelope(IEnvelope)

virtual void ISegment_QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

ISegment_QueryFromPoint(IPoint)

virtual void ISegment_QueryFromPoint(IPoint from)

Parameters

from IPoint

ISegment_QueryNormal(esriSegmentExtension, double, bool, double, ILine)

virtual void ISegment_QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

ISegment_QueryPoint(esriSegmentExtension, double, bool, IPoint)

virtual void ISegment_QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

ISegment_QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)

virtual void ISegment_QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)

Parameters

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

ISegment_QueryTangent(esriSegmentExtension, double, bool, double, ILine)

virtual void ISegment_QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

ISegment_QueryToPoint(IPoint)

virtual void ISegment_QueryToPoint(IPoint to)

Parameters

to IPoint

ISegment_ReverseOrientation()

virtual void ISegment_ReverseOrientation()

ISegment_SetEmpty()

virtual void ISegment_SetEmpty()

ISegment_SnapToSpatialReference()

virtual void ISegment_SnapToSpatialReference()

ISegment_SpatialReference

virtual ISpatialReference ISegment_SpatialReference { get; set; }

Returns

ISpatialReference

ISegment_ToPoint

virtual IPoint ISegment_ToPoint { get; set; }

Returns

IPoint

InterfaceSupportsErrorInfo(ref Guid)

virtual void InterfaceSupportsErrorInfo(ref Guid riid)

Parameters

riid Guid

InterpolateVertexAttributes(double, bool, IPoint)

Interpolates Z and M values at distanceAlongSegment and stores the results at point.

virtual void InterpolateVertexAttributes(double distanceAlongSegment, bool asRatio, IPoint atPoint)

Parameters

distanceAlongSegment double
asRatio bool
atPoint IPoint

IsClosed

virtual bool IsClosed { get; }

Returns

bool

IsClosed3D

Indicates if 'from' and 'to' points (of each part) are identical.

virtual bool IsClosed3D { get; }

Returns

bool

IsEmpty

virtual bool IsEmpty { get; }

Returns

bool

IsEqual(IClone)

Indicates if the receiver and other have the same properties.

virtual bool IsEqual(IClone other)

Parameters

other IClone

Returns

bool

IsIdentical(IClone)

Indicates if the receiver and other are the same object.

virtual bool IsIdentical(IClone other)

Parameters

other IClone

Returns

bool

Length

virtual double Length { get; }

Returns

double

Length3D

The length of the curve.

virtual double Length3D { get; }

Returns

double

MaxDistanceFromLine(ref WKSPoint, ref WKSPoint, double, double, double, ref double, ref double, ref WKSPoint)

Returns the maximum distance from the line.

virtual void MaxDistanceFromLine(ref WKSPoint baseFrom, ref WKSPoint baseTo, double minOffset, double fromArcDistance, double toArcDistance, ref double maxOffset, ref double atArcDistance, ref WKSPoint farPoint)

Parameters

baseFrom WKSPoint
baseTo WKSPoint
minOffset double
fromArcDistance double
toArcDistance double
maxOffset double
atArcDistance double
farPoint WKSPoint

Move(double, double)

Moves dx units horizontally and dy units vertically.

virtual void Move(double dx, double dy)

Parameters

dx double
dy double

Remarks

 

Transform2D Move Example

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

v ILine

Remarks

 

Transform2D MoveVector Example

Project(ISpatialReference)

virtual void Project(ISpatialReference newReferenceSystem)

Parameters

newReferenceSystem ISpatialReference

PutAttributes(bool, bool, ref esriPointAttributes, ref esriPointAttributes)

Sets some attributes from this point and copies them to another point. Awareness is not considered.

virtual void PutAttributes(bool PutAttributes, bool putAwareness, ref esriPointAttributes from, ref esriPointAttributes to)

Parameters

PutAttributes bool
putAwareness bool
from esriPointAttributes
to esriPointAttributes

PutCoords(IPoint, IPoint)

Sets this line's endpoints to be 'from' and 'to'.

virtual void PutCoords(IPoint from, IPoint to)

Parameters

from IPoint
to IPoint

Remarks

 

Line PutCoords Example

PutCoordsEx(IPoint, IPoint)

Sets this segment's endpoints to 'from' and 'to'.

virtual void PutCoordsEx(IPoint from, IPoint to)

Parameters

from IPoint
to IPoint

PutVertexAttributes(esriGeometryAttributes, double, double)

Sets the 'from' and the 'to' attribute values.

virtual void PutVertexAttributes(esriGeometryAttributes attributeType, double fromAttribute, double toAttribute)

Parameters

attributeType esriGeometryAttributes
fromAttribute double
toAttribute double

PutWKSCoords(ref WKSPoint, ref WKSPoint)

From and To become the new endpoints of this line. Any existing attributes are deleted.

virtual void PutWKSCoords(ref WKSPoint from, ref WKSPoint to)

Parameters

from WKSPoint
to WKSPoint

Remarks

The from and to parameters are WKSPoint structures instead of Point objects. If you are not interested in using or preserving vertex attributes then PutWKSCoords and QueryWKSCoords can be a quicker way to modify and obtain the xy coordinates defining the line.

QueryAreaCorrection(out double)

Queries the area correction value.

virtual void QueryAreaCorrection(out double areaCorrection)

Parameters

areaCorrection double

QueryAttributes(bool, bool, ref esriPointAttributes, ref esriPointAttributes)

Gets some attributes from this point and copies them to another point. Awareness is not considered.

virtual void QueryAttributes(bool getAttributes, bool getAwareness, ref esriPointAttributes from, ref esriPointAttributes to)

Parameters

getAttributes bool
getAwareness bool
from esriPointAttributes
to esriPointAttributes

QueryCentroidCorrection(ref double, ref double, ref double)

Queries the centroid correction value.

virtual void QueryCentroidCorrection(ref double weightedCentroidX, ref double weightedCentroidY, ref double areaCorrection)

Parameters

weightedCentroidX double
weightedCentroidY double
areaCorrection double

QueryCoords(IPoint, IPoint)

Copies the endpoints of this line to 'from' and 'to'.

virtual void QueryCoords(IPoint from, IPoint to)

Parameters

from IPoint
to IPoint

Remarks

 

Line QueryCoords Example

QueryCurvature(double, bool, out double, ILine)

Finds curvature and unit vector starting at point on segment and directed to embedded circle center.

virtual void QueryCurvature(double DistanceAlongCurve, bool asRatio, out double curvature, ILine unitVector)

Parameters

DistanceAlongCurve double
asRatio bool
curvature double
unitVector ILine

Remarks

The unit vector returned by QueryCurvature points toward the center of the circle that has the same first and second derivative at the queried point with a curvature value equal to 1 / Radius of that circle.

QueryCurvature Example

QueryEnvelope(IEnvelope)

virtual void QueryEnvelope(IEnvelope outEnvelope)

Parameters

outEnvelope IEnvelope

QueryFromPoint(IPoint)

virtual void QueryFromPoint(IPoint from)

Parameters

from IPoint

QueryNearestPoint(IPoint, esriSegmentExtension, IPoint)

Copies into 'nearest' a point on this geometry nearest to the input point.

virtual void QueryNearestPoint(IPoint p, esriSegmentExtension extension, IPoint nearest)

Parameters

p IPoint
extension esriSegmentExtension
nearest IPoint

Remarks

 

QueryNearestPoint Example

QueryNearestPoint3D(IPoint, esriSegmentExtension, IPoint)

Copies into 'nearest' a point on this geometry nearest to the input point.

virtual void QueryNearestPoint3D(IPoint pInP, esriSegmentExtension extension, IPoint pNearest)

Parameters

pInP IPoint
extension esriSegmentExtension
pNearest IPoint

Remarks

If the geometry is an Envelope and the input point is located within the bounds of the Envelope, QueryNearestPoint3D will return a point on the exterior of the Envelope nearest the input point.

[C#]

QueryNearestPoint3D graphic example.

public static void QueryNearestPoint3D()
{
  IGeometry pointGeometry = GetPointGeometry();
  IGeometry envelopeGeometry = GetEnvelopeGeometry();
  IProximityOperator3D proximityOperator3D = envelopeGeometry as IProximityOperator3D;
  IPoint nearestPoint3D = new PointClass();
  proximityOperator3D.QueryNearestPoint3D(pointGeometry as IPoint, esriSegmentExtension.esriNoExtension, nearestPoint3D);
  //nearestPoint3D = (5.393, -0.583, -6.043)
}








QueryNormal(esriSegmentExtension, double, bool, double, ILine)

virtual void QueryNormal(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine normal)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
normal ILine

QueryPoint(esriSegmentExtension, double, bool, IPoint)

virtual void QueryPoint(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, IPoint outPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
outPoint IPoint

QueryPoint3D(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 QueryPoint3D(esriSegmentExtension extension, double DistanceAlongCurve, bool bAsRatio, IPoint pOutPoint)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
bAsRatio bool
pOutPoint IPoint

QueryPointAndDistance(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double, ref bool)

virtual void QueryPointAndDistance(esriSegmentExtension extension, IPoint inPoint, bool asRatio, IPoint outPoint, ref double DistanceAlongCurve, ref double distanceFromCurve, ref bool bRightSide)

Parameters

extension esriSegmentExtension
inPoint IPoint
asRatio bool
outPoint IPoint
DistanceAlongCurve double
distanceFromCurve double
bRightSide bool

QueryPointAndDistance3D(esriSegmentExtension, IPoint, bool, IPoint, ref double, ref double)

Finds the point on the curve closest to inPoint, then copies that point to outPoint; optionally calculates related items.

virtual void QueryPointAndDistance3D(esriSegmentExtension extension, IPoint pInPoint, bool bAsRatio, IPoint pOutPoint, ref double pDistanceAlongCurve, ref double pDistanceFromCurve)

Parameters

extension esriSegmentExtension
pInPoint IPoint
bAsRatio bool
pOutPoint IPoint
pDistanceAlongCurve double
pDistanceFromCurve double

QueryPointsAndDistances(esriSegmentExtension, double, IPoint, bool, ref double, out IEnumPointAndDistance)

Given an input point, calculates the minimum distance to the geometry and provides an enumerator over all closest points on the geometry, along with additional information.

virtual void QueryPointsAndDistances(esriSegmentExtension extension, double searchRadius, IPoint inPoint, bool asRatio, ref double distanceFromCurve, out IEnumPointAndDistance pointsAndDistances)

Parameters

extension esriSegmentExtension
searchRadius double
inPoint IPoint
asRatio bool
distanceFromCurve double
pointsAndDistances IEnumPointAndDistance

Remarks

AsRatio is an input parameter that only affects the DistanceAlongCurvereturned as part of the output IEnumPointAndDistance enumerator.

distanceFromCurve is an output parameter that represents the minimum distance between the curve and the input point.

IEnumPointAndDistance is an enumerator (it inherits from IEnumVertex) over all nearest points on the curve

QueryTangent(esriSegmentExtension, double, bool, double, ILine)

virtual void QueryTangent(esriSegmentExtension extension, double DistanceAlongCurve, bool asRatio, double Length, ILine tangent)

Parameters

extension esriSegmentExtension
DistanceAlongCurve double
asRatio bool
Length double
tangent ILine

QueryToPoint(IPoint)

virtual void QueryToPoint(IPoint to)

Parameters

to IPoint

QueryVertexAttributes(esriGeometryAttributes, out double, out double)

Gets the 'from' and the 'to' attribute values.

virtual void QueryVertexAttributes(esriGeometryAttributes attributeType, out double fromAttribute, out double toAttribute)

Parameters

attributeType esriGeometryAttributes
fromAttribute double
toAttribute double

QueryWKSCoords(out WKSPoint, out WKSPoint)

Returns the (x,y) coordinates of this line's endpoints.

virtual void QueryWKSCoords(out WKSPoint from, out WKSPoint to)

Parameters

from WKSPoint
to WKSPoint

Remarks

The from and to parameters are WKSPoint structures instead of Point objects. If you are not interested in using or preserving vertex attributes then PutWKSCoords and QueryWKSCoords can be a quicker way to modify and obtain the xy coordinates defining the line.

QueryWKSEnvelope(ref WKSEnvelope)

Queries the WKS Envelope.

virtual void QueryWKSEnvelope(ref WKSEnvelope Envelope)

Parameters

Envelope WKSEnvelope

QueryWKSFromPoint(out WKSPoint)

Query the WKSPoint at the 'from' point.

virtual void QueryWKSFromPoint(out WKSPoint p)

Parameters

p WKSPoint

QueryWKSToPoint(out WKSPoint)

Query the WKSPoint at the 'to' point.

virtual void QueryWKSToPoint(out WKSPoint p)

Parameters

p WKSPoint

ReturnDistance(IGeometry)

Returns the minimum distance between two geometries.

virtual double ReturnDistance(IGeometry other)

Parameters

other IGeometry

Returns

double

Remarks

 

ReturnDistance Example

The geometry combinations which can be used with ReturnDistance are:

Point: Point, MultiPoint, Envelope, Polyline, Polygon, Line, CircularArc, EllipticArc, BezierCurve.
Multipoint: Point, MultiPoint, Envelope, Polyline, Polygon.
Envelope: Point, MultiPoint, Envelope, Line, CircularArc, EllipticArc, BezierCurve, PolyLine, Polygon.
PolyLine: Point, Multipoint, Envelope, PolyLine, Polygon.
Polygon: Point, Multipoint, Envelope, PolyLine, Polygon.
Line: Point, Envelope, Line, CircularArc, EllipticArc, BezierCurve.
CircularArc: Point, Envelope, Line, CircularArc, EllipticArc (not implemented yet), BezierCurve.
EllipticArc: Point, Envelope, Line, CircularArc (not implemented yet), EllipticArc (not implemented yet), BezierCurve (not implemented yet).
BezierCurve: Point, Envelope, Line, CircularArc, EllipticArc (not implemented yet), BezierCurve.







Note: To get the distance between a segment (Line, CircularArc, EllipticArc, BezierCurve) and a MultiPoint, PolyLine or Polygon, add that segment to a PolyLine.

ReturnDistance3D(IGeometry)

Returns the minimal distance between two geometries.

virtual double ReturnDistance3D(IGeometry pOther)

Parameters

pOther IGeometry

Returns

double

ReturnNearestPoint(IPoint, esriSegmentExtension)

Creates and returns a point on this geometry nearest to the input point.

virtual IPoint ReturnNearestPoint(IPoint p, esriSegmentExtension extension)

Parameters

p IPoint
extension esriSegmentExtension

Returns

IPoint

Remarks

 

ReturnNearestPoint Example

ReturnNearestPoint3D(IPoint, esriSegmentExtension)

Creates and returns a point on this geometry nearest to the input point.

virtual IPoint ReturnNearestPoint3D(IPoint pInP, esriSegmentExtension extension)

Parameters

pInP IPoint
extension esriSegmentExtension

Returns

IPoint

Remarks

If the geometry is an Envelope and the input point is located within the bounds of the Envelope, QueryNearestPoint3D will return a point on the exterior of the Envelope nearest the input point.

[C#]

 

        public static void ReturnNearestPoint3D()

        {

IGeometry

pointGeometry = GetPointGeometry();

IGeometry envelopeGeometry = GetEnvelopeGeometry();


IProximityOperator3D

 proximityOperator3D = envelopeGeometry as IProximityOperator3D;

IPoint nearestPoint3D = proximityOperator3D.ReturnNearestPoint3D(pointGeometry as IPoint, esriSegmentExtension.esriNoExtension);


               //nearestPoint3D = (5.393, -0.583, -6.043)


        }

ReturnTurnDirection(ISegment)

Finds turn direction between two connected segments.

virtual int ReturnTurnDirection(ISegment otherSegment)

Parameters

otherSegment ISegment

Returns

int

Remarks

ReturnTurnDirection is only available for Lines and CircularArcs, not BezierCurves or EllipticArcs.

ReturnTurnDirection Example

ReverseOrientation()

virtual void ReverseOrientation()

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

Origin IPoint
rotationAngle double

Remarks

An Envelope cannot be Rotated.

Transform2D Rotate Example

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

Origin IPoint
sx double
sy double

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).

Scale Example

[C#]

            //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());













SetEmpty()

virtual void SetEmpty()

SetIDs(int, int)

Set the IDs on the segment's endpoints.

virtual void SetIDs(int fromID, int toID)

Parameters

fromID int
toID int

SetMs(double, double)

Set the Ms on the segment's endpoints.

virtual void SetMs(double fromM, double toM)

Parameters

fromM double
toM double

SetZs(double, double)

Set the Zs on the segment's endpoints.

virtual void SetZs(double fromZ, double toZ)

Parameters

fromZ double
toZ double

SnapToSpatialReference()

virtual void SnapToSpatialReference()

SpatialReference

virtual ISpatialReference SpatialReference { get; set; }

Returns

ISpatialReference

SplitAtDistance(double, bool, out ISegment, out ISegment)

Split segment at specified distance.

virtual void SplitAtDistance(double distances, bool asRatio, out ISegment fromSegment, out ISegment toSegment)

Parameters

distances double
asRatio bool
fromSegment ISegment
toSegment ISegment

Remarks

 

SplitAtDistance Example

SplitAtDistance3D(double, bool, out ISegment, out ISegment)

Split segment at specified distance.

virtual void SplitAtDistance3D(double distances, bool asRatio, out ISegment fromSegment, out ISegment toSegment)

Parameters

distances double
asRatio bool
fromSegment ISegment
toSegment ISegment

SplitAtVertexAttribute(esriGeometryAttributes, double, out ISegment, out ISegment)

Splits the segment in two segments at the location corresponding to the attribute value.

virtual void SplitAtVertexAttribute(esriGeometryAttributes attributeType, double attributeValue, out ISegment fromSegment, out ISegment toSegment)

Parameters

attributeType esriGeometryAttributes
attributeValue double
fromSegment ISegment
toSegment ISegment

SplitDivideLength(double, double, bool, ref int, ref ISegment)

Divide segment into smaller segments of the specified length.

virtual void SplitDivideLength(double Offset, double Length, bool asRatio, ref int numSplitSegments, ref ISegment splitSegments)

Parameters

Offset double
Length double
asRatio bool
numSplitSegments int
splitSegments ISegment

Remarks

 

SplitDivideLength Example

[C#]

When using C# you must use the IGeometryBridge interface to call this method.

[Visual Basic .NET]

When using VBNET you must use the IGeometryBridge interface to call this method.

SynchronizeEmptyAttributes(ISegment)

Synchronize Empty Attributes.

virtual void SynchronizeEmptyAttributes(ISegment toSegment)

Parameters

toSegment ISegment

ToPoint

virtual IPoint ToPoint { get; set; }

Returns

IPoint

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

Direction esriTransformDirection
Transformation ITransformation

VertexAttributeAware[esriGeometryAttributes]

Indicates if the segment is aware of the specified attribute type.

virtual bool VertexAttributeAware[esriGeometryAttributes attributeType] { get; set; }

Parameters

attributeType esriGeometryAttributes

Returns

bool

VertexAttributeOn(esriGeometryAttributes, double)

Indicates if attributeValue is located on this segment.

virtual int VertexAttributeOn(esriGeometryAttributes attributeType, double attributeValue)

Parameters

attributeType esriGeometryAttributes
attributeValue double

Returns

int